File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " bnc-onboard" ,
3
- "version" : " 1.1.2 " ,
3
+ "version" : " 1.1.3 " ,
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 34
34
let checkingModule: boolean = false
35
35
let actionResolved: boolean | undefined = undefined
36
36
let loading: boolean = false
37
+ let loadingModal: boolean = false
37
38
38
39
// recheck modules if below conditions
39
40
$ : if (! activeModal && ! checkingModule ) {
122
123
}
123
124
124
125
function handleExit() {
126
+ resetState ()
125
127
app .update ((store : AppState ) => ({
126
128
... store ,
127
129
walletCheckInProgress: false
128
130
}))
129
- resetState ()
130
131
}
131
132
132
133
function resetState() {
138
139
}
139
140
140
141
function runModules(modules : WalletCheckModule []) {
142
+ loadingModal = true
141
143
return new Promise (
142
144
async (
143
145
resolve : (result : {
154
156
const result = await invalidState (module , get (state ))
155
157
156
158
if (result ) {
159
+ loadingModal = false
157
160
return resolve (result )
158
161
}
159
162
}
160
163
164
+ loadingModal = false
161
165
return resolve ({ modal: undefined , module: undefined })
162
166
}
163
167
)
231
235
}
232
236
</style >
233
237
234
- <Modal closeModal ={handleExit } closeable ={!! activeModal }>
235
- {#if activeModal }
238
+ {#if loadingModal }
239
+ <Modal closeable ={false }>
240
+ <Spinner />
241
+ </Modal >
242
+ {/if }
243
+
244
+ {#if activeModal }
245
+ <Modal closeModal ={handleExit }>
236
246
<ModalHeader icon ={activeModal .icon } heading ={activeModal .heading } />
237
247
<p class =" bn-onboard-custom bn-onboard-prepare-description" >
238
248
{@html activeModal .description }
261
271
{/if }
262
272
<Button onclick ={handleExit }>Dismiss</Button >
263
273
</div >
264
- {:else }
265
- <Spinner />
266
- {/if }
267
- </Modal >
274
+ </Modal >
275
+ {/if }
You can’t perform that action at this time.
0 commit comments