Lints src/common (#1595)

* lint errors (and remove unused error types)

* lint fee

* lint index

* lint ecdsa

* fix tests

* remove address tests from getFee

* fix more tests

* fix tests

* respond to comments
This commit is contained in:
Mayukha Vadari
2021-09-03 18:32:52 -05:00
parent e200de3073
commit a996fafe79
13 changed files with 137 additions and 152 deletions

View File

@@ -4,7 +4,6 @@ import _ from 'lodash'
import { isValidXAddress } from 'ripple-address-codec'
import { Client } from 'xrpl-local'
import { errors } from 'xrpl-local/common'
import { isValidSecret } from 'xrpl-local/utils'
import { generateXAddress } from '../../src/utils/generateAddress'
@@ -46,24 +45,7 @@ function verifyTransaction(testcase, hash, type, options, txData, account) {
}
return { txJSON: JSON.stringify(txData), id: hash, tx: data }
})
.catch(async (error) => {
if (error instanceof errors.PendingLedgerVersionError) {
console.log('NOT VALIDATED YET...')
return new Promise((resolve, reject) => {
setTimeout(
() =>
verifyTransaction(
testcase,
hash,
type,
options,
txData,
account,
).then(resolve, reject),
INTERVAL,
)
})
}
.catch((error) => {
console.log(error.stack)
assert(false, `Transaction not successful: ${error.message}`)
})