Skip to content

feat(RevyHub): wallet-react-to-freighter-account-changes-withou - #106

Closed
Caneryy wants to merge 2 commits into
RevenantLabs:mainfrom
Caneryy:feat/issue-60
Closed

Caneryy wants to merge 2 commits into
RevenantLabs:mainfrom
Caneryy:feat/issue-60

Conversation

@Caneryy

@Caneryy Caneryy commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Closes #60

Summary

  • [Wallet] React to Freighter account changes without reloading

Test plan

  • Relevant tests pass locally
  • Manual verification on affected UI or API paths

@drips-wave

drips-wave Bot commented Jul 23, 2026

Copy link
Copy Markdown

@Caneryy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@egekoca egekoca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The added test suite is currently red. npm test fails in tests/wallet/freighterAccount.test.ts at polls for account changes when listeners are unavailable because onUpdate receives zero calls. Lint and build pass. Please fix the polling implementation or deterministic timer/async setup so the new fallback behavior is actually proven, then rerun the full test suite.

@Caneryy

Caneryy commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review @egekoca. Fixed the red test: the fallback poll was correct, but readFreighterAccountState awaits several wallet calls, so a single microtask turn wasn't enough to observe the initial emit. I now drain the microtask queue before the first assertion (kept all assertions intact, including the account-change and unsubscribe checks). Full suite is green again (21 passing) and lint passes.

  • npm test → 21 passed
  • npm run lint → clean

@egekoca

egekoca commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Closing: this predates the freighter-connect feature that later shipped on main with a different internal API shape (freighterAccount.ts no longer exports FreighterApi the way this branch's tests expect). The account-change reactivity this PR proposed is superseded by that implementation. Reopen with an update against the current freighter-connect module if there's still a gap it doesn't cover.

@egekoca egekoca closed this Sep 30, 2026
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