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: same-block inscription location pointer comparison #248

Merged
merged 5 commits into from
Oct 6, 2023

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Oct 6, 2023

The postgres.js config casts the postgres numeric type as a string when returning it to JS, causing number comparisons to break when trying to determine a inscription's genesis when it is created and transferred in the same block.

This PR simply parses values as number before comparing block height and transaction index.

@rafaelcr rafaelcr temporarily deployed to Preview October 6, 2023 18:41 — with GitHub Actions Inactive
@rafaelcr rafaelcr temporarily deployed to Preview October 6, 2023 18:41 — with GitHub Actions Inactive
@rafaelcr rafaelcr temporarily deployed to Preview October 6, 2023 18:42 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Vercel deployment URL: https://ordinals-cihmva8dq-blockstack.vercel.app 🚀

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #248 (f50739c) into master (ea99595) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #248   +/-   ##
=======================================
  Coverage   95.21%   95.21%           
=======================================
  Files          58       58           
  Lines        6100     6102    +2     
  Branches      535      535           
=======================================
+ Hits         5808     5810    +2     
  Misses        289      289           
  Partials        3        3           
Files Coverage Δ
src/pg/pg-store.ts 97.65% <100.00%> (+<0.01%) ⬆️
src/pg/types.ts 100.00% <100.00%> (ø)

@rafaelcr rafaelcr temporarily deployed to Preview October 6, 2023 18:54 — with GitHub Actions Inactive
@rafaelcr rafaelcr requested a review from lgalabru October 6, 2023 19:03
Copy link

@lgalabru lgalabru left a comment

Choose a reason for hiding this comment

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

LGTM!

@rafaelcr rafaelcr merged commit 6fabb40 into master Oct 6, 2023
7 checks passed
@rafaelcr rafaelcr deleted the fix/comparison branch October 6, 2023 19:12
blockstack-devops pushed a commit that referenced this pull request Oct 6, 2023
## [1.2.4](v1.2.3...v1.2.4) (2023-10-06)

### Bug Fixes

* same-block inscription location pointer comparison ([#248](#248)) ([6fabb40](6fabb40))
@blockstack-devops
Copy link

🎉 This PR is included in version 1.2.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

g0drlc added a commit to g0drlc/btc-ordinals-api that referenced this pull request Jul 14, 2024
## [1.2.4](hirosystems/ordinals-api@v1.2.3...v1.2.4) (2023-10-06)

### Bug Fixes

* same-block inscription location pointer comparison ([#248](hirosystems/ordinals-api#248)) ([6fabb40](hirosystems/ordinals-api@6fabb40))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants