Skip to content

Commit 43fd692

Browse files
Update max mint for erc20 (#103)
1 parent 93abe12 commit 43fd692

File tree

4 files changed

+39
-40
lines changed

4 files changed

+39
-40
lines changed

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
"@chakra-ui/react": "^2.1.0",
5050
"@emotion/react": "^11",
5151
"@emotion/styled": "^11",
52-
"@thirdweb-dev/react": "^3.12.3-nightly-4a1d7581-20230522211849",
53-
"@thirdweb-dev/sdk": "^3.10.18-nightly-4a1d7581-20230522211849",
52+
"@thirdweb-dev/chains": "^0.1.19-nightly-6fd10f94-20230522224908",
53+
"@thirdweb-dev/react": "^3.12.3-nightly-6fd10f94-20230522224908",
54+
"@thirdweb-dev/sdk": "^3.10.18-nightly-6fd10f94-20230522224908",
5455
"@thirdweb-dev/storage": "^1.1.3-nightly-99ffa8ce-20230519182359",
5556
"color": "^4.2.3",
5657
"ethers": "^5.7.0",

src/shared/claim-button-erc1155.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
ColorMode,
32
Flex,
43
NumberDecrementStepper,
54
NumberIncrementStepper,

src/shared/claim-button-erc20.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
ColorMode,
32
Flex,
43
NumberDecrementStepper,
54
NumberIncrementStepper,
@@ -63,7 +62,7 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
6362
try {
6463
return BigNumber.from(activeClaimCondition.data?.availableSupply || 0);
6564
} catch {
66-
return BigNumber.from(1_000_000_000);
65+
return BigNumber.from(1_000_000_000_000);
6766
}
6867
}, [activeClaimCondition.data?.availableSupply]);
6968

@@ -75,7 +74,7 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
7574
const n = totalAvailableSupply.add(
7675
BigNumber.from(claimedSupply.data?.value || 0),
7776
);
78-
if (n.gte(1_000_000_000)) {
77+
if (n.gte(1_000_000_000_000)) {
7978
return "";
8079
}
8180
return n.toString();
@@ -103,7 +102,7 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
103102
activeClaimCondition.data?.maxClaimableSupply || 0,
104103
);
105104
} catch (e) {
106-
bnMaxClaimable = BigNumber.from(1_000_000_000);
105+
bnMaxClaimable = BigNumber.from(1_000_000_000_000);
107106
}
108107

109108
let perTransactionClaimable;
@@ -112,7 +111,7 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
112111
activeClaimCondition.data?.maxClaimablePerWallet || 0,
113112
);
114113
} catch (e) {
115-
perTransactionClaimable = BigNumber.from(1_000_000_000);
114+
perTransactionClaimable = BigNumber.from(1_000_000_000_000);
116115
}
117116

118117
if (perTransactionClaimable.lte(bnMaxClaimable)) {
@@ -124,7 +123,7 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
124123
if (snapshotClaimable) {
125124
if (snapshotClaimable === "0") {
126125
// allowed unlimited for the snapshot
127-
bnMaxClaimable = BigNumber.from(1_000_000_000);
126+
bnMaxClaimable = BigNumber.from(1_000_000_000_000);
128127
} else {
129128
try {
130129
bnMaxClaimable = BigNumber.from(snapshotClaimable);
@@ -141,8 +140,8 @@ export const ERC20ClaimButton: React.FC<ClaimButtonProps> = ({
141140
max = bnMaxClaimable;
142141
}
143142

144-
if (max.gte(1_000_000_000)) {
145-
return 1_000_000_000;
143+
if (max.gte(1_000_000_000_000)) {
144+
return 1_000_000_000_000;
146145
}
147146
return max.toNumber();
148147
}, [

yarn.lock

+29-29
Original file line numberDiff line numberDiff line change
@@ -3321,10 +3321,10 @@
33213321
"@types/use-sync-external-store" "^0.0.3"
33223322
use-sync-external-store "^1.2.0"
33233323

3324-
"@thirdweb-dev/[email protected].18":
3325-
version "0.1.18"
3326-
resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.18.tgz#deb081e33b91d402f2e86a72528a9f9803877fce"
3327-
integrity sha512-SoWWDugdYNWl7bKMtw/OtO9IN461G+GktzOSWmpsI49wz2GBMdGLR1QznyR3oswoOngUeM8+vOyqlP7zC/fWLA==
3324+
"@thirdweb-dev/[email protected].19-nightly-6fd10f94-20230522224908", "@thirdweb-dev/chains@^0.1.19-nightly-6fd10f94-20230522224908":
3325+
version "0.1.19-nightly-6fd10f94-20230522224908"
3326+
resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.19-nightly-6fd10f94-20230522224908.tgz#00d4e961ff54b5d78e47923c0be507bdb6c77cb0"
3327+
integrity sha512-dPr7ScI7gREM8bwW7OH2hlaVzXbajG0VfpzusaSswtQyHgNc6Vj1gzEi772Rj7hmmjXIYodvPEdA+cqJwjKryg==
33283328

33293329
"@thirdweb-dev/[email protected]":
33303330
version "1.3.4"
@@ -3343,24 +3343,24 @@
33433343
resolved "https://registry.yarnpkg.com/@thirdweb-dev/generated-abis/-/generated-abis-0.0.1.tgz#0d788d6aff0ac08f11e9eeb9ae4c8321845272a8"
33443344
integrity sha512-vO9/3lSLO8smyyH1QVeYravSTzFwV1nf1C/Im1NBDPdH8//YvcbhtETGGiNfHWpyCvSi0vRYwvf+/7FKdwpDGQ==
33453345

3346-
"@thirdweb-dev/[email protected]4a1d7581-20230522211849":
3347-
version "3.12.3-nightly-4a1d7581-20230522211849"
3348-
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-3.12.3-nightly-4a1d7581-20230522211849.tgz#cda977d1bd0efc680155e58d63a357b83e8483fb"
3349-
integrity sha512-fNlMFuGyJ4J9Qg9OL57xezxZ05Isg7fvtAguGVIN/RNpQU4EJFcZoFjevEq0cjZi0UXkYyDDqyc13Itfqe6Eqg==
3346+
"@thirdweb-dev/[email protected]6fd10f94-20230522224908":
3347+
version "3.12.3-nightly-6fd10f94-20230522224908"
3348+
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-3.12.3-nightly-6fd10f94-20230522224908.tgz#37b2a07aaf8c5aaae02a6e64cbc183b7de1da874"
3349+
integrity sha512-CSyVzdKYC1rtABPl6AM3uvaGoKpqlDfrzjGi0ezxpUwB1WhNEO1FZfvYB8IvLJ1gS8O62eXBAbSI6DnGEGy/4g==
33503350
dependencies:
33513351
"@tanstack/react-query" "^4.0.10"
3352-
"@thirdweb-dev/chains" "0.1.18"
3352+
"@thirdweb-dev/chains" "0.1.19-nightly-6fd10f94-20230522224908"
33533353
"@thirdweb-dev/generated-abis" "^0.0.1"
3354-
"@thirdweb-dev/sdk" "3.10.18-nightly-4a1d7581-20230522211849"
3354+
"@thirdweb-dev/sdk" "3.10.18-nightly-6fd10f94-20230522224908"
33553355
"@thirdweb-dev/storage" "1.1.3"
3356-
"@thirdweb-dev/wallets" "0.2.23-nightly-4a1d7581-20230522211849"
3356+
"@thirdweb-dev/wallets" "0.2.23-nightly-6fd10f94-20230522224908"
33573357
mime "3.0.0"
33583358
tiny-invariant "^1.2.0"
33593359

3360-
"@thirdweb-dev/react@^3.12.3-nightly-4a1d7581-20230522211849":
3361-
version "3.12.3-nightly-4a1d7581-20230522211849"
3362-
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-3.12.3-nightly-4a1d7581-20230522211849.tgz#e460bc0129c1bb331b4e214f1e1d13aab7363586"
3363-
integrity sha512-PwDyLuY/I1X0adOgaOkf7GC+eeac2gy0rLEribfngQzuMd1tTszEGs/xL2q/+5jdMARzAAR6/6KsNZRPYdnwpg==
3360+
"@thirdweb-dev/react@^3.12.3-nightly-6fd10f94-20230522224908":
3361+
version "3.12.3-nightly-6fd10f94-20230522224908"
3362+
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-3.12.3-nightly-6fd10f94-20230522224908.tgz#72300fb924124b4176a95c77464fc791443369b9"
3363+
integrity sha512-mSuwNKtJipgqHYdbvtnkU5OebLgTLdrA5i+VlLIzD0rNrW0Jf0NCPuV7wKqxg85Ww3WYY6lI5rm26pviXfp4hg==
33643364
dependencies:
33653365
"@emotion/react" "^11.10.0"
33663366
"@emotion/styled" "^11.10.0"
@@ -3374,22 +3374,22 @@
33743374
"@radix-ui/react-tooltip" "^1.0.4"
33753375
"@react-icons/all-files" "^4.1.0"
33763376
"@tanstack/react-query" "^4.0.10"
3377-
"@thirdweb-dev/chains" "0.1.18"
3378-
"@thirdweb-dev/react-core" "3.12.3-nightly-4a1d7581-20230522211849"
3379-
"@thirdweb-dev/wallets" "0.2.23-nightly-4a1d7581-20230522211849"
3377+
"@thirdweb-dev/chains" "0.1.19-nightly-6fd10f94-20230522224908"
3378+
"@thirdweb-dev/react-core" "3.12.3-nightly-6fd10f94-20230522224908"
3379+
"@thirdweb-dev/wallets" "0.2.23-nightly-6fd10f94-20230522224908"
33803380
buffer "^6.0.3"
33813381
copy-to-clipboard "^3.3.2"
33823382
detect-browser "^5.3.0"
33833383
fuse.js "^6.6.2"
33843384
react-qr-code "^2.0.11"
33853385
tiny-invariant "^1.2.0"
33863386

3387-
"@thirdweb-dev/[email protected]4a1d7581-20230522211849", "@thirdweb-dev/sdk@^3.10.18-nightly-4a1d7581-20230522211849":
3388-
version "3.10.18-nightly-4a1d7581-20230522211849"
3389-
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-3.10.18-nightly-4a1d7581-20230522211849.tgz#b4236123b1f188ffdfbe29bbcdeef5668ec72283"
3390-
integrity sha512-QzHk0FVcBU/oVymPtLbMts4bb/JoSp1hFL82FIEZdyu607O8/LV8TfgKk4BJeqQAVH/cjjS+sCea7tyrXmYFYQ==
3387+
"@thirdweb-dev/[email protected]6fd10f94-20230522224908", "@thirdweb-dev/sdk@^3.10.18-nightly-6fd10f94-20230522224908":
3388+
version "3.10.18-nightly-6fd10f94-20230522224908"
3389+
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-3.10.18-nightly-6fd10f94-20230522224908.tgz#ed5dfbb7a9e290470d6cad113b601dd8686fe957"
3390+
integrity sha512-DruMFOwo+ydRzcRnNye4+yPUBfXY08isF1akLtrsIqwb0m+Rq2nQ79pqAS0x7LEY9Hp2R19zK0YsM9jx3ZQJag==
33913391
dependencies:
3392-
"@thirdweb-dev/chains" "0.1.18"
3392+
"@thirdweb-dev/chains" "0.1.19-nightly-6fd10f94-20230522224908"
33933393
"@thirdweb-dev/contracts-js" "1.3.4"
33943394
"@thirdweb-dev/generated-abis" "0.0.1"
33953395
"@thirdweb-dev/storage" "1.1.3"
@@ -3427,10 +3427,10 @@
34273427
ipfs-unixfs-importer "^7.0.1"
34283428
uuid "^9.0.0"
34293429

3430-
"@thirdweb-dev/[email protected]4a1d7581-20230522211849":
3431-
version "0.2.23-nightly-4a1d7581-20230522211849"
3432-
resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-0.2.23-nightly-4a1d7581-20230522211849.tgz#0a63e046f445be2eb34e3a5606dbcd7e1d998406"
3433-
integrity sha512-mIn3KPOJK8NuSmmJvj7Nx4eDDeQLF3PjmtuTEoW8BbbWxTj72fx/2kez/WU3w7AMTJzrWTNQq0HpzqrXPa/00A==
3430+
"@thirdweb-dev/[email protected]6fd10f94-20230522224908":
3431+
version "0.2.23-nightly-6fd10f94-20230522224908"
3432+
resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-0.2.23-nightly-6fd10f94-20230522224908.tgz#394c78b104845d0872252760eab7048dc8560e19"
3433+
integrity sha512-OieYwE3PShVVyhSzWwoRewzIUJJ+xNVIgwzZJemYznjWHxkJWUIaJLidHgtI9z1DggK7ouKh93sZKI04z5Xuxw==
34343434
dependencies:
34353435
"@account-abstraction/contracts" "^0.5.0"
34363436
"@account-abstraction/sdk" "^0.5.0"
@@ -3443,8 +3443,8 @@
34433443
"@safe-global/safe-core-sdk" "^3.3.2"
34443444
"@safe-global/safe-ethers-adapters" "^0.1.0-alpha.16"
34453445
"@safe-global/safe-ethers-lib" "^1.9.2"
3446-
"@thirdweb-dev/chains" "0.1.18"
3447-
"@thirdweb-dev/sdk" "3.10.18-nightly-4a1d7581-20230522211849"
3446+
"@thirdweb-dev/chains" "0.1.19-nightly-6fd10f94-20230522224908"
3447+
"@thirdweb-dev/sdk" "3.10.18-nightly-6fd10f94-20230522224908"
34483448
"@walletconnect/client" "^1.8.0"
34493449
"@walletconnect/core" "2.7.3"
34503450
"@walletconnect/ethereum-provider" "2.6.0"

0 commit comments

Comments
 (0)