Skip to content

Commit 3f96812

Browse files
authored
Why Don't I See My Wallet Link (#1617)
1 parent db2355d commit 3f96812

File tree

13 files changed

+66
-24
lines changed

13 files changed

+66
-24
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"type": "module",
5656
"dependencies": {
5757
"@web3-onboard/coinbase": "^2.2.1",
58-
"@web3-onboard/core": "^2.16.0",
58+
"@web3-onboard/core": "^2.16.1-alpha.2",
5959
"@web3-onboard/dcent": "^2.2.4",
6060
"@web3-onboard/enkrypt": "^2.0.1",
6161
"@web3-onboard/fortmatic": "^2.0.16",

docs/src/routes/docs/[...3]modules/core.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ type ConnectModalOptions = {
222222
* Defaults to `https://ethereum.org/en/wallets/find-wallet/#main-content`
223223
*/
224224
iDontHaveAWalletLink?: string
225+
/**
226+
* Customize the link for the `Where's My Wallet` info pop up shown on the
227+
* select wallet modal.
228+
* Defaults to `https://www.blocknative.com/blog/metamask-wont-connect-web3-wallet-troubleshooting`
229+
*/
230+
wheresMyWalletLink?: string
225231
/**
226232
* Define support for Unstoppable Domains resolutions
227233
* after a user connects. Similar to ens, uns can be used for users who

examples/with-sveltekit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"type": "module",
3333
"dependencies": {
3434
"@fontsource/fira-mono": "^4.5.10",
35-
"@web3-onboard/core": "^2.15.6-alpha.3",
35+
"@web3-onboard/core": "^2.16.1-alpha.2",
3636
"@web3-onboard/injected-wallets": "^2.8.3-alpha.1",
3737
"@web3-onboard/walletconnect": "^2.3.3-alpha.1",
3838
"buffer": "^6.0.3"

packages/core/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ type ConnectModalOptions = {
199199
* Defaults to `https://ethereum.org/en/wallets/find-wallet/#main-content`
200200
*/
201201
iDontHaveAWalletLink?: string
202+
/**
203+
* Customize the link for the `Where's My Wallet` info pop up shown on the
204+
* select wallet modal.
205+
* Defaults to `https://www.blocknative.com/blog/metamask-wont-connect-web3-wallet-troubleshooting`
206+
*/
207+
wheresMyWalletLink?: string
202208
/**
203209
* Define support for Unstoppable Domains resolutions
204210
* after a user connects. Similar to ens, uns can be used for users who

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/core",
3-
"version": "2.16.1-alpha.1",
3+
"version": "2.16.1-alpha.2",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

packages/core/src/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ export type ConnectModalOptions = {
211211
* Defaults to `https://ethereum.org/en/wallets/find-wallet/#main-content`
212212
*/
213213
iDontHaveAWalletLink?: string
214+
/**
215+
* Customize the link for the `Where's My Wallet` info pop up shown on the
216+
* select wallet modal.
217+
* Defaults to `https://www.blocknative.com/blog/
218+
* metamask-wont-connect-web3-wallet-troubleshooting`
219+
*/
220+
wheresMyWalletLink?: string
214221
/**
215222
* Define support for Unstoppable Domains resolutions
216223
* after a user connects. Similar to ens, uns can be used for users who

packages/core/src/validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ const connectModalOptions = Joi.object({
176176
autoConnectLastWallet: Joi.boolean(),
177177
autoConnectAllPreviousWallet: Joi.boolean(),
178178
iDontHaveAWalletLink: Joi.string(),
179+
wheresMyWalletLink: Joi.string(),
179180
disableUDResolution: Joi.boolean()
180181
})
181182

packages/core/src/views/connect/SelectingWallet.svelte

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111
export let connectingErrorMessage: string
1212
1313
let windowWidth: number
14+
const { connect } = state.get()
1415
1516
function checkConnected(label: string) {
1617
const { wallets } = state.get()
1718
return !!wallets.find(wallet => wallet.label === label)
1819
}
20+
21+
const wheresMyWalletDefault =
22+
'https://www.blocknative.com/blog/metamask-wont-connect-web3-wallet-troubleshooting'
1923
</script>
2024

2125
<style>
@@ -41,13 +45,23 @@
4145
margin: 1rem 1rem 0;
4246
}
4347
48+
.notice-container {
49+
flex: 0 0 100%;
50+
margin-top: 0.75rem;
51+
}
52+
4453
@media all and (min-width: 768px) {
4554
.wallets-container {
4655
display: grid;
4756
grid-template-columns: repeat(var(--onboard-wallet-columns, 2), 1fr);
48-
padding: 1rem;
57+
padding: 1rem 1rem 0 1rem;
4958
border: none;
5059
}
60+
.notice-container {
61+
grid-column: span 2;
62+
margin-bottom: 1rem;
63+
margin-top: 0;
64+
}
5165
}
5266
</style>
5367

@@ -73,5 +87,18 @@
7387
connectingWalletLabel !== wallet.label}
7488
/>
7589
{/each}
90+
<div class="notice-container">
91+
<Warning>
92+
<div>
93+
<div>Why don't I see my Wallet?</div>
94+
<a
95+
class="link pointer"
96+
href={connect.wheresMyWalletLink || wheresMyWalletDefault}
97+
target="_blank"
98+
rel="noreferrer noopener">Click here to learn more</a
99+
>
100+
</div>
101+
</Warning>
102+
</div>
76103
</div>
77104
</div>

packages/core/src/views/shared/Warning.svelte

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,30 @@
55

66
<style>
77
.container {
8-
padding: var(--onboard-spacing-5, var(--spacing-5));
8+
gap: 1rem;
9+
padding: 0.75rem;
910
color: var(--onboard-warning-700, var(--warning-700));
1011
font-size: var(--onboard-font-size-7, var(--font-size-7));
1112
line-height: 16px;
1213
border: 1px solid var(--onboard-warning-400, var(--warning-400));
1314
background: var(--onboard-warning-100, var(--warning-100));
14-
margin: 0;
1515
border-radius: 12px;
1616
}
1717
1818
.icon {
1919
color: var(--onboard-warning-700, var(--warning-700));
2020
width: 1rem;
2121
height: 1rem;
22-
margin-left: var(--onboard-spacing-5, var(--spacing-5));
23-
}
24-
25-
p {
26-
margin: 0;
27-
width: fit-content;
22+
flex: 0 0 auto;
2823
}
24+
25+
2926
</style>
3027

3128
<div in:fade class="container flex justify-between">
32-
<p>
29+
<div>
3330
<slot />
34-
</p>
31+
</div>
3532

3633
<div class="icon">
3734
{@html infoIcon}

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"webpack-dev-server": "4.7.4"
2424
},
2525
"dependencies": {
26-
"@web3-onboard/core": "^2.16.1-alpha.1",
26+
"@web3-onboard/core": "^2.16.1-alpha.2",
2727
"@web3-onboard/coinbase": "^2.2.1",
2828
"@web3-onboard/transaction-preview": "^2.0.5",
2929
"@web3-onboard/dcent": "^2.2.4",

0 commit comments

Comments
 (0)