interledgerjs/moneyd-uplink-xrp

After upgrading to v1.2.2 of moneyd-uplink-xrp, moneyd xrp:info reports wrong data

jonaagenilsen opened this issue · 3 comments

Upgraded with npm.

account: rN3HmkFCmZJUVPhSiugNGLL36eH9euRDHF
balance: 55.926033 XRP
reserved: 2520 XRP
available: -2464.073967 XRP

Both reserved & available is totally wrong.

Confirmed on five Codius-hosts where both OS and all Codius-componets are upgraded. CentOS 7.5.

Something is prob wrong with these lines here:

moneyd-uplink-xrp/index.js

Lines 149 to 152 in 1ee9c3b

const serverInfo = await api.getServerInfo()
const reserveBase = serverInfo.validatedLedger.reserveBaseXRP
const reserveInc = serverInfo.validatedLedger.reserveIncrementXRP
const reserved = res.ownerCount * reserveInc + reserveBase

I'll try to see if I can figure it out

resolved by #22 in v1.2.3