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({