Skip to content

Commit 72ea38e

Browse files
authored
Merge pull request #705 from dev-protocol/dynamic-v4
Dynamic v4
2 parents 3a556c9 + 0a1d29e commit 72ea38e

File tree

7 files changed

+7435
-1150
lines changed

7 files changed

+7435
-1150
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ export default tseslint.config(
3333
'@typescript-eslint/no-explicit-any': 'off',
3434
},
3535
},
36-
{ ignores: ['dist', '.yarn', '.preview', 'src/.build', '*.js'] },
36+
{ ignores: ['dist', '.yarn', '.preview', 'src/.build', '*.js', '.astro'] },
3737
)

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devprotocol/clubs-plugin-awesome-onboarding",
3-
"version": "0.7.2",
3+
"version": "0.8.0-beta.1",
44
"type": "module",
55
"description": "Clubs plugin for intengrating awesome user onboarding.",
66
"main": "dist/index.js",
@@ -49,9 +49,9 @@
4949
"@astrojs/vue": "^5.0.0",
5050
"@devprotocol/clubs-core": "3.25.3",
5151
"@devprotocol/util-ts": "4.0.0",
52-
"@dynamic-labs/ethereum": "^2.0.7",
53-
"@dynamic-labs/ethers-v6": "^2.0.7",
54-
"@dynamic-labs/sdk-react-core": "^2.0.7",
52+
"@dynamic-labs/ethereum": "4.6.1",
53+
"@dynamic-labs/ethers-v6": "4.6.1",
54+
"@dynamic-labs/sdk-react-core": "4.6.1",
5555
"@eslint/js": "^9.19.0",
5656
"@rollup/plugin-commonjs": "^28.0.0",
5757
"@rollup/plugin-json": "^6.1.0",

src/components/ConnectButton/Button.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from '@dynamic-labs/sdk-react-core'
1717
import NetworkError from './NetworkError'
1818
import { equals } from 'ramda'
19+
import { getSigner } from '@dynamic-labs/ethers-v6'
1920

2021
import { Strings } from '../../i18n/plugin'
2122
import Clubs from '../Icon/Clubs'
@@ -74,15 +75,17 @@ export default ({
7475
setWalletName(cryptoWallet.walletName)
7576
}
7677

77-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
78-
dynamic.primaryWallet?.connector.ethers?.getSigner().then((_signer) => {
79-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
80-
// @ts-expect-error
81-
const same = equals(_signer, signer)
82-
// console.log('Called here', same)
78+
if (dynamic.primaryWallet) {
8379
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
84-
!same && setSigner(_signer)
85-
}) ?? setSigner(undefined)
80+
getSigner(dynamic.primaryWallet).then((_signer) => {
81+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
82+
// @ts-expect-error
83+
const same = equals(_signer, signer)
84+
// console.log('Called here', same)
85+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
86+
!same && setSigner(_signer)
87+
}) ?? setSigner(undefined)
88+
}
8689
}, [dynamic.primaryWallet, dynamic.user])
8790

8891
useEffect(() => {

src/components/ConnectButton/ConnectButton.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import { useEffect, useState } from 'react'
66
import type { UndefinedOr } from '@devprotocol/util-ts'
7-
import { EthersExtension } from '@dynamic-labs/ethers-v6'
87
import { EthereumWalletConnectors } from '@dynamic-labs/ethereum'
98
import type { LocaleResource } from '@dynamic-labs/sdk-react-core'
109
import { DynamicContextProvider } from '@dynamic-labs/sdk-react-core'
@@ -37,7 +36,6 @@ export default ({ chainId, environmentId, ...props }: ConnectButtonProps) => {
3736
settings={{
3837
environmentId,
3938
walletConnectPreferredChains: [`eip155:${chainId ?? 137}`],
40-
walletConnectorExtensions: [EthersExtension],
4139
walletConnectors: [EthereumWalletConnectors],
4240
cssOverrides: cssOverrides(locale?.lang),
4341
}}

0 commit comments

Comments
 (0)