This reverts commit f29de67f1f.
This commit is contained in:
@@ -11,7 +11,7 @@ pub fn store_pool_balances(changes: BlockPoolChanges, balance_store: StoreAddBig
|
||||
let pool_hash_hex = hex::encode(&balance_delta.pool_hash);
|
||||
balance_store.add(
|
||||
balance_delta.ordinal,
|
||||
format!("{pool_hash_hex}:{type}", type = balance_delta.token_type),
|
||||
format!("{}:{}", pool_hash_hex, balance_delta.token_type),
|
||||
BigInt::from_signed_bytes_be(&balance_delta.token_delta),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ fn map_changes(
|
||||
let pool_hash_hex = hex::encode(balance_delta.pool_hash);
|
||||
let pool = match pool_store.get_last(pool_hash_hex.clone()) {
|
||||
Some(pool) => pool,
|
||||
None => panic!("Pool not found in store for given hash: {pool_hash_hex}"),
|
||||
None => panic!("Pool not found in store for given hash: {}", pool_hash_hex),
|
||||
};
|
||||
let token_type = substreams::key::segment_at(&store_delta.key, 1);
|
||||
let token_index = if token_type == "quote" { 1 } else { 0 };
|
||||
|
||||
Reference in New Issue
Block a user