Skip to content

fix(sdk-coin-sui): use live JSON-RPC nodes and surface recover errors - #9558

Merged
vibhavgo merged 1 commit into
masterfrom
fix/sdk-core/sdk-coin-sui/rpc-endpoint-fix
Aug 25, 2026
Merged

fix(sdk-coin-sui): use live JSON-RPC nodes and surface recover errors#9558
vibhavgo merged 1 commit into
masterfrom
fix/sdk-core/sdk-coin-sui/rpc-endpoint-fix

Conversation

@vibhavgo

@vibhavgo vibhavgo commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Sui Foundation disabled JSON-RPC on fullnode.mainnet.sui.io and fullnode.testnet.sui.io (week of 27 Jul 2026, per official migration guide), breaking every sdk-coin-sui recover flow with Method not found. Sui.recover() swallowed the RPC error and reported the misleading "Did not find an address with sufficient funds" message.

Linear: WCI-1455

Changes

  • @bitgo/sdk-core (environments.ts): point prod.suiNodeUrl at https://sui-rpc.publicnode.com and test.suiNodeUrl at https://sui-testnet-rpc.publicnode.com.
  • @bitgo/sdk-coin-sui (sui.ts): recover() rethrows getBalance failures with the address, index, and RPC URL instead of continue-ing, so RPC outages surface the real cause.
  • Test: one case appended to Recover Transaction Failures verifying a rejected getBalance propagates as Failed to query Sui balance … Method not found. Existing recover suites unaffected.

References — Sui JSON-RPC deprecation

Timeline from the migration guide:

Milestone Date
Disable JSON-RPC on Sui Foundation mainnet full nodes Week of 27 Jul 2026
Sui Foundation stops publishing JSON-RPC snapshots End of Aug 2026
Implicit fallback to archival service disconnected End of Sep 2026
Full decommission (code removal) Mid-Oct 2026

Longer-term we should migrate sdk-coin-sui to gRPC / GraphQL RPC (tracked separately); for now, PublicNode's JSON-RPC keeps recover flows working without an SDK API rewrite.

Test Plan

  • `mocha --grep "RPC errors"` in `sdk-coin-sui` — passes.
  • `mocha --grep "Recover Transaction Failures"` — 3/3 pass (unchanged).
  • Manual: WRW Non-BitGo TSUI recover after bumping SDK deps; TSUI mainnet recover on default env.
  • Prior confirmed testnet recovery for context: TSUI tx `EWQtGSDbP62CoTS28TMLYy4XhZBWFC2ZAZUyBmJKAKYt`.

Closes the WRW-only workaround PR BitGo/wallet-recovery-wizard#733 (now redundant once this ships).

Sui Foundation disabled JSON-RPC on fullnode.*.sui.io, so every SDK
consumer hit "Method not found" and Sui.recover() reported "no funds"
because the RPC error was swallowed. Point sdk-core defaults at
PublicNode for mainnet and testnet, and rethrow getBalance failures
with address, index, and RPC URL so the real cause surfaces.

Ticket: WCI-1455
Co-authored-by: Cursor <cursoragent@cursor.com>
@vibhavgo
vibhavgo force-pushed the fix/sdk-core/sdk-coin-sui/rpc-endpoint-fix branch from b97847a to 66f2c98 Compare August 25, 2026 08:29
@vibhavgo vibhavgo changed the title fix(sui): use live JSON-RPC nodes and surface recover errors fix(sdk-coin-sui): use live JSON-RPC nodes and surface recover errors Aug 25, 2026
@vibhavgo
vibhavgo marked this pull request as ready for review August 25, 2026 09:00
@vibhavgo
vibhavgo requested review from a team as code owners August 25, 2026 09:00
@vibhavgo
vibhavgo merged commit dba0b17 into master Aug 25, 2026
25 checks passed
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

WCI-1462

WCI-1455

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

Successfully merging this pull request may close these issues.

2 participants