Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bust getReceiveAddress cache for wallets other than Ledger #5469

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Oct 16, 2023

Description

Fixes one of two hard things in software engineering, i.e us being too heavy on the memoization side of things and never getting a new receive address for UTXOs when the receive index changes.

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

N/A, spotted by ops

Risk

None

Testing

  • Click receive on a UTXO account
  • Make a send to your account
  • After the Tx is confirmed, and without refreshing the page, click "Receive" again
  • Ensure the receive address you're getting is a new one

Engineering

  • Put a breakpoint in getReceiveAddress body
  • Ensure it is always ran when clicking receive for the same account - except for Ledger, with which it will be memoized

Operations

Screenshots (if applicable)

This diff

  • Current receive index
image
  • Next receive index
image

Prod

  • Current receive index
image
  • Next receive index, notice how this stays the same and vails verification
image

Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@gomesalexandre gomesalexandre marked this pull request as ready for review October 16, 2023 22:08
@gomesalexandre gomesalexandre requested a review from a team as a code owner October 16, 2023 22:08
@woodenfurniture woodenfurniture enabled auto-merge (squash) October 17, 2023 03:41
@woodenfurniture woodenfurniture merged commit fdb68f9 into develop Oct 17, 2023
3 checks passed
@woodenfurniture woodenfurniture deleted the fix_getReceiveAddress_cache_bust branch October 17, 2023 03:47
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