Autofills AccountDelete Fee w/ reserve_inc_xrp (#1639)

* fix: fetch Owner Reserves from ledger
This commit is contained in:
Nathan Nichols
2021-09-24 12:09:54 -07:00
committed by Mayukha Vadari
parent 1747b31a02
commit b3a72588ea
2 changed files with 25 additions and 5 deletions

View File

@@ -140,6 +140,17 @@ describe('client.autofill', function () {
}
this.mockRippled.addResponse('account_info', rippled.account_info.normal)
this.mockRippled.addResponse('ledger', rippled.ledger.normal)
this.mockRippled.addResponse('server_state', {
status: 'success',
type: 'response',
result: {
state: {
validated_ledger: {
reserve_inc: 2000000,
},
},
},
})
this.mockRippled.addResponse('server_info', rippled.server_info.normal)
this.mockRippled.addResponse(
'account_objects',
@@ -147,7 +158,7 @@ describe('client.autofill', function () {
)
const txResult = await this.client.autofill(tx)
assert.strictEqual(txResult.Fee, '5000000')
assert.strictEqual(txResult.Fee, '2000000')
})
it('should autofill Fee of an EscrowFinish transaction with signersCount', async function () {