Skip to content

Commit

Permalink
Merge pull request #70 from paulbalaji/patch-1
Browse files Browse the repository at this point in the history
Fix "invalid BigNumber" for uint256[] arguments
  • Loading branch information
adrianmcli authored Jul 22, 2023
2 parents 9dad7ea + 97adb9e commit 032256b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/features/function-call/useCallFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const useCallFunction = (args, types, fn, opts) => {
// handle array and int types
const processedArgs = args.map((arg, idx) => {
const type = types[idx];
if (type.substring(0, 4) === "uint") return ethers.BigNumber.from(arg);
if (type.slice(-2) === "[]") return JSON.parse(arg);
if (type.substring(0, 4) === "uint") return ethers.BigNumber.from(arg);
return arg;
});

Expand Down

1 comment on commit 032256b

@vercel
Copy link

@vercel vercel bot commented on 032256b Jul 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

eth95 – ./

eth95-git-master-adrianmcli.vercel.app
eth95.dev
eth95.vercel.app
eth95-adrianmcli.vercel.app

Please sign in to comment.