Skip to content

Commit

Permalink
fix: duplicate wallets (#3404)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp authored Dec 9, 2024
1 parent 1ca257b commit 7747f6a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .changeset/calm-oranges-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'@reown/appkit': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
---

Fix issue where setEIP6963Enabled is not getting called
1 change: 1 addition & 0 deletions packages/appkit/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ export class AppKit {
OptionsController.setFeatures(options.features)
OptionsController.setEnableWalletConnect(options.enableWalletConnect !== false)
OptionsController.setEnableWallets(options.enableWallets !== false)
OptionsController.setEIP6963Enabled(options.enableEIP6963 !== false)

if (options.metadata) {
OptionsController.setMetadata(options.metadata)
Expand Down
17 changes: 17 additions & 0 deletions packages/appkit/src/tests/appkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ describe('Base', () => {
it('should initialize adapters in ChainController', () => {
expect(ChainController.initialize).toHaveBeenCalledWith(mockOptions.adapters)
})

it('should set EIP6963 enabled by default', () => {
new AppKit({
...mockOptions
})

expect(OptionsController.setEIP6963Enabled).toHaveBeenCalledWith(true)
})

it('should set EIP6963 disabled when option is disabled in config', () => {
new AppKit({
...mockOptions,
enableEIP6963: false
})

expect(OptionsController.setEIP6963Enabled).toHaveBeenCalledWith(false)
})
})

describe('Base Public methods', () => {
Expand Down

0 comments on commit 7747f6a

Please sign in to comment.