sending payment always logs errors to find possible failure causes

This commit is contained in:
nitowa
2023-05-04 13:06:28 +02:00
parent 04dab07fb5
commit b229e70504
4 changed files with 86 additions and 34 deletions
+15
View File
@@ -35,6 +35,19 @@ describe('XRPIO', () => {
}
})
it('getTransaction with bad hash', function(done){
this.timeout(10000)
api.getTransaction('73FECDA37ABBB2FC17460C5C2467BE6A0A8E1F4EB081FFFFFFFFFFFFFFFFFFFF') //technically this hash could exist, but probably never will
.then(_ => done(new Error('Expected error but succeeded')))
.catch(_ => done())
})
it('sendPayment errors on bad request sequence', function(done){
api.sendPayment({}, receiveWallet.address, sendWallet.secret, -12)
.then(_ => done(new Error('Expected error but succeeded')))
.catch(_ => done())
})
it('getAccountSequence', async function(){
this.timeout(10000)
const seq = await api.getAccountSequence(sendWallet.address)
@@ -50,6 +63,8 @@ describe('XRPIO', () => {
expect(cost).to.be.greaterThan(30)
})
let txHash
it('writeRaw', async function(){
this.timeout(15000)