diff --git a/content/_code-samples/build-a-wallet/desktop-js/view/7_renderer.js b/content/_code-samples/build-a-wallet/desktop-js/view/7_renderer.js index 306db09768..b690e033f1 100644 --- a/content/_code-samples/build-a-wallet/desktop-js/view/7_renderer.js +++ b/content/_code-samples/build-a-wallet/desktop-js/view/7_renderer.js @@ -92,7 +92,8 @@ sendXrpButtonEl.addEventListener('click', () => { window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount}) }) -window.electronAPI.onSendXrpTransactionFinish((_event) => { +window.electronAPI.onSendXrpTransactionFinish((_event, result) => { + alert('Result: ' + result.result.meta.TransactionResult) destinationAddressEl.value = '' destinationTagEl.value = '' amountEl.value = '' diff --git a/content/_code-samples/build-a-wallet/desktop-js/view/7_send-xrp.html b/content/_code-samples/build-a-wallet/desktop-js/view/7_send-xrp.html index b17e52d682..fc15e5afa7 100644 --- a/content/_code-samples/build-a-wallet/desktop-js/view/7_send-xrp.html +++ b/content/_code-samples/build-a-wallet/desktop-js/view/7_send-xrp.html @@ -98,17 +98,17 @@
- Destination Tag
- Amount of XRP
diff --git a/content/_code-samples/build-a-wallet/desktop-js/view/8_renderer.js b/content/_code-samples/build-a-wallet/desktop-js/view/8_renderer.js index 7992aa1e89..0180d6a78d 100644 --- a/content/_code-samples/build-a-wallet/desktop-js/view/8_renderer.js +++ b/content/_code-samples/build-a-wallet/desktop-js/view/8_renderer.js @@ -105,7 +105,8 @@ sendXrpButtonEl.addEventListener('click', () => { window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount}) }) -window.electronAPI.onSendXrpTransactionFinish((_event) => { +window.electronAPI.onSendXrpTransactionFinish((_event, result) => { + alert('Result: ' + result.result.meta.TransactionResult) destinationAddressEl.value = '' destinationTagEl.value = '' amountEl.value = '' diff --git a/content/tutorials/build-apps/build-a-desktop-wallet-in-javascript.md b/content/tutorials/build-apps/build-a-desktop-wallet-in-javascript.md index e3ec6188ab..2d3aee99b8 100644 --- a/content/tutorials/build-apps/build-a-desktop-wallet-in-javascript.md +++ b/content/tutorials/build-apps/build-a-desktop-wallet-in-javascript.md @@ -1289,7 +1289,8 @@ sendXrpButtonEl.addEventListener('click', () => { window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount}) }) -window.electronAPI.onSendXrpTransactionFinish((_event) => { +window.electronAPI.onSendXrpTransactionFinish((_event, result) => { + alert('Result: ' + result.result.meta.TransactionResult) destinationAddressEl.value = '' destinationTagEl.value = '' amountEl.value = '' @@ -1304,6 +1305,8 @@ npm run start The application should now display a "Send XRP" button in the top right corner, which should open a Modal dialog on clicking. You can use this Dialog to send XRP tokens from this account to another, and the balance update as well as the transaction should be reflected in the app. +If you need an account address to send the XRP to, [you can create an account on the testnet](https://learn.xrpl.org/course/code-with-the-xrpl/lesson/create-accounts-and-send-xrp/). + To run the reference application found in `content/_code-samples/build-a-wallet/desktop-js` for this step, run: ```console