mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
xrpl.js: working send xrp sample code, etc.
This commit is contained in:
@@ -79,19 +79,18 @@ $("#get-tx-button").click( async function(event) {
|
||||
|
||||
try {
|
||||
const tx = await api.request({
|
||||
command: "tx",
|
||||
transaction: txID,
|
||||
min_ledger: earliestLedgerVersion,
|
||||
max_ledger: lastLedgerSequence
|
||||
})
|
||||
command: "tx",
|
||||
transaction: txID,
|
||||
min_ledger: earliestLedgerVersion,
|
||||
max_ledger: lastLedgerSequence
|
||||
})
|
||||
|
||||
block.find(".output-area").html(
|
||||
"<div><strong>Transaction result:</strong> " +
|
||||
tx.result + "</div>" +
|
||||
// TODO: restore some "balance changes" functionality based on what xrpl.js 2.0 offers.
|
||||
//"<div><strong>Balance changes:</strong> <pre><code>" +
|
||||
//pretty_print(tx.outcome.balanceChanges) +
|
||||
"</pre></code></div>"
|
||||
`<div><strong>Transaction result code:</strong>
|
||||
${tx.result.meta.TransactionResult} (${tx.result.validated ? "validated": "pending"})</div>
|
||||
<div><strong>XRP Delivered:</strong>
|
||||
${xrpl.dropsToXrp(tx.meta.delivered_amount)} XRP
|
||||
</div>`
|
||||
)
|
||||
|
||||
complete_step("Check")
|
||||
|
||||
@@ -195,7 +195,7 @@ const set_up_tx_sender = async function() {
|
||||
$("#pp_progress .progress-bar").addClass("progress-bar-animated")
|
||||
// 1. Get a funded address to use as issuer
|
||||
try {
|
||||
pp_issuer_wallet = await api.getFaucetWallet()
|
||||
pp_issuer_wallet = await api.generateFaucetWallet()
|
||||
} catch(error) {
|
||||
console.log("Error getting issuer address for partial payments:", error)
|
||||
return
|
||||
|
||||
2
assets/js/xrpl-2.0b0.min.js
vendored
2
assets/js/xrpl-2.0b0.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user