@@ -17,6 +17,7 @@ import {
1717 useAddress ,
1818 useClaimConditions ,
1919 useClaimedNFTSupply ,
20+ useClaimerProofs ,
2021 useClaimIneligibilityReasons ,
2122 useUnclaimedNFTSupply ,
2223 Web3Button ,
@@ -46,9 +47,8 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
4647 const debouncedQuantity = useDebounce ( quantity , 500 ) ;
4748
4849 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 || "" ) ;
5252 const claimIneligibilityReasons = useClaimIneligibilityReasons ( contract , {
5353 quantity : debouncedQuantity ,
5454 walletAddress : address || "" ,
@@ -104,9 +104,7 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
104104 bnMaxClaimable = perTransactionClaimable ;
105105 }
106106
107- const snapshotClaimable = activeClaimCondition . data ?. snapshot ?. find (
108- ( u ) => u . address . toLowerCase ( ) === address ?. toLowerCase ( ) ,
109- ) ?. maxClaimable ;
107+ const snapshotClaimable = claimerProofs . data ?. maxClaimable ;
110108
111109 if ( snapshotClaimable ) {
112110 if ( snapshotClaimable === "0" ) {
@@ -135,11 +133,10 @@ export const ERC721ClaimButton: React.FC<ClaimButtoProps> = ({
135133 }
136134 return max . toNumber ( ) ;
137135 } , [
136+ claimerProofs . data ?. maxClaimable ,
137+ unclaimedSupply . data ,
138138 activeClaimCondition . data ?. maxClaimableSupply ,
139139 activeClaimCondition . data ?. maxClaimablePerWallet ,
140- activeClaimCondition . data ?. snapshot ,
141- address ,
142- unclaimedSupply . data ,
143140 ] ) ;
144141
145142 const isSoldOut = useMemo ( ( ) => {
0 commit comments