XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Wrong xrpBalance on API Tests #2371

Closed oosswwaalldd closed 5 years ago

oosswwaalldd commented 6 years ago

Hi,

I am running some tests with nodeJs , after I connect to the ws:

const api = new RippleAPI({ server: 'wss://s1.ripple.com' // Public rippled server // server: 'wss://s.altnet.rippletest.net:51233' //Test })

ant then I issue an account balance query:

api.getAccountInfo('rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh')

this is the result for my account balance:

{ sequence: 14183, xrpBalance: '66069.763766', ownerCount: 0, previousAffectingTransactionID: '5B822216450A6AA0FAFD99FB6D83D4966DF5BE4A6A59A68EB0D99CED25D57A3E', previousAffectingTransactionLedgerVersion: 36336537 }

and the result for api.getBalances('rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh', { currency: 'XRP' })

is:

[ { currency: 'XRP', value: '74065.166413' } ]

The balances: 66069.763766 XRP and 74065.166413 XRP are not the real balances I have now in that address, the real balance is 2183.2425 XRP

I am missing some kind of conversion rate here?

I know i am the one with the confusion instead of the network.

I will appreciate any help

Thanks

MarkusTeufelberger commented 6 years ago

Seems related to ripple-lib, not so much to rippled...?

oosswwaalldd commented 6 years ago

Yes I am using ripple-lib

const RippleAPI = require('ripple-lib').RippleAPI

syeduali93 commented 6 years ago

I think this issue should be going to ripple-lib @oosswwaalldd

nbougalis commented 5 years ago

This issue just doesn't have enough information for us to make a determination one way or another. If you believe this issue persists, please open an issue in https://github.com/ripple/ripple-lib and we can go from there @oosswwaalldd. Thanks.