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

[patch] Fix bug where we're identifying v2 inserts wrong #523

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Conversation

bowenyang007
Copy link
Collaborator

@bowenyang007 bowenyang007 commented Sep 25, 2024

The previous migration logic introduced db conflicts where v2 inserts were identified as v1 because we're filling asset_type_v1. This fixes that.

previous PR: #519

// by looking at whether asset_type_v1 is null (must be v1 if not null)
// by looking at whether asset_type_v2 is null (must be v1 if it's null)
// Note, we can't check asset_type_v1 is none because we're now filling asset_type_v1
// for certain assets
current_unified_fungible_asset_balances
.into_iter()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@yuunlimm let's start adding this as the first test. ❤️

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bowenyang007 what's the transaction version if any?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yea this v1 and v2 thing is easy to miss.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we might need custom transactions for this b/c idk if there's a single transaction on testnet or mainnet representative. or we can just write a script and deploy to testnet lol

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually this one on mainnet should break if the logic is wrong: 1669115601

Copy link
Collaborator

Choose a reason for hiding this comment

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

nice.

@bowenyang007 bowenyang007 enabled auto-merge (squash) September 25, 2024 17:59
@bowenyang007 bowenyang007 merged commit 8beaeae into main Sep 25, 2024
7 checks passed
@bowenyang007 bowenyang007 deleted the aa_fix branch September 25, 2024 18:05
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