Merge pull request #5775 from BlueWallet/scroll

FIX: The scrolling behavior after deleting a wallet was not natural.
This commit is contained in:
GLaDOS 2023-10-25 10:24:58 +01:00 committed by GitHub
commit e70780841c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,10 +76,7 @@ const WalletsList = () => {
if (wallets.length > walletsCount.current) {
walletsCarousel.current?.scrollToItem({ item: wallets[walletsCount.current] });
}
// wallet has been deleted
if (wallets.length < walletsCount.current) {
walletsCarousel.current?.scrollToItem({ item: false });
}
walletsCount.current = wallets.length;
}, [wallets]);