Commit 32be80d9 authored by tom's avatar tom

fix args length for read/simulate method functions

parent e15756e0
......@@ -28,11 +28,14 @@ export default function useCallMethodPublicClient(): (params: Params) => Promise
}
const address = getAddress(addressHash);
// for write payable methods we add additional input for native coin value
// so in simulate mode we need to strip it off
const _args = args.slice(0, item.inputs.length);
const params = {
abi: [ item ],
functionName: item.name,
args: args,
args: _args,
address,
account,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment