mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Improved Step 7
This commit is contained in:
@@ -92,7 +92,8 @@ sendXrpButtonEl.addEventListener('click', () => {
|
|||||||
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
||||||
})
|
})
|
||||||
|
|
||||||
window.electronAPI.onSendXrpTransactionFinish((_event) => {
|
window.electronAPI.onSendXrpTransactionFinish((_event, result) => {
|
||||||
|
alert('Result: ' + result.result.meta.TransactionResult)
|
||||||
destinationAddressEl.value = ''
|
destinationAddressEl.value = ''
|
||||||
destinationTagEl.value = ''
|
destinationTagEl.value = ''
|
||||||
amountEl.value = ''
|
amountEl.value = ''
|
||||||
|
|||||||
@@ -98,17 +98,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" class="form-control" placeholder="r9jEyy3nrB8D7uRc5w2k3tizKQ1q8cpeHU"
|
<input type="text" class="form-control" value="rP4zcp52pa7ZjhjtU9LrnFcitBUadNW8Xz"
|
||||||
id="input-destination-address">
|
id="input-destination-address">
|
||||||
<span class="input-group-text">To (Address)</span>
|
<span class="input-group-text">To (Address)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" class="form-control" placeholder="12345"
|
<input type="text" class="form-control" value="12345"
|
||||||
id="input-destination-tag">
|
id="input-destination-tag">
|
||||||
<span class="input-group-text">Destination Tag</span>
|
<span class="input-group-text">Destination Tag</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" class="form-control" placeholder="100"
|
<input type="text" class="form-control" value="100"
|
||||||
id="input-xrp-amount">
|
id="input-xrp-amount">
|
||||||
<span class="input-group-text">Amount of XRP</span>
|
<span class="input-group-text">Amount of XRP</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,17 +101,17 @@
|
|||||||
<div class="accountVerificationIndicator">
|
<div class="accountVerificationIndicator">
|
||||||
<span>Verification status:</span>
|
<span>Verification status:</span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" placeholder="rn95xwUymaMyzAKnZUGuynjZ6qk9RzV4Q7"
|
<input type="text" class="form-control" value="rP4zcp52pa7ZjhjtU9LrnFcitBUadNW8Xz"
|
||||||
id="input-destination-address">
|
id="input-destination-address">
|
||||||
<span class="input-group-text">To (Address)</span>
|
<span class="input-group-text">To (Address)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" class="form-control" placeholder="12345"
|
<input type="text" class="form-control" value="12345"
|
||||||
id="input-destination-tag">
|
id="input-destination-tag">
|
||||||
<span class="input-group-text">Destination Tag</span>
|
<span class="input-group-text">Destination Tag</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" class="form-control" placeholder="100"
|
<input type="text" class="form-control" value="100"
|
||||||
id="input-xrp-amount">
|
id="input-xrp-amount">
|
||||||
<span class="input-group-text">Amount of XRP</span>
|
<span class="input-group-text">Amount of XRP</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ sendXrpButtonEl.addEventListener('click', () => {
|
|||||||
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
||||||
})
|
})
|
||||||
|
|
||||||
window.electronAPI.onSendXrpTransactionFinish((_event) => {
|
window.electronAPI.onSendXrpTransactionFinish((_event, result) => {
|
||||||
|
alert('Result: ' + result.result.meta.TransactionResult)
|
||||||
destinationAddressEl.value = ''
|
destinationAddressEl.value = ''
|
||||||
destinationTagEl.value = ''
|
destinationTagEl.value = ''
|
||||||
amountEl.value = ''
|
amountEl.value = ''
|
||||||
|
|||||||
@@ -1289,7 +1289,8 @@ sendXrpButtonEl.addEventListener('click', () => {
|
|||||||
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
window.electronAPI.onClickSendXrp({destinationAddress, destinationTag, amount})
|
||||||
})
|
})
|
||||||
|
|
||||||
window.electronAPI.onSendXrpTransactionFinish((_event) => {
|
window.electronAPI.onSendXrpTransactionFinish((_event, result) => {
|
||||||
|
alert('Result: ' + result.result.meta.TransactionResult)
|
||||||
destinationAddressEl.value = ''
|
destinationAddressEl.value = ''
|
||||||
destinationTagEl.value = ''
|
destinationTagEl.value = ''
|
||||||
amountEl.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.
|
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:
|
To run the reference application found in `content/_code-samples/build-a-wallet/desktop-js` for this step, run:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|||||||
Reference in New Issue
Block a user