Skip to content

refactor(providers): move accounts provider off web3.js Connection - #1250

Merged
Woody4618 merged 2 commits into
masterfrom
refactor/HOO-1264-kill-connection-accounts-provider
Aug 27, 2026
Merged

refactor(providers): move accounts provider off web3.js Connection#1250
Woody4618 merged 2 commits into
masterfrom
refactor/HOO-1264-kill-connection-accounts-provider

Conversation

@amilz

@amilz amilz commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Replace the accounts provider's web3.js Connection usage with the Kit RPC client, including parsed, raw, and skip account fetch modes. Preserve legacy account shapes through explicit conversions and update tests to mock the RPC interface.

  • Updated AccountsProvider tests to mock Kit RPC account fetching.
  • Covered batching, unmount cancellation, React StrictMode remounts, cluster changes, skip-mode data slicing, and RPC failures.

Closes HOO-1264 (Refactor provider RPC usage (Kit MIgration))

Batched account fetches, the nested programData lookup and stake
activation now go through the central getRpc(url) accessor. Parsed
payloads run through withNumbersInsteadOfBigInts before the superstruct
validators; lamports stays a bigint through the stake-activation path.

Refs: HOO-1264
@linear

linear Bot commented Aug 27, 2026

Copy link
Copy Markdown

HOO-1264

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview Aug 27, 2026 1:08am

Request Review

@amilz amilz self-assigned this Aug 27, 2026
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The accounts provider now uses the shared Kit RPC client while preserving legacy account representations and explicit confirmed reads.

  • Replaces web3.js Connection account requests with Kit getMultipleAccounts and getAccountInfo calls.
  • Converts Kit addresses, bigint values, and base64 payloads into legacy consumer shapes.
  • Updates provider tests to mock the Kit RPC interface and verify confirmed request configuration.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported commitment regression is fixed because parsed, raw, skip, and nested program-data account requests now explicitly specify confirmed commitment.

Important Files Changed

Filename Overview
app/providers/accounts/index.tsx Migrates account fetching and parsed-account enrichment to Kit RPC; all direct replacement account requests now explicitly preserve confirmed commitment.
app/providers/accounts/tests/accounts-provider.spec.tsx Reworks account-provider tests around the Kit RPC mock and verifies confirmed commitment for batched skip-mode requests.

Reviews (2): Last reviewed commit: "chore: greptile feedback" | Re-trigger Greptile

Comment thread app/providers/accounts/index.tsx

// The kit-typed shape of a jsonParsed account's `data` when the RPC could parse it — the
// `[base64, 'base64']` tuple fallback is excluded (callers branch on `Array.isArray` first).
type ParsedAccountData = Exclude<AccountInfoWithJsonData['data'], readonly [string, string]>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe dedupe type. We already have one in stake-activation.ts. But actually at the moment we don't have a correct place to share types between legacy provider and new code

@Woody4618
Woody4618 merged commit aae2f09 into master Aug 27, 2026
14 checks passed
@Woody4618
Woody4618 deleted the refactor/HOO-1264-kill-connection-accounts-provider branch August 27, 2026 12:27
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.

3 participants