From 8beaeae9422c459b830656924c37de5bf0eccd23 Mon Sep 17 00:00:00 2001 From: bowenyang007 Date: Wed, 25 Sep 2024 11:05:28 -0700 Subject: [PATCH] [patch] Fix bug where we're identifying v2 inserts wrong (#523) --- rust/processor/src/processors/fungible_asset_processor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/processor/src/processors/fungible_asset_processor.rs b/rust/processor/src/processors/fungible_asset_processor.rs index 204a46c7d..902aa6841 100644 --- a/rust/processor/src/processors/fungible_asset_processor.rs +++ b/rust/processor/src/processors/fungible_asset_processor.rs @@ -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