Merge pull request #93 from public-awesome/update_check_wallet_balance
Update checkWalletBalance() to cover Base Minter instantiation
This commit is contained in:
commit
489c53ed23
@ -816,12 +816,12 @@ const CollectionCreationPage: NextPage = () => {
|
||||
|
||||
const checkwalletBalance = () => {
|
||||
if (!wallet.initialized) throw new Error('Wallet not connected.')
|
||||
if (whitelistDetails?.whitelistType === 'new' && whitelistDetails.memberLimit) {
|
||||
if (minterType === 'vending' && whitelistDetails?.whitelistType === 'new' && whitelistDetails.memberLimit) {
|
||||
const amountNeeded = Math.ceil(Number(whitelistDetails.memberLimit) / 1000) * 100000000 + 2500000000
|
||||
if (amountNeeded >= Number(wallet.balance[0].amount))
|
||||
throw new Error('Insufficient wallet balance to instantiate the required contracts.')
|
||||
} else {
|
||||
const amountNeeded = 2500000000
|
||||
const amountNeeded = minterType === 'vending' ? 2500000000 : 1000000000
|
||||
if (amountNeeded >= Number(wallet.balance[0].amount))
|
||||
throw new Error('Insufficient wallet balance to instantiate the required contracts.')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user