@@ -17,6 +17,7 @@ import {
17
17
useAddress ,
18
18
useClaimConditions ,
19
19
useClaimedNFTSupply ,
20
+ useClaimerProofs ,
20
21
useClaimIneligibilityReasons ,
21
22
useUnclaimedNFTSupply ,
22
23
Web3Button ,
@@ -46,9 +47,8 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
46
47
const debouncedQuantity = useDebounce ( quantity , 500 ) ;
47
48
48
49
const claimConditions = useClaimConditions ( contract ) ;
49
- const activeClaimCondition = useActiveClaimCondition ( contract , undefined , {
50
- withAllowList : true ,
51
- } ) ;
50
+ const activeClaimCondition = useActiveClaimCondition ( contract ) ;
51
+ const claimerProofs = useClaimerProofs ( contract , address || "" ) ;
52
52
const claimIneligibilityReasons = useClaimIneligibilityReasons ( contract , {
53
53
quantity : debouncedQuantity ,
54
54
walletAddress : address || "" ,
@@ -104,9 +104,7 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
104
104
bnMaxClaimable = perTransactionClaimable ;
105
105
}
106
106
107
- const snapshotClaimable = activeClaimCondition . data ?. snapshot ?. find (
108
- ( u ) => u . address . toLowerCase ( ) === address ?. toLowerCase ( ) ,
109
- ) ?. maxClaimable ;
107
+ const snapshotClaimable = claimerProofs . data ?. maxClaimable ;
110
108
111
109
if ( snapshotClaimable ) {
112
110
if ( snapshotClaimable === "0" ) {
@@ -135,11 +133,10 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
135
133
}
136
134
return max . toNumber ( ) ;
137
135
} , [
136
+ claimerProofs . data ?. maxClaimable ,
137
+ unclaimedSupply . data ,
138
138
activeClaimCondition . data ?. maxClaimableSupply ,
139
139
activeClaimCondition . data ?. maxClaimablePerWallet ,
140
- activeClaimCondition . data ?. snapshot ,
141
- address ,
142
- unclaimedSupply . data ,
143
140
] ) ;
144
141
145
142
const isSoldOut = useMemo ( ( ) => {
0 commit comments