xrpl.js: Update to 2.0.0b2

This commit is contained in:
mDuo13
2021-09-29 12:10:28 -07:00
parent feaef69da7
commit d4b10f4dfe
7 changed files with 25 additions and 20 deletions

View File

@@ -32,6 +32,9 @@ function lookup_tx_final(api, tx_id, max_ledger, min_ledger) {
[min_ledger, max_ledger] = [max_ledger, min_ledger]
}
// Make sure we're subscribed to the ledger stream to trigger updates
api.request({"command": "subscribe", "streams": ["ledger"]})
// Helper to determine if we (should) know the transaction's final result yet.
// If the server has validated all ledgers the tx could possibly appear in,
// then we should know its final result.

View File

@@ -156,8 +156,8 @@ const set_up_tx_sender = async function() {
try {
// use lookup_tx_final() from submit-and-verify2.js
let final_result_data = await lookup_tx_final(api, tx_id, max_ledger, min_ledger)
let final_result = final_result_data.meta.TransactionResult
let final_result_data = await lookup_tx_final(api, hash, max_ledger, min_ledger)
let final_result = final_result_data.result.meta.TransactionResult
if (!silent) {
if (final_result === "tesSUCCESS") {
successNotif(`${tx_object.TransactionType} tx succeeded (hash: ${hash})`)