@@ -4,14 +4,14 @@ import { toast } from 'react-hot-toast'
|
|||||||
import { isValidAddress } from './isValidAddress'
|
import { isValidAddress } from './isValidAddress'
|
||||||
|
|
||||||
export const isValidFlexListFile = (file: WhitelistFlexMember[]) => {
|
export const isValidFlexListFile = (file: WhitelistFlexMember[]) => {
|
||||||
let sumOfAmounts = 0
|
// let sumOfAmounts = 0
|
||||||
file.forEach((allocation) => {
|
// file.forEach((allocation) => {
|
||||||
sumOfAmounts += Number(allocation.mint_count)
|
// sumOfAmounts += Number(allocation.mint_count)
|
||||||
})
|
// })
|
||||||
if (sumOfAmounts > 10000) {
|
// if (sumOfAmounts > 10000) {
|
||||||
toast.error(`Total mint count should be less than 10000 tokens (current count: ${sumOfAmounts}))`)
|
// toast.error(`Total mint count should be less than 10000 tokens (current count: ${sumOfAmounts}))`)
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
|
|
||||||
const checks = file.map((account) => {
|
const checks = file.map((account) => {
|
||||||
// Check if address is valid bech32 address
|
// Check if address is valid bech32 address
|
||||||
|
|||||||
Reference in New Issue
Block a user