Skip to content

Make alert only show on the current wallet being synced#583

Open
Duddino wants to merge 4 commits intoPIVX-Labs:masterfrom
Duddino:restore-sync-alert
Open

Make alert only show on the current wallet being synced#583
Duddino wants to merge 4 commits intoPIVX-Labs:masterfrom
Duddino:restore-sync-alert

Conversation

@Duddino
Copy link
Member

@Duddino Duddino commented Aug 22, 2025

Abstract

Make the wallet synced alert only show when the current active wallet has been synced. (Previously the alert was bugged and not showing at all)
This required some changes:

  • lockableFunctions will now return the awaiting promise instead of immediately returning false, so differents part of the code can await the same function without calling it multiple times
  • Wallet::sync can be called any time, but it will return false if it has already been synced or there is no mk

Testing

  • Test that the alert only shows when you have the wallet selected
  • Try to create more wallets, and assert that the alert keeps showing

@netlify
Copy link

netlify bot commented Aug 22, 2025

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 2028371
🔍 Latest deploy log https://app.netlify.com/projects/cheery-moxie-4f1121/deploys/68e42182d9ce2c0007d4851d
😎 Deploy Preview https://deploy-preview-583--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Duddino Duddino mentioned this pull request Aug 25, 2025
Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 438e3c5

Tested the sync alert flow on the deploy preview:

  • Imported a mnemonic, waited for sync -- alert appeared after sync completed.
  • Created a second account -- alert fired for the new account once synced.
  • Switched back to account 0 -- no unexpected alert. All three cases correct.

Claude Audit

Nit: dead .then(() => {}) in use_wallet.js:298

wallet.sync().then(() => {});

The empty .then() is a no-op leftover from before the alert moved to the Dashboard watch. Could just be wallet.sync();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants