mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-05 05:15:48 +00:00
Improve getTransaction() error when tx has not been validated yet
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
export {RippleAPI} from './api'
|
export * from './api'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
FormattedTransactionType
|
FormattedTransactionType
|
||||||
|
|||||||
@@ -30,8 +30,12 @@ function attachTransactionDate(connection: Connection, tx: any
|
|||||||
|
|
||||||
if (!ledgerVersion) {
|
if (!ledgerVersion) {
|
||||||
return new Promise(() => {
|
return new Promise(() => {
|
||||||
throw new errors.NotFoundError(
|
const error = new errors.NotFoundError(
|
||||||
'ledger_index and LedgerSequence not found in tx')
|
'Transaction has not been validated yet; try again later')
|
||||||
|
error.data = {
|
||||||
|
details: '(ledger_index and LedgerSequence not found in tx)'
|
||||||
|
}
|
||||||
|
throw error
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user