vulpemventures / marina

Liquid Wallet browser extension
MIT License
37 stars 19 forks source link

Remove `redux` and `ldk`, refactor using `liquidjs-lib` and electrum websocket endpoint #436

Closed louisinger closed 1 year ago

louisinger commented 1 year ago

This PR removes redux, redux-saga, webext-redux and ldk packages from Marina.

TODO:

@bordalix @tiero please review

Janaka-Steph commented 1 year ago

I am looking at using React-Query (https://tanstack.com/query/latest) to manage Esplora data, but afaik it returns either data or error. If I use ws.batchRequest to get transactions and one of them fails the whole operation fails. What about returning successful data, if any, along with promise rejection error inside ElectrumWS onMessage ? More broadly, what is your strategy when a request fails inside a batchRequest ?

Janaka-Steph commented 1 year ago

I noticed that we have txID, txid, txHash from LiquidJS. Would be nice to harmonize that.

louisinger commented 1 year ago

UPDATE Latest commits add full support of Ionio accounts. Some small breaking changes in marina-provider has been introduced. The docs.vulpem.com update describes them and adds an example related to Ionio account.

It should be enough to test and discuss new APIs @tiero @bordalix

I keep this PR as draft, some required WIP:

Test yourself: marina-0.4.14.zip

louisinger commented 1 year ago

marina-0.4.14.zip

The latest version adds Ionio accounts restoration (download a file in settings/accounts and upload it in onboarding/wallet-restore form) + Liquid Taxi support.

tiero commented 1 year ago

By default first start the explorer is set to Custom. Is this wanted?

image
tiero commented 1 year ago

I would put in the placeholder an example of what we need. ie. https://blockstream.info and wss://vulpem.com

image
tiero commented 1 year ago

I would add also the base derivation path for each account listed here

image
tiero commented 1 year ago

If possible I would put the Updating... in the navbar during the restoration/fetching of history

tiero commented 1 year ago
image

Alternative would be to move from the date to the type (Inbound, Outbound, Multiple)

image

https://www.loom.com/share/46550313f0a148a58c7b3668560410b2

tiero commented 1 year ago

Best to write Unconfirmed here, maybe as tag using the red or yellow background

image
tiero commented 1 year ago

The sending flow has some glitches:

https://www.loom.com/share/ab92c4fd7a8e44e6a310f131df51df31

louisinger commented 1 year ago

You can test using manifest v3 with the command yarn start:v3. Same for build yarn build:v3 will build the extension using manifest v3.

tiero commented 1 year ago

nit: overlay background does not cover all extension

image
bordalix commented 1 year ago

It stays like this forever, i.e., doesn't find out that tx are already confirmed:

Screenshot 2023-03-14 at 14 50 52

Also, (unconfirmed) hides the value of the transaction.

bordalix commented 1 year ago

L-BTC balance (on the assets list) should be '0' and not absent as is now:

Screenshot 2023-03-14 at 14 56 43

bordalix commented 1 year ago

Date area needs to have less width or else value of the tx is wrapped:

Screenshot 2023-03-14 at 15 01 15

bordalix commented 1 year ago

I'm getting blinding errors on mempool and blockstream when seeing a contract creation tx:

https://liquid.network/testnet/tx/0e82f8fca8f968bff3b78c64d7c0f6bb18f94f3d331861c486a770c300143746#blinded=84897,144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49,d6fd0b0dda248b46903ed123a6c0bf7dbb55082f671033289bd3a472434a9bc7,fd1f57f5dfe08560e74c05abd97e3b5635c5831867ace8ed65b920cf2d3cbcf9,21680168,144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49,bfeb9a4d8e1de578bb014e264a21c93715cc6dc4233bc3c948dc2cfcd881e48b,1c923c8f54bd7237274b1a0ae9aead67affb0c4f33c748394e41f8725765ba5c,1100000000,0d86b2f6a8c3b02a8c7c8836b83a081e68b7e2b4bcdfc58981fc5486f59f7518,0000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000

Screenshot 2023-03-14 at 15 14 02

Screenshot 2023-03-14 at 15 13 52

bordalix commented 1 year ago

L-BTC list of Tx only shows fee spent:

Screenshot 2023-03-14 at 15 16 39

bordalix commented 1 year ago
  1. Create contract
  2. Export marina-ionio-restoration.json
  3. In marina, restore account
  4. Restore with same mnemonic and json file from 2
  5. Contracts has status "unknown" (I will check why)
  6. When I try to close the contract, I get this error:

Screenshot 2023-03-14 at 15 28 14

tiero commented 1 year ago

Can you please try to "Restore account" from a wallet already initialized? For some reason I always get invalid password that way @louisinger

tiero commented 1 year ago

Can we have to fetch registry to pull assets every time we load the homepage?

Seems it fails to fetch asset, ticker and name first time and it nevers recover image

tiero commented 1 year ago

Shall we add a button into either Accounts or in Deep Restore to be able to import the restoration file if needed?

tiero commented 1 year ago

image

tiero commented 1 year ago

When L-BTC is part of tx and used as fee input to cover the fee output, it should not be shown in the L-BTC history?

image

bordalix commented 1 year ago

When I try to send all LBTC to myself I get a min relay fee not met, 0 < 134

https://user-images.githubusercontent.com/9318412/225405661-475dbab3-9029-4ef5-8156-6c9a88f86291.mov

Also, Retry button does nothing.

louisinger commented 1 year ago

Can you please try to "Restore account" from a wallet already initialized? For some reason I always get invalid password that way @louisinger

Unable to reproduce this @tiero using manifest v2 & v3 extensions built from sources

bordalix commented 1 year ago

@louisinger not sure if it's the same thing as @tiero reported, but my first login after restoring an account always gives this error:

Screenshot 2023-03-16 at 14 51 03

Clicking on "Log in" again works.

bordalix commented 1 year ago

Log out NEVER works on first click:

https://user-images.githubusercontent.com/9318412/225659918-5084e209-7755-4f6d-be6e-38155e8644cd.mov

tiero commented 1 year ago

Let's merge and continue issue by issue