fix(sfrax): update aggregate_balances_changes usage to the new interface (#101)

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This commit is contained in:
Zizou
2024-10-30 15:46:08 +07:00
committed by GitHub
parent c4bb7418b9
commit 9f75d47202

View File

@@ -214,11 +214,17 @@ pub fn map_protocol_changes(
aggregate_balances_changes(balance_store, deltas)
.into_iter()
.for_each(|(_, (tx, balances))| {
transaction_contract
let tx_change = transaction_contract
.entry(tx.index)
.or_insert_with(|| TransactionChanges::new(&tx))
.balance_changes
.extend(balances.into_values());
.or_insert_with(|| TransactionChanges::new(&tx));
balances
.into_values()
.for_each(|token_bc_map| {
tx_change
.balance_changes
.extend(token_bc_map.into_values());
});
});
extract_contract_changes(