Skip to content

Commit b3f74db

Browse files
committed
fix ledger api_version and use different url for amendment backtracking
1 parent 66c023f commit b3f74db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/connection-manager/wsHandling.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,15 @@ async function backtrackNetworkAmendmentStatus(
264264
index < currentLedger;
265265
index += 256
266266
) {
267+
// Use api V1 instead of the default (V2) since we don't have the correct
268+
// LedgerResponseExpanded type for V2
269+
// TODO: change to V2 once the issue is fixed.
267270
const ledger: LedgerResponse = await client.request({
268271
command: 'ledger',
269272
transactions: true,
270273
ledger_index: index,
271274
expand: true,
275+
api_version: 1,
272276
})
273277

274278
await handleWsMessageLedgerEnableAmendments(

src/shared/database/amendments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const AMENDMENT_VERSION_REGEX =
3939
/\| \[(?<amendmentName>[a-zA-Z0-9_]+)\][^\n]+\| (?<version>v[0-9]*\.[0-9]*\.[0-9]*|TBD) *\|/u
4040

4141
export const NETWORKS_HOSTS = new Map([
42-
['main', 'ws://s2.ripple.com:51233'],
42+
['main', 'wss://xrplcluster.com'],
4343
['test', 'wss://s.altnet.rippletest.net:51233'],
4444
['dev', 'wss://s.devnet.rippletest.net:51233'],
4545
])

0 commit comments

Comments
 (0)