Skip to content

Commit

Permalink
fix: broadcast example
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCQL committed Oct 25, 2023
1 parent d4e238a commit 35e5ac1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/solid-vite/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,15 @@ const App: Component = () => {
const fee = await wallet.estimateFee(tx);
console.log("Tx fee:", fee);

const { txResponse } = await wallet.broadcastTx(tx, fee);
console.log("Tx result:", txResponse);
const txHash = await wallet.broadcastTx(tx, fee);
console.log("Tx hash:", txHash);

const { txResponse } = await wallet.pollTx(txHash);
console.log("Tx response:", txResponse);

alert(
"Broadcast success!\n\nTx hash: " +
txResponse.txhash +
txHash +
"\n\nCheck console logs for details."
);
} catch (err) {
Expand Down

0 comments on commit 35e5ac1

Please sign in to comment.