Skip to content

Commit

Permalink
fix: balance change handler typo (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite authored Dec 9, 2022
1 parent 9c0573e commit 3f2812d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mappings/bank/balanceChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function handleNativeBalanceDecrement(event: CosmosEvent): Promise<
}

export async function handleNativeBalanceIncrement(event: CosmosEvent): Promise<void> {
await attemptHandling(event, _handleNativeBalanceDecrement, unprocessedEventHandler);
await attemptHandling(event, _handleNativeBalanceIncrement, unprocessedEventHandler);
}

async function _handleNativeBalanceDecrement(event: CosmosEvent): Promise<void> {
Expand Down
7 changes: 4 additions & 3 deletions tests/e2e/entities/test_native_balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_account_balance_tracking_query(self):
query {
nativeBalanceChanges{
groupedAggregates(groupBy: [ACCOUNT_ID, DENOM]){
sum{
sum{
balanceOffset
}
keys
Expand Down Expand Up @@ -125,8 +125,9 @@ def filtered_native_balance_query(_filter, order=""):
delegator_balance += int(balance["sum"]["balanceOffset"])
else:
self.fail("couldn't find validator or delegator address in keys")
self.assertLessEqual(validator_balance, -7 * 10 ** 18)
self.assertLessEqual(delegator_balance, 7 * 10 ** 18)

self.assertEqual(validator_balance, -7000000000000092000)
self.assertEqual(delegator_balance, 6999999999999908000)

for (name, query, orderAssert) in (
(
Expand Down

0 comments on commit 3f2812d

Please sign in to comment.