Skip to content

feat: add Openfort Signer docs#791

Open
Huguet57 wants to merge 1 commit intosafe-global:mainfrom
Huguet57:feat/openfort-signer
Open

feat: add Openfort Signer docs#791
Huguet57 wants to merge 1 commit intosafe-global:mainfrom
Huguet57:feat/openfort-signer

Conversation

@Huguet57
Copy link
Copy Markdown

Adds documentation for the Openfort signer integration with Safe SDK.

@Huguet57
Copy link
Copy Markdown
Author

Related PR: 5afe/safe-signers#2

@Huguet57
Copy link
Copy Markdown
Author

Hi team, just passing by to bring a new integration with Openfort. Keep up the good work! :)

@emauja
Copy link
Copy Markdown

emauja commented Mar 18, 2026

Update to @openfort/react v1.0.4 API

The Openfort React SDK has been updated to v1.0.4 with breaking changes. Here are the required updates for this PR:

Changes needed in pages/sdk/signers/openfort.mdx:

  1. Move getDefaultConfig import to the new @openfort/react/wagmi subpath
  2. Replace useWallets with useEthereumEmbeddedWallet from @openfort/react/ethereum
  3. Update documentation text to reference the new hook name

Diff

-  import { OpenfortProvider, OpenfortButton, useUser, useWallets, useOpenfort, AccountTypeEnum, AuthProvider, getDefaultConfig } from '@openfort/react'
+  import { OpenfortProvider, OpenfortButton, useUser, useOpenfort, AccountTypeEnum, AuthProvider } from '@openfort/react'
+  import { getDefaultConfig } from '@openfort/react/wagmi'
+  import { useEthereumEmbeddedWallet } from '@openfort/react/ethereum'

-  const { wallets } = useWallets()
+  const { wallets } = useEthereumEmbeddedWallet()

A branch with these changes applied is available at emauja:feat/openfort-signer.

These changes align with the v1.0.0 breaking changes where wagmi utilities moved to @openfort/react/wagmi and wallet hooks were split into chain-specific subpaths (@openfort/react/ethereum, @openfort/react/solana).

Copy link
Copy Markdown

@emauja emauja left a comment

Choose a reason for hiding this comment

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

Openfort React SDK v1.0.4 Update Required

After researching the latest @openfort/react v1.0.4 API, several imports and hooks in this PR need updating:

1. getDefaultConfig moved to subpath import

Since v1.0.0, wagmi utilities are in a separate subpath:

- import { OpenfortProvider, OpenfortButton, useUser, useWallets, useOpenfort, AccountTypeEnum, AuthProvider, getDefaultConfig } from '@openfort/react'
+ import { OpenfortProvider, OpenfortButton, useUser, useOpenfort, AccountTypeEnum, AuthProvider } from '@openfort/react'
+ import { getDefaultConfig } from '@openfort/react/wagmi'
+ import { useEthereumEmbeddedWallet } from '@openfort/react/ethereum'

2. useWallets removed — use useEthereumEmbeddedWallet instead

useWallets() no longer exists in v1.0.4. Replace with:

- const { wallets } = useWallets()
+ const evm = useEthereumEmbeddedWallet()

3. Update wallet access pattern

- if (isAuthenticated && wallets.length > 0) {
+ if (isAuthenticated && evm.status === 'connected') {
    ...
-   const signer = wallets[0].address
+   const signer = evm.address
  }
- }, [isAuthenticated, wallets])
+ }, [isAuthenticated, evm.status])

4. Update description text

- hooks like `useUser()` or `useWallets()` that will provide
+ hooks like `useUser()` or `useEthereumEmbeddedWallet()` that will provide

These changes align with the v1.0.0 tree-shaking architecture where wagmi, Ethereum, and Solana utilities are separate subpath exports. The uiConfig prop and client.embeddedWallet.getEthereumProvider() pattern remain correct.

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