HomePhabricator

[Cashtab] Hide notification when switching apps/wallets

Description

[Cashtab] Hide notification when switching apps/wallets

Summary: When switching between wallets, if switching to a wallet that has more XEC, the xecReceivedNotification fires showing the difference between the balances of the two wallets. This behaviour also happens for tokens in some situations. To fix this, the hasUpdated state variable will be initalized to false on component load, set to true during the useAsyncTimeoutFunction, and reset to false during the activateWallet function.

Test Plan:
cd web/cashtab
npm start
switch to a wallet that has a higher balance of XEC
ensure xecReceivedNotification does not fire
switch to a wallet that has a lower balance of XEC
ensure xecReceivedNotification doesn't fire
from another wallet, send XEC and ensure that xecNotification does fire

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D11151

Details

Provenance
kieran709Authored on Mar 8 2022, 20:27
kieran709Pushed on Mar 15 2022, 19:06
Reviewer
Restricted Project
Differential Revision
D11151: [Cashtab] Hide notification when switching apps/wallets
Parents
rABC23b6ca0b1ef6: interface: remove unused estimateSmartFee method
Branches
Unknown
Tags
Unknown