Add api.connection.getReserveBase() (#1259)

* Returns the current minimum reserve, in drops of XRP, that is required
for an account.

* Release 1.6.6-beta.2
This commit is contained in:
Elliot Lee
2020-04-27 09:57:35 -07:00
parent 2e81cfb56f
commit c26ddb497e
3 changed files with 45 additions and 24 deletions

View File

@@ -98,6 +98,7 @@ describe('Connection', function() {
)
assert.strictEqual(await this.api.connection.getFeeBase(), 10)
assert.strictEqual(await this.api.connection.getFeeRef(), 10)
assert.strictEqual(await this.api.connection.getReserveBase(), 20000000) // 20 XRP
})
it('with proxy', function(done) {
@@ -378,7 +379,7 @@ describe('Connection', function() {
throw new Error('error on reconnect')
}
// Hook up a listener for the reconnect error event
this.api.on('error', (error, message) => {
this.api.on('error', (error, message) => {
if(error === 'reconnect' && message === 'error on reconnect') {
return done()
}