Skip to content

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

@KumarUjjwal2022

Description

@KumarUjjwal2022

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions