From 435d73346fef492564aaa9482992cc360f2f4129 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 14:45:38 -0700 Subject: [PATCH 1/2] Decode Transaction ID --- packages/flow-cadut/src/interactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index a06ad01..aeccdb6 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,7 +113,7 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const response = await prepareInteraction(props, "transaction") + const response = await fcl.decode(await prepareInteraction(props, "transaction")) if (wait) { const waitMethod = waitForStatus(wait) const rawResult = await fcl.tx(response)[waitMethod]() From 8c0069a300c1718dd12b96b82137f7f143944989 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 14:46:48 -0700 Subject: [PATCH 2/2] fix txid return --- packages/flow-cadut/src/interactions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index aeccdb6..5677c16 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,17 +113,17 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const response = await fcl.decode(await prepareInteraction(props, "transaction")) + const txId = await fcl.decode(await prepareInteraction(props, "transaction")) if (wait) { const waitMethod = waitForStatus(wait) const rawResult = await fcl.tx(response)[waitMethod]() const txResult = { - txId: response, + txId, ...rawResult, } return [txResult, null] } - return [response.transactionId, null] + return [txId, null] } catch (e) { return [null, e] }