Skip to content

Commit

Permalink
Enable support for transferring decimals amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Megumiiiiii authored and QEDK committed Dec 9, 2023
1 parent 27536e2 commit 5857ae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const transfer = async (to: string, value: number, options: {
const api = await initialize(rpcUrl, { noInitWarn: true })
console.warn = tempConsoleWarn
const keyring = getKeyringFromSeed(seed)
const amount = formatNumberToBalance(value)
const amount = new BN(value * 1e18);
const opt: Partial<any> = { nonce: -1 }
if (options.wait !== Wait.No) {
await sendTransferTx(api, to, amount, keyring, opt, options.network, options.wait)
Expand Down

0 comments on commit 5857ae8

Please sign in to comment.