You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will render every injected wallet as regardless of whether it has been detected in the window, happy days.
180
-
Then the issue of the order of wallets displayed becomes apparent when you have 21 injected wallets at the top of the wallets list. To solve this, all injected wallets are sorted alphabetically by default and there is an additional `sort` parameter which receives the final list of wallets and then returns the list to be rendered. This allows for example setting MetaMask and Coinbase first and then just the rest alphabetically:
188
+
This can be set to an array top specify which unavailable injected wallets to show or set to true to display all unavailable injected wallets regardless of whether it has been detected in the window, happy days.
189
+
Then the issue of the order of wallets displayed becomes apparent when you have 21 injected wallets at the top of the wallets list. To solve this, all injected wallets are sorted **alphabetically** by default and there is an additional `sort` parameter which receives the final list of wallets and then returns the list to be rendered. This allows for example setting MetaMask and Coinbase first and then just the rest alphabetically:
181
190
182
191
```javascript
183
192
constinjected=injectedModule({
184
-
// display all wallets even if they are unavailable
185
-
displayUnavailable:true,
193
+
// display specific injected wallets even if they are unavailable
194
+
// can also be set to `true` to display all unavailable injected wallets
You may want to display all wallets, but filter out specific wallets based on their availability. For example I may want to display all unavailable wallets except when Binance and Bitski wallet is unavailable, then don't show them, but if they are available, then do show them. To do this, the filters value has been extended to have a new value: `'unavailable'`, as in; remove this wallet if it is unavailable, even though `displayUnavailable` wallets is set:
216
+
You may want to display all unavailable injected wallets, but filter out specific wallets based on their availability. For example I may want to display all unavailable wallets except when Binance and Bitski wallet is unavailable, then don't show them, but if they are available, then do show them. To do this, the filters value has been extended to have a new value: `'unavailable'`, as in; remove this wallet if it is unavailable, even though `displayUnavailable` wallets is set:
207
217
208
218
```javascript
209
219
constinjected=injectedModule({
210
-
// display all wallets even if they are unavailable
220
+
// display specific injected wallets even if they are unavailable
221
+
// can also be set to `true` to display all unavailable injected wallets
211
222
displayUnavailable:true,
212
223
// but only show Binance and Bitski wallet if they are available
If a wallet is selected, but is not available the default error message is: `Please installor enable ${walletName} to continue`. You may want to customise that message, so there is the `walletUnavailableMessage` parameter which is a function that takes the wallet object that is unavailable and returns a string which is the message to display:
248
+
If a wallet is selected, but is not available the default error message is: `Oops ${wallet.label} is unavailable! Please <a href="${wallet.externalUrl}" target="_blank">install</a>` if a download link is available for that wallet. If there isn't a download link for that wallet the default is: `Please install or enable ${walletName} to continue`. You may want to customize that message, so there is the `walletUnavailableMessage` parameter which is a function that takes the wallet object that is unavailable and returns a string which is the message to display:
238
249
239
250
```javascript
240
251
constinjected=injectedModule({
241
252
custom: [
242
253
// include custom (not natively supported) injected wallet modules here
243
254
],
244
-
// display all wallets even if they are unavailable
245
-
displayUnavailable:true,
255
+
// display specific injected wallets even if they are unavailable
256
+
// can also be set to `true` to display all unavailable injected wallets
Copy file name to clipboardExpand all lines: packages/core/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@web3-onboard/core",
3
-
"version": "2.20.0",
3
+
"version": "2.20.1",
4
4
"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.",
0 commit comments