File tree Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " bnc-onboard" ,
3
- "version" : " 1.2.3 " ,
3
+ "version" : " 1.2.4 " ,
4
4
"description" : " Onboard users to web3 by allowing them to select a wallet, get that wallet ready to transact and have access to synced wallet state." ,
5
5
"keywords" : [
6
6
" ethereum" ,
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { fade } from ' svelte/transition'
3
2
import Button from ' ../elements/Button.svelte'
4
3
import IconButton from ' ../elements/IconButton.svelte'
5
4
import { WalletSelectModalData , WalletModule } from ' ../interfaces'
18
17
align-items : center ;
19
18
list-style-type : none ;
20
19
margin : 1.25em 0 ;
21
- max-height : 66vh ;
22
- overflow-y : scroll ;
23
20
padding : 0 ;
24
- scrollbar-width : none ;
25
21
font-family : inherit ;
26
22
font-size : inherit ;
27
23
line-height : 1.15 ;
51
47
}
52
48
53
49
ul {
54
- scrollbar-width : unset ;
50
+ max-height : 66vh ;
51
+ overflow-y : scroll ;
55
52
}
56
53
}
57
54
</style >
58
55
59
56
<ul class =" bn-onboard-custom bn-onboard-modal-select-wallets" >
60
- {#each modalData .primaryWallets as wallet }
61
- <li in:fade >
57
+ {#each modalData .primaryWallets as wallet , i ( wallet . name ) }
58
+ <li >
62
59
<IconButton
63
60
onclick ={() => handleWalletSelect (wallet )}
64
61
iconSrc ={wallet .iconSrc }
78
75
{/if }
79
76
80
77
{#if showingAllWalletModules }
81
- {#each modalData .secondaryWallets as wallet }
82
- <li in:fade >
78
+ {#each modalData .secondaryWallets as wallet , i ( wallet . name ) }
79
+ <li >
83
80
<IconButton
84
81
onclick ={() => handleWalletSelect (wallet )}
85
82
iconSrc ={wallet .iconSrc }
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ function metamask(
43
43
link : 'https://metamask.io/' ,
44
44
installMessage : extensionInstallMessage ,
45
45
desktop : true ,
46
+ mobile : true ,
46
47
preferred
47
48
}
48
49
}
Original file line number Diff line number Diff line change 66
66
return ! osExclusions .includes (os )
67
67
})
68
68
69
+ if (deviceWallets .find (wallet => wallet .preferred )) {
70
+ // if preferred wallets, then split in to preferred and not preferred
71
+ primaryWallets = deviceWallets .filter (wallet => wallet .preferred )
72
+ secondaryWallets = deviceWallets .filter (wallet => ! wallet .preferred )
73
+ } else {
74
+ // otherwise make the first 4 wallets preferred
75
+ primaryWallets = deviceWallets .slice (0 , 4 )
76
+ secondaryWallets =
77
+ deviceWallets .length > 4 ? deviceWallets .slice (4 ) : undefined
78
+ }
79
+
80
+ modalData = {
81
+ heading ,
82
+ description ,
83
+ primaryWallets ,
84
+ secondaryWallets
85
+ }
86
+
69
87
if (appState .autoSelectWallet ) {
70
88
const module = deviceWallets .find (
71
89
(m : WalletModule ) => m .name === appState .autoSelectWallet
72
90
)
73
91
74
92
app .update (store => ({ ... store , autoSelectWallet: ' ' }))
75
93
76
- module ? handleWalletSelect (module ) : finish ({ completed: false })
77
- } else {
78
- if (deviceWallets .find (wallet => wallet .preferred )) {
79
- // if preferred wallets, then split in to preferred and not preferred
80
- primaryWallets = deviceWallets .filter (wallet => wallet .preferred )
81
- secondaryWallets = deviceWallets .filter (wallet => ! wallet .preferred )
82
- } else {
83
- // otherwise make the first 4 wallets preferred
84
- primaryWallets = deviceWallets .slice (0 , 4 )
85
- secondaryWallets =
86
- deviceWallets .length > 4 ? deviceWallets .slice (4 ) : undefined
87
- }
88
-
89
- modalData = {
90
- heading ,
91
- description ,
92
- primaryWallets ,
93
- secondaryWallets
94
+ if (module ) {
95
+ handleWalletSelect (module )
94
96
}
95
97
}
96
98
}
You can’t perform that action at this time.
0 commit comments