From 0cde0284ce0080f1170d4c7b9125b9b5d169bdbb 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 | 2 +- govtool/frontend/src/context/wallet.tsx | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f956c1c23..836831e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ changes. ### Fixed -- +- 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();