Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ALL_CONNECTIONS_FAILED: All endpoints are offline (or don't provide full history) using xrpl-txdata version-1.2.1 #3

Open
KumarUjjwal2022 opened this issue Aug 4, 2023 · 2 comments

Comments

@KumarUjjwal2022
Copy link

Hi Team,

I am getting this issue i.e. ALL_CONNECTIONS_FAILED: All endpoints are offline (or don't provide full history) while using xrpl-txdata version 1.2.1 in nodejs version 18.16.0 from few days while verifying xrpl NFT exchange transaction and this is public platform.

My code to verify transaction is :-
'use strict';
require("dotenv").config();
const { XummSdk } = require("xumm-sdk");
const { TxData } = require('xrpl-txdata');
const XUMM_API_KEY = process.env.XUMM_API_KEY;
const XUMM_API_SECRET = process.env.XUMM_API_SECRET;
const Sdk = new XummSdk(XUMM_API_KEY, XUMM_API_SECRET);
const VerifyTx = new TxData([
'wss://xrplcluster.com',
'wss://s2.ripple.com',
'wss://xrpl.link'
], {
EndpointTimeoutMs: 750,
OverallTimeoutMs: 5000,
AllowNoFullHistory: false
})

/* Verify Transaction with Tx Id*/
async function verifyTransaction(resolveData) {
try {
const result = await Sdk.payload.get(resolveData.payload_uuidv4)
const VerifiedResult = await VerifyTx.get(result.response.txid, 20)
const { meta: { TransactionResult }} = VerifiedResult.result;
const balanceCheck = isEmpty(VerifiedResult.balanceChanges);
return { balanceCheck, TransactionResult };
} catch (error) {
console.log("error verifytransaction",error)
return {error};
}
}

function isEmpty(obj) {
return Object.keys(obj).length === 0;
}

module.exports = { verifyTransaction };

Please suggest me what to do, Should I update npm package or what is the solution?
Thanking for any help.

@WietseWind
Copy link
Member

Can you please retry with version 1.3.0 (the lastest on NPM)

@KumarUjjwal2022
Copy link
Author

Thanks @WietseWind , Let me update NPM once. I'll inform you, When updated. As its working in my local environment but fails on production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants