Skip to content

Commit

Permalink
fix: option B user is counted to phase 2
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Feb 20, 2024
1 parent fe423e7 commit f97cf64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/ElasticSnapshot/components/SelectTreasuryGrant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ export default function SelectTreasuryGrant() {
const userData = vestingData.find(
item =>
item.receiver.toLowerCase() === account?.toLowerCase() &&
(addressesOptionA.includes(item.receiver.toLowerCase()) || addressesOptionB.includes(item.receiver.toLowerCase)),
(addressesOptionA.includes(item.receiver.toLowerCase()) ||
addressesOptionB.includes(item.receiver.toLowerCase())),
)

const userPhase2 = vestingData.find(
item =>
item.receiver.toLowerCase() === account?.toLowerCase() &&
!addressesOptionA.includes(item.receiver.toLowerCase()) &&
!addressesOptionB.includes(item.receiver.toLowerCase),
!addressesOptionB.includes(item.receiver.toLowerCase()),
)
const user3rdData = vesting3rdData.find(item => item.receiver.toLowerCase() === account?.toLowerCase())
const totalPhase2Value = (user3rdData?.value || 0) + (userPhase2?.value || 0)
Expand Down

0 comments on commit f97cf64

Please sign in to comment.