Skip to content

Commit

Permalink
hotfix zero division error
Browse files Browse the repository at this point in the history
  • Loading branch information
mendesfabio committed Aug 7, 2023
1 parent 3913cb2 commit 29892d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ optimism:
startBlock: 41872979
gnosis:
network: gnosis
graft:
block: 29344803
base: QmbF9ybzefDh29hdERkY9VxwMrvA15U5sgVcnPJxDpEwbC
EventEmitter:
address: "0xd8bf95b44772213905a8a74881862347acbabc48"
startBlock: 26892431
Expand Down
4 changes: 3 additions & 1 deletion src/voting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { UserBalToChain } from './types/OmniVotingEscrow/omniVotingEscrow';
import { UserBalFromChain } from './types/OmniVotingEscrowChild/omniVotingEscrowChild';
import { Deposit, Supply, Withdraw } from './types/VotingEscrow/votingEscrow';
import { LOCK_MAXTIME, ZERO_BD } from './utils/constants';
import { LOCK_MAXTIME, ZERO, ZERO_BD } from './utils/constants';
import {
getLockSnapshotId,
getOmniVotingEscrowId,
Expand Down Expand Up @@ -90,6 +90,8 @@ export function handleSupply(event: Supply): void {
}

export function handleUserBalFromChain(event: UserBalFromChain): void {
if (event.params.userPoint.slope.equals(ZERO)) return;

let userAddress = event.params.user;
createUserEntity(userAddress);

Expand Down

0 comments on commit 29892d8

Please sign in to comment.