File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 98
98
deviceWallets .length > 4 ? deviceWallets .slice (4 ) : undefined
99
99
}
100
100
101
- modalData = {
102
- heading ,
103
- description ,
104
- explanation ,
105
- primaryWallets ,
106
- secondaryWallets
107
- }
108
-
109
101
if (appState .autoSelectWallet ) {
110
102
const module = deviceWallets .find (
111
103
(m : WalletModule ) => m .name === appState .autoSelectWallet
114
106
app .update (store => ({ ... store , autoSelectWallet: ' ' }))
115
107
116
108
if (module ) {
117
- handleWalletSelect (module )
109
+ handleWalletSelect (module , true )
118
110
return
119
111
}
120
112
}
121
113
114
+ modalData = {
115
+ heading ,
116
+ description ,
117
+ explanation ,
118
+ primaryWallets ,
119
+ secondaryWallets
120
+ }
121
+
122
122
app .update (store => ({ ... store , walletSelectDisplayedUI: true }))
123
123
}
124
124
125
- async function handleWalletSelect(module : WalletModule ) {
125
+ async function handleWalletSelect(module : WalletModule , autoSelected ? : boolean ) {
126
126
const currentWalletInterface = get (walletInterface )
127
127
128
128
if (currentWalletInterface && currentWalletInterface .name === module .name ) {
163
163
selectedWallet: selectedWalletModule .name
164
164
})
165
165
166
- app .update (store => ({ ... store , walletSelectDisplayedUI: true }))
166
+ // if it was autoSelected then we need to add modalData to show the modal
167
+ if (autoSelected ) {
168
+ modalData = {
169
+ heading ,
170
+ description ,
171
+ explanation ,
172
+ primaryWallets ,
173
+ secondaryWallets
174
+ }
175
+
176
+ app .update (store => ({ ... store , walletSelectDisplayedUI: true }))
177
+ }
167
178
168
179
return
169
180
}
You can’t perform that action at this time.
0 commit comments