From a6155b5c4359ed138b0be30f7927469742157ea2 Mon Sep 17 00:00:00 2001 From: Chan Jing Hong Date: Mon, 27 May 2024 10:14:39 +0800 Subject: [PATCH] add test proof, default breakdown all true --- governance/src/hooks/airdrop/proof-mainnet-2.json | 12 ++++++++++++ governance/src/hooks/airdrop/useAirdrop.ts | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/governance/src/hooks/airdrop/proof-mainnet-2.json b/governance/src/hooks/airdrop/proof-mainnet-2.json index 9def9581..1c0ee866 100644 --- a/governance/src/hooks/airdrop/proof-mainnet-2.json +++ b/governance/src/hooks/airdrop/proof-mainnet-2.json @@ -1179,6 +1179,18 @@ "0xa77b2ab8e1908d43d37bd8c6e4401a9b662b09aa7b58a77d7504a11142029dd5", "0xd980e9839846607a33aa572f3b140c0d70d5c8262633122e048c8a66e9f9cff7" ] + }, + "0xF8368119Bb1073Cf01B841848725d81b542A4c19": { + "index": 93, + "amount": "0x1bb41641619d720000", + "proof": [ + "0xfad94ccd355f1c56c5db071dd24e1d475921edfd3404c45e3b578b4080a40587", + "0xeee8ccbfd2bccd94938292fe13a03781ad250e020931f96228ffd7dd106e1e56", + "0xfebc0ca878a3acb2c84dbf1bda826857dfc054b9db592f9f50a2b03cb25798b9", + "0x59bc7dcbf9fb191c745668330a4ad39dc86ff04fa58e0fc59380f66aa0cc075f", + "0xa77b2ab8e1908d43d37bd8c6e4401a9b662b09aa7b58a77d7504a11142029dd5", + "0xd980e9839846607a33aa572f3b140c0d70d5c8262633122e048c8a66e9f9cff7" + ] } } } \ No newline at end of file diff --git a/governance/src/hooks/airdrop/useAirdrop.ts b/governance/src/hooks/airdrop/useAirdrop.ts index 384e9747..85f7689f 100644 --- a/governance/src/hooks/airdrop/useAirdrop.ts +++ b/governance/src/hooks/airdrop/useAirdrop.ts @@ -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, @@ -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), });