From 27bf5dcd40c5cafd12eebae5400fda3de68ad11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20G=C3=A1mez=20Franco?= Date: Wed, 7 Aug 2024 20:20:46 +0200 Subject: [PATCH 1/2] Update the sign() example to indicate the sign() function returns a signed transaction that can be directly posted to the network. --- api/sign.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/sign.md b/api/sign.md index 047be78..b8ca117 100644 --- a/api/sign.md +++ b/api/sign.md @@ -76,10 +76,13 @@ let transaction = await arweave.createTransaction({ }); // sign using arweave-js -const signedFields = await window.arweaveWallet.sign(transaction); +const signedTransaction = await window.arweaveWallet.sign(transaction); + +// TODO: post `signedTransaction` to the network or... + +// ...update the original transaction's fields with the signed transaction's +// fields: -// update transaction fields with the -// signed transaction's fields transaction.setSignature({ id: signedFields.id, owner: signedFields.owner, @@ -88,5 +91,5 @@ transaction.setSignature({ signature: signedFields.signature }); -// TODO: post the transaction to the network +// TODO: and post `transaction` the transaction to the network ``` From d8bc0f0fe23352689e13fdf0a69f4b5f1867fff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20G=C3=A1mez=20Franco?= Date: Wed, 7 Aug 2024 20:23:17 +0200 Subject: [PATCH 2/2] Remove repeated word. --- api/sign.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/sign.md b/api/sign.md index b8ca117..1e2666a 100644 --- a/api/sign.md +++ b/api/sign.md @@ -81,7 +81,7 @@ const signedTransaction = await window.arweaveWallet.sign(transaction); // TODO: post `signedTransaction` to the network or... // ...update the original transaction's fields with the signed transaction's -// fields: +// fields... transaction.setSignature({ id: signedFields.id, @@ -91,5 +91,5 @@ transaction.setSignature({ signature: signedFields.signature }); -// TODO: and post `transaction` the transaction to the network +// TODO: ...and post `transaction` to the network ```