xrpl.js: working send xrp sample code, etc.

This commit is contained in:
mDuo13
2021-09-27 15:31:41 -07:00
parent 8ef2c87a21
commit feaef69da7
5 changed files with 65 additions and 49 deletions

View File

@@ -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")

View File

@@ -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

File diff suppressed because one or more lines are too long