Skip to content

refactor: replace @privy-io/react-auth with Firefly backend signing#12414

Merged
Jack-Works merged 2 commits into
developfrom
refactor/remove-privy-firefly-signing
Jul 8, 2026
Merged

refactor: replace @privy-io/react-auth with Firefly backend signing#12414
Jack-Works merged 2 commits into
developfrom
refactor/remove-privy-firefly-signing

Conversation

@swkatmask

Copy link
Copy Markdown
Contributor

MF-0000 FW-0000

@swkatmask swkatmask force-pushed the refactor/remove-privy-firefly-signing branch from e663aed to 229c1ec Compare July 6, 2026 09:13
@swkatmask swkatmask marked this pull request as ready for review July 6, 2026 09:14
@swkatmask swkatmask force-pushed the refactor/remove-privy-firefly-signing branch from a37c0df to 6d2e7e5 Compare July 6, 2026 10:28
Remove the @privy-io/react-auth SDK and the Privy<->Firefly JWT sync. The
extension now signs directly against the Firefly embedded-wallet REST
endpoints on api.firefly.land (personal-sign, sign-typed-data-v4,
sign-transaction, send-transaction, privy-api/user, user/create/privy/user),
authenticated with the Firefly access token.

- Add FireflyEmbeddedWalletClient, FireflyEmbeddedProvider (EIP-1193), and
  the useFireflyEmbeddedWallets discovery hook (React Query, shared).
- Re-point usePrivyWallet, MaskWallet, and the wallet-setup flow at the new
  client/hook; drop useSyncJwtBasedAuthState.
- Remove PrivyProvider from Popup/Dashboard/ShadowRoot; reduce
  PrivyEnvGuard to an identity HOC.
- Drop @privy-io/react-auth, PRIVY_APP_ID build injection, the privy.io CSP
  whitelist, and the Privy modal CSS patch.
- Keep ImportSource.Privy and the historical hook/constant names so
  unaffected consumers compile unchanged.

Scope: EVM only. Solana, free-gas relay, and pin-code flows are deferred.
@swkatmask swkatmask force-pushed the refactor/remove-privy-firefly-signing branch from 6d2e7e5 to ff37e2e Compare July 7, 2026 03:08
After @privy-io/react-auth was replaced by Firefly backend signing
(ff37e2e), PrivyEnvGuard was reduced to a no-op that returns its
argument unchanged, kept only so the wrapped components kept compiling.
Now that the migration has settled, drop it for good.

- Delete packages/shared-base/src/Privy/SetupProvider.tsx (the file's
  only remaining export) and its now-empty directory.
- Drop the `export * from './Privy/SetupProvider.js'` barrel line.
- Unwrap `PrivyEnvGuard(fn)` -> `fn` across the 7 call sites (Popup
  wallet components + the Firefly embedded-wallet Setup); named function
  expressions are kept so displayName is retained.
@swkatmask swkatmask force-pushed the refactor/remove-privy-firefly-signing branch from 9cbc5d5 to 94304df Compare July 7, 2026 06:11
@Jack-Works Jack-Works merged commit 229f766 into develop Jul 8, 2026
12 checks passed
@Jack-Works Jack-Works deleted the refactor/remove-privy-firefly-signing branch July 8, 2026 06:37
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