mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
16 lines
423 B
JavaScript
16 lines
423 B
JavaScript
|
|
import BigNumber from 'bignumber.js'
|
|
import {dropsToXrp} from '../../common'
|
|
|
|
function parseFeeUpdate(tx: Object) {
|
|
const baseFeeDrops = (new BigNumber(tx.BaseFee, 16)).toString()
|
|
return {
|
|
baseFeeXRP: dropsToXrp(baseFeeDrops),
|
|
referenceFeeUnits: tx.ReferenceFeeUnits,
|
|
reserveBaseXRP: dropsToXrp(tx.ReserveBase),
|
|
reserveIncrementXRP: dropsToXrp(tx.ReserveIncrement)
|
|
}
|
|
}
|
|
|
|
export default parseFeeUpdate
|