mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +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 {
|
||||
FormattedTransactionType
|
||||
|
||||
@@ -30,8 +30,12 @@ function attachTransactionDate(connection: Connection, tx: any
|
||||
|
||||
if (!ledgerVersion) {
|
||||
return new Promise(() => {
|
||||
throw new errors.NotFoundError(
|
||||
'ledger_index and LedgerSequence not found in tx')
|
||||
const error = new errors.NotFoundError(
|
||||
'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