Hi,
I use reactjs and I have a problem with a transaction. I don’t understand why I can’t pass an Array with fcl.
This is my code :
const tx = await fcl
.send([
fcl.proposer(fcl.authz),
fcl.payer(fcl.authz),
fcl.authorizations([fcl.authz]),
fcl.limit(9999),
fcl.args([
fcl.arg(props.nftsToSell, t.Array(t.UInt64)),
fcl.arg(prix.toFixed(2), t.UFix64),
]),
fcl.ref(block.id),
fcl.transaction(sellSelection),
]);
On the first argument “props.nftsToSell” is an array of integers that contains the ids of two nfts to sell, like this [182,183]. I used parseInt() to get these integers in the array (I read on a forum that by default parseInt() cast in UInt64)
But when I run that, I get this error:
Error: Type Error: Expected integer for UInt64
at f (types.js:16:1)
at Object.asArgument (types.js:137:1)
at types.js:411:1
at Array.map (<anonymous>)
at Object.asArgument (types.js:410:1)
at Dn (resolve-arguments.js:10:1)
at Un (resolve-arguments.js:20:1)
at interaction.js:244:1
Can you help me please to understand my error ?
Thanks you very much for your help