mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
fix: prevent getFee from returning NaN from Reporting Mode (#1401)
When using a rippled server in Reporting Mode, the server_info response does not have a load_factor property. https://xrpl.org/rippled-server-modes.html#reporting-mode https://github.com/ripple/rippled/issues/3812 Now, when load_factor is missing, we default to a load_factor of 1. Fix #1398
This commit is contained in:
@@ -51,5 +51,14 @@ export default <TestSuite>{
|
||||
api._feeCushion = 0.9
|
||||
const fee = await api.getFee()
|
||||
assert.strictEqual(fee, '0.000009')
|
||||
},
|
||||
|
||||
'getFee reporting': async (api, address) => {
|
||||
api.connection.request({
|
||||
command: 'config',
|
||||
data: {reporting: true}
|
||||
})
|
||||
const fee = await api.getFee()
|
||||
assert.strictEqual(fee, '0.000012')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user