From d8a462893c35f0046b7c9085339de12087f5663b Mon Sep 17 00:00:00 2001 From: Chan Jing Hong Date: Fri, 24 May 2024 19:41:32 +0800 Subject: [PATCH] lint --- governance/src/hooks/airdrop/useAirdrop.ts | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/governance/src/hooks/airdrop/useAirdrop.ts b/governance/src/hooks/airdrop/useAirdrop.ts index cffe4a03..384e9747 100644 --- a/governance/src/hooks/airdrop/useAirdrop.ts +++ b/governance/src/hooks/airdrop/useAirdrop.ts @@ -56,25 +56,30 @@ const getProof = (account: string) => { const proofClaims = Object.keys(proof.claims).reduce((prev, address) => { return { ...prev, - [address.toLowerCase()]: proof.claims[address] - } - }, proof.claims) - proof.claims = proofClaims + [address.toLowerCase()]: proof.claims[address], + }; + }, proof.claims); + proof.claims = proofClaims; const missedProof = isProduction() ? (ProofData2 as AirdropProof) : (ProofTestnetData as AirdropProof); // lowercased all claims - const missedProofClaims = Object.keys(missedProof.claims).reduce((prev, address) => { - return { - ...prev, - [address.toLowerCase()]: missedProof.claims[address] - } - }, missedProof.claims) - missedProof.claims = missedProofClaims - - const isMissedAccount = !Boolean(proof.claims[account.toLowerCase()]) && Boolean(missedProof.claims[account.toLowerCase()]); + const missedProofClaims = Object.keys(missedProof.claims).reduce( + (prev, address) => { + return { + ...prev, + [address.toLowerCase()]: missedProof.claims[address], + }; + }, + missedProof.claims + ); + missedProof.claims = missedProofClaims; + + const isMissedAccount = + !Boolean(proof.claims[account.toLowerCase()]) && + Boolean(missedProof.claims[account.toLowerCase()]); return { merkleProof: isMissedAccount ? missedProof : proof,