File tree Expand file tree Collapse file tree 7 files changed +19
-7
lines changed Expand file tree Collapse file tree 7 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @web3-onboard/coinbase" ,
3
- "version" : " 2.0.2" ,
3
+ "version" : " 2.0.2-alpha.1 " ,
4
4
"description" : " Coinbase Wallet module for web3-onboard" ,
5
5
"module" : " dist/index.js" ,
6
6
"browser" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function coinbaseWallet({
8
8
return ( { device } ) =>
9
9
device . type === 'mobile'
10
10
? {
11
- label : 'Coinbase' ,
11
+ label : 'Coinbase Wallet ' ,
12
12
getIcon : async ( ) => ( await import ( './icon.js' ) ) . default ,
13
13
getInterface : async ( { chains, appMetadata } ) => {
14
14
const [ chain ] = chains
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @web3-onboard/core" ,
3
- "version" : " 2.2.9-alpha.2 " ,
3
+ "version" : " 2.2.9-alpha.3 " ,
4
4
"scripts" : {
5
5
"build" : " rollup -c" ,
6
6
"dev" : " rollup -c -w" ,
Original file line number Diff line number Diff line change 1
1
import type { Chain , WalletInit } from '@web3-onboard/common'
2
2
import { internalState$ } from '../streams'
3
- import { initializeWalletModules } from '../utils'
3
+ import { initializeWalletModules , uniqueWalletsByLabel } from '../utils'
4
4
import { dispatch } from './index'
5
5
6
6
import type {
@@ -156,10 +156,11 @@ export function setWalletModules(wallets: WalletInit[]): void {
156
156
wallets ,
157
157
internalState$ . getValue ( ) . device
158
158
)
159
+ const dedupedWallets = uniqueWalletsByLabel ( modules )
159
160
160
161
const action = {
161
162
type : SET_WALLET_MODULES ,
162
- payload : modules
163
+ payload : dedupedWallets
163
164
}
164
165
165
166
dispatch ( action as SetWalletModulesAction )
Original file line number Diff line number Diff line change @@ -173,3 +173,14 @@ export function initializeWalletModules(
173
173
return acc
174
174
} , [ ] as WalletModule [ ] )
175
175
}
176
+
177
+ export function uniqueWalletsByLabel (
178
+ walletModuleList : WalletModule [ ]
179
+ ) : WalletModule [ ] {
180
+ return walletModuleList . filter (
181
+ ( wallet , i ) =>
182
+ walletModuleList . findIndex (
183
+ ( innerWallet : WalletModule ) => innerWallet . label === wallet . label
184
+ ) === i
185
+ )
186
+ }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export enum ProviderLabel {
49
49
Bitpie = 'Bitpie' ,
50
50
BlockWallet = 'BlockWallet' ,
51
51
Brave = 'Brave Wallet' ,
52
- Coinbase = 'Coinbase' ,
52
+ Coinbase = 'Coinbase Wallet ' ,
53
53
Dcent = `D'CENT` ,
54
54
Detected = 'Detected Wallet' ,
55
55
Frame = 'Frame' ,
Original file line number Diff line number Diff line change 21
21
"typescript" : " ^4.5.5"
22
22
},
23
23
"dependencies" : {
24
- "@web3-onboard/core" : " ^2.2.9-alpha.2 " ,
24
+ "@web3-onboard/core" : " ^2.2.9-alpha.3 " ,
25
25
"@web3-onboard/common" : " ^2.1.0-alpha.1"
26
26
},
27
27
"peerDependencies" : {
You can’t perform that action at this time.
0 commit comments