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

Switch to xord with fallback to hiro #187

Merged

Conversation

victorkirov
Copy link
Member

@victorkirov victorkirov commented Jul 24, 2023

🔘 PR Type

What kind of change does this PR introduce?

  • Enhancement

📜 Background

Hiro's indexer has a few issues. Some of the IDs are incorrect, Ordinals are assigned to incorrect owners, and it's often behind due to slow indexing.

We've brought up our own API, based on Ord, with the same interface in order to replace the Hiro API. This PR changes the endpoint used for inscription data to be our indexer primarily, and to fall back to Hiro's api if our indexer returns a 50X status code.

Further to this, the URl we retrieved ordinal content from was changed to our ord instance since Hiro's IDs are sometimes incorrect and they wouldn't have the content in the correct URL.

Issue Link: ENG-2478

🔄 Changes

Does this PR introduce a breaking change?

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

Changes:
We now use Xord for inscription data and our own ord for image content

Impact:

  • Improves reliability and stability of inscriptions
  • Needs Core version upgrade in the extension and mobile app

What to test:

  • All ordinal images will come from a different source in the ordinal explorer and gallery view
  • The list of ordinals for an address now comes from our own API, so gallery list view and wallet ordinals list view are affected
  • The data for an ordinal now comes from our API primarily, so the ordinal details screen would have a new data source
  • When signing PSBTs, we check if any of the UTXOs have ordinals on them to display a warning. This now comes from our API.

✅ 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.

@linear
Copy link

linear bot commented Jul 24, 2023

@victorkirov victorkirov force-pushed the victor/eng-2478-switch-over-to-xord-with-fallback-to-hiro branch from 687bc0a to ff014aa Compare July 24, 2023 07:44
@github-actions
Copy link
Contributor

Test this PR with npm i @secretkeylabs/xverse-core@1.4.0-7a8ef2f

@victorkirov victorkirov self-assigned this Jul 25, 2023
@teebszet teebszet merged commit 073d6b0 into develop Aug 1, 2023
3 checks passed
@teebszet teebszet deleted the victor/eng-2478-switch-over-to-xord-with-fallback-to-hiro branch August 1, 2023 08:50
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

3 participants