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: get UTXO ordinal data in batches #291

Conversation

victorkirov
Copy link
Member

🔘 PR Type

What kind of change does this PR introduce?

  • Bugfix

📜 Background

When making payments from payments address, we only pick UTXOs that don't have inscriptions on them. We check the UTXOs by making a call to the backend one at a time. This leads to rate limits being hit.

🔄 Changes

Does this PR introduce a breaking change?

  • Yes, Incompatible API changes
  • No, Adds functionality (backwards compatible)
  • No, Bug fixes (backwards compatible)

Changes:

  • We get all the inscriptions for the address in batches and map them to the UTXOs instead

Impact:

  • This fixes the rate limiting issue and should speed up the loading of the confirmation pages for users with many UTXOs in their payments address

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

@victorkirov victorkirov self-assigned this Nov 22, 2023
Copy link
Contributor

Test this PR with npm i --save-exact @secretkeylabs/xverse-core@3.0.0-e153593

@teebszet
Copy link
Member

cool. let's decouple this from the 0.23.0 release, and give more time to test

@teebszet teebszet merged commit d2d9068 into develop Nov 27, 2023
3 checks passed
@teebszet teebszet deleted the victor/eng-3304-send-ordinals-fails-when-user-has-a-lot-of-utxos-in-payments branch November 27, 2023 07:18
@github-actions github-actions bot mentioned this pull request Nov 27, 2023
@teebszet teebszet changed the title fix: Get UTXO ordinal data in batches fix: get UTXO ordinal data in batches Nov 27, 2023
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.

None yet

2 participants