Skip to content

Commit

Permalink
[patch] Fix bug where we're identifying v2 inserts wrong (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenyang007 authored Sep 25, 2024
1 parent 2f3b34d commit 8beaeae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rust/processor/src/processors/fungible_asset_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,12 @@ impl ProcessorTrait for FungibleAssetProcessor {
(vec![], vec![])
} else {
// Basically we need to split the current unified balances into v1 and v2
// 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()
.partition(|x| x.asset_type_v1.is_some())
.partition(|x| x.asset_type_v2.is_none())
};

if self
Expand Down

0 comments on commit 8beaeae

Please sign in to comment.