Skip to content

Commit

Permalink
Merge pull request #23 from Ktl-XV/fix/erc20-amount
Browse files Browse the repository at this point in the history
fix(transferfunds): remove the second time the ERC20 amount was being decimal adjusted
  • Loading branch information
Rubilmax committed Sep 14, 2023
2 parents 9a90b4c + 0f169ff commit 84cf27a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,10 @@ export const createSafeTx = async (provider: string) => {
});

to = await inputAddress({ message: prefix + `Recipient address` });
const amount = parseUnits(
await input({
message: prefix + `Amount`,
validate: trial((value) => !!parseUnits(value, decimals), "Invalid amount"),
}),
decimals
);
const amount = await input({
message: prefix + `Amount`,
validate: trial((value) => !!parseUnits(value, decimals), "Invalid amount"),
});

txs.push(
encodeSingle({ id: "", type: txType, to, token, amount: amount.toString(), decimals })
Expand Down

0 comments on commit 84cf27a

Please sign in to comment.