From d3c3d67e1da5a095c9a27f075ec2623aad5d29fe Mon Sep 17 00:00:00 2001 From: Friedger Date: Wed, 25 Oct 2023 18:30:16 +0200 Subject: [PATCH] Remove extra bytesToHex (#110) * fix: remove extra bytesToHex * fix: remove extra bytesToHex --- src/tutorial.md | 5 ++--- src/withdrawal.md | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tutorial.md b/src/tutorial.md index 7a723f1..94cc592 100644 --- a/src/tutorial.md +++ b/src/tutorial.md @@ -965,13 +965,12 @@ export default function WithdrawForm() { const signMessage = async (e) => { e.preventDefault(); - const message = bytesToHex( + const message = sbtcWithdrawMessage({ network: TESTNET, amountSats: satoshis, bitcoinAddress: userData.profile.btcAddress.p2wpkh.testnet, - }) - ); + }); openSignatureRequestPopup({ message, diff --git a/src/withdrawal.md b/src/withdrawal.md index b11b8ac..a1878c7 100644 --- a/src/withdrawal.md +++ b/src/withdrawal.md @@ -40,13 +40,12 @@ export default function WithdrawForm() { // First we need to sign a Stacks message to prove we own the sBTC // The sbtc paclage can help us format this - const message = bytesToHex( + const message = sbtcWithdrawMessage({ network: TESTNET, amountSats: satoshis, bitcoinAddress: userData.profile.btcAddress.p2wpkh.testnet, - }) - ); + }); // Now we can use Leather to sign that message openSignatureRequestPopup({