Skip to content

Commit

Permalink
sendtx revert
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed May 22, 2024
1 parent 947c7f4 commit 997b73e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/flow-cadut/src/interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,17 @@ export const waitForStatus = statusValue => {
export const sendTransaction = async props => {
const {wait = "seal"} = props
try {
const txId = await fcl.decode(
await prepareInteraction(props, "transaction")
)
const response = await prepareInteraction(props, "transaction")
if (wait) {
const waitMethod = waitForStatus(wait)
const rawResult = await fcl.tx(txId)[waitMethod]()
const rawResult = await fcl.tx(response)[waitMethod]()
const txResult = {
txId,
txId: response,
...rawResult,
}
return [txResult, null]
}
return [txId, null]
return [response.transactionId, null]
} catch (e) {
return [null, e]
}
Expand Down

0 comments on commit 997b73e

Please sign in to comment.