superhero-com / superhero-wallet

Superhero is a multi-blockchain wallet to manage crypto assets and navigate the web3 and DeFi space. Currently supporting Bitcoin, Ethereum and æternity blockchains.
https://wallet.superhero.com
ISC License
39 stars 38 forks source link

AE Middleware should not impact app connection status #2519

Closed peronczyk closed 8 months ago

peronczyk commented 11 months ago

Currently the middleware is always initialized with the APP - no matter if it's really needed. This impacts the app loading performance on pages that don't use the middleware.

Changes:

  1. Removal of src/lib/wallet.ts file which was in fact just a shortcut to the initSdk method stored in the SDK composable. The watchers was moved from this file to the SDK file.
  2. Different way of reacting on the network change: instead of watcher based logic we are now using hooks.
  3. Changed logic of resetting connection with DAPPs. This was consulted with @davidyuk as he helped me with establishing the correct logic.

Testing

  1. Transaction lists
  2. Names: registering, auctions, changing
  3. DAPP connections, syncing account and network.
  4. Changing active network and checking if displayed data matches the selected network.
Liubov-crypto commented 10 months ago

@peronczyk please check it:

After I set name by default it was disappearing:

https://github.com/superhero-com/superhero-wallet/assets/69896204/a0dd81ac-c883-48f0-b069-0a7e109cec00

I found these issues in console:

Image

Image

FF extension was very slow for me, idk why, and connection to DAPPs was also very slow (I had to wait about 1 min for the popup to connect the wallet).

I will register separately the issue with "jumping" names between networks, the same on dev branch.

peronczyk commented 8 months ago

@Liubov-crypto can you retest the task? I opened new PR which now is build upon the feat/eth-support branch. So it has all the ETH stuff we already have. The reason for this is to also fix this issue: https://github.com/superhero-com/superhero-wallet/issues/2595

Liubov-crypto commented 8 months ago
  1. My assets are displaying with some delay (14 sec compared with 5 sec on dev branch), and I found some error in console:

asset

Also I can see Link token from testnet in mainnet (the same on dev branch). I think it's related to free API issue:

key

  1. It's not possible to connect to DEX, superhero dot com (but Nikita already registered such issue):

https://github.com/superhero-com/superhero-wallet/assets/69896204/49f72fab-56b0-4283-8944-99ed88671e03

  1. Names are still "jumping" between networks, there is separate issue for it, cuz the same on dev branch.
Liubov-crypto commented 8 months ago

I will register a separate issue regarding Ad1. The same is on eth-support branch.