Skip to content

Commit 3ab79cd

Browse files
committed
SDK, Dashboard: Fix error when airdropping decimal token amount in new token creation flow
1 parent 92896dd commit 3ab79cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export function CreateTokenAssetPage(props: {
179179
chain: contract.chain,
180180
client: props.client,
181181
contents: values.airdropAddresses.map((recipient) => ({
182-
amount: BigInt(recipient.quantity),
182+
amount: recipient.quantity,
183183
recipient: recipient.address,
184184
})),
185185
tokenAddress: contract.address,
@@ -200,8 +200,8 @@ export function CreateTokenAssetPage(props: {
200200
const contract = getDeployedContract({ chain: values.chain });
201201

202202
const totalAmountToAirdrop = values.airdropAddresses.reduce(
203-
(acc, recipient) => acc + BigInt(recipient.quantity),
204-
0n,
203+
(acc, recipient) => acc + Number(recipient.quantity),
204+
0,
205205
);
206206

207207
const entrypoint = await getDeployedEntrypointERC20({

packages/thirdweb/src/tokens/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type PoolConfig = {
2222
};
2323

2424
export type DistributeContent = {
25-
amount: bigint;
25+
amount: string;
2626
recipient: string;
2727
};
2828

0 commit comments

Comments
 (0)