XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.21k stars 512 forks source link

getBalances() actNotFound #821

Closed prinick96 closed 6 years ago

prinick96 commented 6 years ago

Hello, i have this:

'use strict';
const RippleAPI = require('ripple-lib').RippleAPI;
var XRP = new RippleAPI({
    server: 'wss://s1.ripple.com' 
});

/**
 * Obtiene el balance de una wallet
 * 
 * @param {*} req 
 * @param {*} res 
 */
exports.getBalance = function(req, res) {
    var walletAddress = req.params.wallet;
    XRP.connect().then(() => {
        XRP.getBalances(walletAddress).then(balances => {
          console.log(JSON.stringify(balances, null, 2));
          process.exit();
        }).then(() => {
            return XRP.disconnect();
        }).catch(console.error);
    });
}

And i have this error: imagen

Any idea?

Thanks

sharafian commented 6 years ago

Can you also post the code that calls this function? What parameters are you passing in?

prinick96 commented 6 years ago

I solved this, actNotFound error means when ipple account don't exists because don't are active with 20 XRP.

webzorg commented 5 years ago

My account is active but still I get actNotFound.

intelliot commented 5 years ago

@webzorg What is your account address? Are you on testnet or mainnet? Feel free to open an new issue with details.

webzorg commented 5 years ago

@webzorg What is your account address? Are you on testnet or mainnet? Feel free to open an new issue with details.

resolved, node took time to get in sync or something like that (testnet)