From 5a41746a72bc5bb4820eb8ee208e1d9caf2b7daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Tue, 16 Jul 2024 09:27:50 +0100 Subject: [PATCH] WIP --- example/src/App.tsx | 4 +--- example/src/components/stacks/signTransaction/index.tsx | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index 76e1d49..a4add71 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -64,10 +64,9 @@ function AppWithProviders() { console.error(res2); return; } - setBtcAddressInfo(res2.result.addresses); - const res3 = await Wallet.request('stx_getAddresses', null); + const res3 = await Wallet.request('stx_getAddresses', null); if (res3.status === 'error') { alert( 'Error retrieving stacks addresses after having requested permissions. Details in terminal.' @@ -75,7 +74,6 @@ function AppWithProviders() { console.error(res3); return; } - setStxAddressInfo(res3.result.addresses); })().catch(console.error); }, [setBtcAddressInfo, setStxAddressInfo]); diff --git a/example/src/components/stacks/signTransaction/index.tsx b/example/src/components/stacks/signTransaction/index.tsx index 0502e0c..cda6ce3 100644 --- a/example/src/components/stacks/signTransaction/index.tsx +++ b/example/src/components/stacks/signTransaction/index.tsx @@ -37,6 +37,7 @@ function SignTransaction(props: Props) { const response = await request('stx_signTransaction', { transaction: bytesToHex(transaction.serialize()), + broadcast, }); if (response.status === 'error') { @@ -60,6 +61,7 @@ function SignTransaction(props: Props) { const response = await request('stx_signTransaction', { transaction: bytesToHex(transaction.serialize()), + broadcast, }); if (response.status === 'error') { @@ -83,6 +85,7 @@ function SignTransaction(props: Props) { const response = await request('stx_signTransaction', { transaction: bytesToHex(transaction.serialize()), + broadcast, }); if (response.status === 'error') { @@ -127,7 +130,7 @@ function SignTransaction(props: Props) { } if (contractCallMutation.isSuccess) { - console.log(contractCallMutation.data); + console.log('Signed transaction:', contractCallMutation.data); return

Transaction signed successfully. Check console for details.

; } })()}