File tree Expand file tree Collapse file tree 3 files changed +27
-27
lines changed Expand file tree Collapse file tree 3 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { onDestroy } from ' svelte'
3
- import { fade } from ' svelte/transition'
4
3
import Button from ' ../elements/Button.svelte'
5
4
import IconButton from ' ../elements/IconButton.svelte'
6
5
import { wallet } from ' ../stores'
29
28
align-items : center ;
30
29
list-style-type : none ;
31
30
margin : 1.25em 0 ;
32
- max-height : 66vh ;
33
- overflow-y : scroll ;
34
31
padding : 0 ;
35
- scrollbar-width : none ;
36
32
font-family : inherit ;
37
33
font-size : inherit ;
38
34
line-height : 1.15 ;
62
58
}
63
59
64
60
ul {
65
- scrollbar-width : unset ;
61
+ max-height : 66vh ;
62
+ overflow-y : scroll ;
66
63
}
67
64
}
68
65
</style >
69
66
70
67
<ul class =" bn-onboard-custom bn-onboard-modal-select-wallets" >
71
- {#each modalData .primaryWallets as wallet }
72
- <li in:fade >
68
+ {#each modalData .primaryWallets as wallet , i ( wallet . name ) }
69
+ <li >
73
70
<IconButton
74
71
onclick ={() => handleWalletSelect (wallet )}
75
72
iconSrc ={wallet .iconSrc }
90
87
{/if }
91
88
92
89
{#if showingAllWalletModules }
93
- {#each modalData .secondaryWallets as wallet }
94
- <li in:fade >
90
+ {#each modalData .secondaryWallets as wallet , i ( wallet . name ) }
91
+ <li >
95
92
<IconButton
96
93
onclick ={() => handleWalletSelect (wallet )}
97
94
iconSrc ={wallet .iconSrc }
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ function metamask(options: CommonWalletOptions): WalletModule {
37
37
link : 'https://metamask.io/' ,
38
38
installMessage : extensionInstallMessage ,
39
39
desktop : true ,
40
+ mobile : true ,
40
41
preferred
41
42
}
42
43
}
Original file line number Diff line number Diff line change 67
67
return ! osExclusions .includes (os )
68
68
})
69
69
70
+ if (deviceWallets .find (wallet => wallet .preferred )) {
71
+ // if preferred wallets, then split in to preferred and not preferred
72
+ primaryWallets = deviceWallets .filter (wallet => wallet .preferred )
73
+ secondaryWallets = deviceWallets .filter (wallet => ! wallet .preferred )
74
+ } else {
75
+ // otherwise make the first 4 wallets preferred
76
+ primaryWallets = deviceWallets .slice (0 , 4 )
77
+ secondaryWallets =
78
+ deviceWallets .length > 4 ? deviceWallets .slice (4 ) : undefined
79
+ }
80
+
81
+ modalData = {
82
+ heading ,
83
+ description ,
84
+ primaryWallets ,
85
+ secondaryWallets
86
+ }
87
+
70
88
if (appState .autoSelectWallet ) {
71
89
const module = deviceWallets .find (
72
90
(m : WalletModule ) => m .name === appState .autoSelectWallet
73
91
)
74
92
75
93
app .update (store => ({ ... store , autoSelectWallet: ' ' }))
76
94
77
- module ? handleWalletSelect (module ) : finish ({ completed: false })
78
- } else {
79
- if (deviceWallets .find (wallet => wallet .preferred )) {
80
- // if preferred wallets, then split in to preferred and not preferred
81
- primaryWallets = deviceWallets .filter (wallet => wallet .preferred )
82
- secondaryWallets = deviceWallets .filter (wallet => ! wallet .preferred )
83
- } else {
84
- // otherwise make the first 4 wallets preferred
85
- primaryWallets = deviceWallets .slice (0 , 4 )
86
- secondaryWallets =
87
- deviceWallets .length > 4 ? deviceWallets .slice (4 ) : undefined
88
- }
89
-
90
- modalData = {
91
- heading ,
92
- description ,
93
- primaryWallets ,
94
- secondaryWallets
95
+ if (module ) {
96
+ handleWalletSelect (module )
95
97
}
96
98
}
97
99
}
You can’t perform that action at this time.
0 commit comments