mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
xrpl.js: Update to 2.0.0b2
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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})`)
|
||||
|
||||
Reference in New Issue
Block a user