Skip to content

Commit

Permalink
add test proof, default breakdown all true
Browse files Browse the repository at this point in the history
  • Loading branch information
cjinghong committed May 27, 2024
1 parent cfa9708 commit a6155b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions governance/src/hooks/airdrop/proof-mainnet-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,18 @@
"0xa77b2ab8e1908d43d37bd8c6e4401a9b662b09aa7b58a77d7504a11142029dd5",
"0xd980e9839846607a33aa572f3b140c0d70d5c8262633122e048c8a66e9f9cff7"
]
},
"0xF8368119Bb1073Cf01B841848725d81b542A4c19": {
"index": 93,
"amount": "0x1bb41641619d720000",
"proof": [
"0xfad94ccd355f1c56c5db071dd24e1d475921edfd3404c45e3b578b4080a40587",
"0xeee8ccbfd2bccd94938292fe13a03781ad250e020931f96228ffd7dd106e1e56",
"0xfebc0ca878a3acb2c84dbf1bda826857dfc054b9db592f9f50a2b03cb25798b9",
"0x59bc7dcbf9fb191c745668330a4ad39dc86ff04fa58e0fc59380f66aa0cc075f",
"0xa77b2ab8e1908d43d37bd8c6e4401a9b662b09aa7b58a77d7504a11142029dd5",
"0xd980e9839846607a33aa572f3b140c0d70d5c8262633122e048c8a66e9f9cff7"
]
}
}
}
8 changes: 4 additions & 4 deletions governance/src/hooks/airdrop/useAirdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ const getProof = (account: string) => {
);
missedProof.claims = missedProofClaims;

const isMissedAccount =
!Boolean(proof.claims[account.toLowerCase()]) &&
Boolean(missedProof.claims[account.toLowerCase()]);
const isMissedAccount = Boolean(missedProof.claims[account.toLowerCase()]);

return {
merkleProof: isMissedAccount ? missedProof : proof,
Expand Down Expand Up @@ -146,7 +144,9 @@ const useAirdrop = () => {
breakdown: {
[AirdropBreakdownKeys.maxStaked]: !totalBn.isZero(),
[AirdropBreakdownKeys.heldRbnAfterTGE]:
airdropBreakdown[account.toLowerCase()]?.heldRbnAfterTGE,
proof.isMissedAccount
? true
: airdropBreakdown[account.toLowerCase()]?.heldRbnAfterTGE,
},
unclaimedAmount: totalBn.sub(claimedAmount),
});
Expand Down

0 comments on commit a6155b5

Please sign in to comment.