Skip to content

Conversation

@vortex-hue
Copy link
Contributor

@vortex-hue vortex-hue commented Sep 8, 2025

Description

Summary: Complete migration from Web3 Onboard to Reown AppKit with prioritized wallet support, social login, and MiniPay compatibility.

Issue Fixed: #593 - Integrate with reown appkit

Motivation: The existing Web3 Onboard integration was becoming outdated and lacked the flexibility needed for prioritized wallet display and social authentication. Reown AppKit provides better wallet management, analytics, and modern React patterns that align with current best practices.

Context: This migration enables:

  • Prioritized wallet display (GoodWallet, Valora) in WalletConnect modal
  • Google social login integration
  • Better MiniPay support for mobile users
  • Modern React hooks and TypeScript support
  • Improved analytics and monitoring capabilities

How Has This Been Tested?

Local Development Testing:

  • yarn install - All dependencies installed successfully
  • yarn build - Project compiles without errors
  • ESLint checks pass - No linting errors
  • TypeScript compilation - All type errors resolved

Code Quality:

  • Removed all legacy @web3-onboard dependencies
  • Eliminated unused imports and dead code
  • Fixed TypeScript type mismatches
  • Resolved ESLint warnings

Checklist:

  • Prioritized wallet display (GoodWallet, Valora) in WalletConnect modal
  • Google social login integration
  • Better MiniPay support for mobile users
  • Improved analytics and monitoring capabilities
  • Removed all useActiveWeb3React and useActiveOnboard usages
  • Replaced with AppKit hooks where applicable
  • Clean build with no @web3-onboard dependencies

Description by Korbit AI

What change is being made?

Integrate Reown AppKit across the app, replace Web3 Onboard with AppKit-based wallet and network handling, and introduce wallet priorities and Google socials; update multiple components to consume AppKit hooks (account, network, label, etc.), and adjust explorer links and token network handling accordingly.

Why are these changes being made?

Converge to AppKit for consistent wallet/connect flows and network state, replacing the old Onboard integration; this simplifies state management, improves compatibility with new wallet providers, and enables wallet prioritization and Google social login support.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@korbit-ai
Copy link

korbit-ai bot commented Sep 8, 2025

Korbit doesn't automatically review large (3000+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

@vortex-hue vortex-hue changed the title Feat appkit Feat: Integrate Reown AppKit; replace Web3 Onboard; add wallet priorities and Google socials Sep 8, 2025
@vortex-hue
Copy link
Contributor Author

Hi @L03TJ3 , can you have a look of my draft pr for this task at your earliest convenience, so I can know if am on the right track and what's remaining for me to do, thanks alot 🙂

package.json Outdated
"@babel/runtime": "^7.18.9",
"@gooddollar/good-design": "^0.4.24",
"@gooddollar/goodprotocol": "2.0.34-beta.1",
"@gooddollar/good-design": "^0.4.21",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be updated/merged with master to reflect latest changes

return (
<TransactionWrapper>
<TransactionState url={getExplorerLink(chainId, hash, 'transaction')} dataAttr="external_explorer">
<TransactionState url={getExplorerLink(+(chainId ?? 1), hash, 'transaction')} dataAttr="external_explorer">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<TransactionState url={getExplorerLink(+(chainId ?? 1), hash, 'transaction')} dataAttr="external_explorer">
<TransactionState url={getExplorerLink(+(chainId ?? 42220), hash, 'transaction')} dataAttr="external_explorer">

Copy link
Collaborator

Choose a reason for hiding this comment

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

We default to celo, not ethereum mainnet

{i18n._(t`Disconnect`)}
</WalletAction>
)}
{(walletInfo?.name || isMiniPay()) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

is minipay should be variable, outside of render

//eslint-disable-next-line @typescript-eslint/no-unused-vars
const [{ wallet, connecting }, connect, disconnect] = useConnectWallet()

const { address } = useAppKitAccount()
Copy link
Collaborator

Choose a reason for hiding this comment

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

create a wrapper hook, something like 'useConnectionInfo' that returns things like wallet-info/chainId/account

replace everywhere we use more then one appkit hook

text={buttonText}
web3Action={noop}
supportedChains={[SupportedChains.CELO, SupportedChains.MAINNET, SupportedChains.FUSE, SupportedChains.XDC]}
supportedChains={[SupportedChains.CELO, SupportedChains.MAINNET, SupportedChains.FUSE]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

One merge with master has incorrect resolved conflicts.
How to resolve conflicts:

  1. master branch changes are almost always leading.
  2. when not sure, don't assume what should be resolution, ask the team please!

XDC is an added/new supported chain, and this should not be removed by your PR

const { chainId, error, active } = useActiveWeb3React()
const { initialized } = useAppKitState()
const { chainId } = useAppKitNetwork()
// TODO
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this?

return (
<View style={{ ...styles }}>
<NavLink key={route} to={route} onPress={handleInternal}>
<NavLink key={index} to={route} onPress={handleInternal}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

never use index as key


const { account, error } = useActiveWeb3React()
const { address } = useAppKitAccount()
// TODO
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the todo?

@@ -0,0 +1,11 @@
export const WalletLabels: Readonly<string[]> = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

have the different wallets been tested?
The main ones that should work are: minipay, goodwallet (using wallet-connect), valora.
metamask.

)
}, [address, open])

const handleError = useCallback(async (e) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain this change?

@L03TJ3
Copy link
Collaborator

L03TJ3 commented Oct 3, 2025

Also, wallet-connect does not load when I run it from localhost. it works for you?

@vortex-hue vortex-hue marked this pull request as ready for review October 3, 2025 19:36
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We failed to fetch the diff for pull request #604

You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.

@korbit-ai
Copy link

korbit-ai bot commented Oct 3, 2025

Korbit doesn't automatically review large (3000+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

@vortex-hue
Copy link
Contributor Author

Also, wallet-connect does not load when I run it from localhost. it works for you?

works well actually: https://www.loom.com/share/992e55bd5efc410aa76e3702737aad4b?sid=a14f2393-1071-40eb-90a7-1f9268ff41be

Resolved conflicts and API compatibility:
- AppBar.tsx: Integrated with new AppKit hooks
- NetworkModal/index.tsx: Combined AppKit with activeNetworksByFeature
- ClaimBalance.tsx: Updated to use new SDK API
- OldClaim.tsx: Kept AppKit connection handling
- WalletBalance/index.tsx: Fixed chainId type conversion
- All locale files: Accepted master's updated translations
- yarn.lock: Regenerated with updated dependencies

Note: New SDK version - useG no longer accepts chainId parameter
@vortex-hue vortex-hue requested a review from L03TJ3 November 10, 2025 22:02
@L03TJ3
Copy link
Collaborator

L03TJ3 commented Nov 18, 2025

@vortex-hue What also needs to be fixed is the 'disconnect' flow when using wallet-connect.
there is from the dapp seemingly no way to disconnect a wallet-connect connected wallet

@L03TJ3 L03TJ3 linked an issue Nov 21, 2025 that may be closed by this pull request
4 tasks
@@ -1,36 +1,26 @@
import React, { FC, useEffect, useRef } from 'react'
Copy link
Collaborator

Choose a reason for hiding this comment

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

If not used, can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

import { Token } from '@sushiswap/sdk'
import { ethers } from 'ethers'
import { useMemo } from 'react'
import { useAppKitNetwork } from '@reown/appkit/react'
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are missing a merge with master. this is not the expected useReserveToken.
please fix (master is leading)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@L03TJ3 L03TJ3 left a comment

Choose a reason for hiding this comment

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

Minipay should not show up as 'wallet to connect'
on the reown modal

@L03TJ3 L03TJ3 merged commit bc9d1ac into GoodDollar:master Dec 16, 2025
4 checks passed
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.

[Feat] Integrate with reown appkit

4 participants