Skip to content

Commit

Permalink
decode response
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Feb 27, 2024
1 parent 502a166 commit 765af53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/FundAccountSubmitted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ access(all) fun main(account: Address): UFix64 {
return vaultRef.balance
}`

const balance = await sendScript({
const res = await sendScript({
script: balanceScript,
args: [fcl.arg(addressArg, addressArgType)],
})
setBalance(balance)
setBalance(res)
} catch (error) {
setBalance("--")
setBalanceError("An error occurred")
Expand Down
2 changes: 1 addition & 1 deletion lib/flow/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ export async function sendScript({
script: string
args: fcl.TransactionArg[]
}) {
return await fcl.send([fcl.script(script), fcl.args(args)])
return fcl.send([fcl.script(script), fcl.args(args)]).then(fcl.decode)
}

0 comments on commit 765af53

Please sign in to comment.