Skip to content

Commit

Permalink
fix ledger api_version and use different url for amendment backtracking
Browse files Browse the repository at this point in the history
  • Loading branch information
pdp2121 committed Jan 22, 2025
1 parent 66c023f commit b3f74db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/connection-manager/wsHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,15 @@ async function backtrackNetworkAmendmentStatus(
index < currentLedger;
index += 256
) {
// Use api V1 instead of the default (V2) since we don't have the correct
// LedgerResponseExpanded type for V2
// TODO: change to V2 once the issue is fixed.
const ledger: LedgerResponse = await client.request({
command: 'ledger',
transactions: true,
ledger_index: index,
expand: true,
api_version: 1,
})

await handleWsMessageLedgerEnableAmendments(
Expand Down
2 changes: 1 addition & 1 deletion src/shared/database/amendments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const AMENDMENT_VERSION_REGEX =
/\| \[(?<amendmentName>[a-zA-Z0-9_]+)\][^\n]+\| (?<version>v[0-9]*\.[0-9]*\.[0-9]*|TBD) *\|/u

export const NETWORKS_HOSTS = new Map([
['main', 'ws://s2.ripple.com:51233'],
['main', 'wss://xrplcluster.com'],
['test', 'wss://s.altnet.rippletest.net:51233'],
['dev', 'wss://s.devnet.rippletest.net:51233'],
])
Expand Down

0 comments on commit b3f74db

Please sign in to comment.