Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web3-react] Simplify connect context #226

Open
polarker opened this issue Aug 6, 2023 · 1 comment
Open

[web3-react] Simplify connect context #226

polarker opened this issue Aug 6, 2023 · 1 comment
Assignees

Comments

@polarker
Copy link
Member

polarker commented Aug 6, 2023

All changes to the ConnectContext would trigger rerender, so we should keep the global context as simple as possible. The following should be removed and devs should use other hooks useAccount and useBalance etc.

  account?: Account
  setAccount: React.Dispatch<React.SetStateAction<Account | undefined>>
  displayAccount?: (account: Account) => string
  signerProvider?: SignerProvider
  setSignerProvider: React.Dispatch<React.SetStateAction<SignerProvider | undefined>>
  addressGroup?: number
  keyType?: KeyType
  network?: NetworkId
@Elite-tch
Copy link

I'd love to give this a go.

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

No branches or pull requests

3 participants