From 09b1f3b6f09c4840cbf64fc319bca1b1b1975f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 6 Dec 2024 10:39:10 +0100 Subject: [PATCH] fix(#2478): fix double signing of transaction --- CHANGELOG.md | 1 + govtool/frontend/src/context/wallet.tsx | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f956c1c23..0980babc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ changes. - Fix removing a child (link) when is not registed in DOM [Issue 2398](https://github.com/IntersectMBO/govtool/issues/2398) - Fix blank screen on DRep delegation when UTXos are missing [Issue 2408](https://github.com/IntersectMBO/govtool/issues/2408) - Fix broken guides links [Issue 2417](https://github.com/IntersectMBO/govtool/issues/2417) +- Fix double signing of transaction [Issue 2478](https://github.com/IntersectMBO/govtool/issues/2478) ### Changed diff --git a/govtool/frontend/src/context/wallet.tsx b/govtool/frontend/src/context/wallet.tsx index a17b7be31..6df3f77a3 100644 --- a/govtool/frontend/src/context/wallet.tsx +++ b/govtool/frontend/src/context/wallet.tsx @@ -674,12 +674,9 @@ const CardanoProvider = (props: Props) => { // Make a full transaction, passing in empty witness set const tx = Transaction.new(txBody, transactionWitnessSet); // Ask wallet to to provide signature (witnesses) for the transaction - let txVkeyWitnesses; - - txVkeyWitnesses = await walletApi.signTx(tx.to_hex(), true); // Create witness set object using the witnesses provided by the wallet - txVkeyWitnesses = TransactionWitnessSet.from_bytes( + const txVkeyWitnesses = TransactionWitnessSet.from_bytes( Buffer.from(await walletApi.signTx(tx.to_hex(), true), "hex"), ); const vkeys = txVkeyWitnesses.vkeys();