File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/desktop/views/update-stronghold/views Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 17
17
export let password: string = ' '
18
18
export let isRecovery: boolean = false
19
19
20
+ let parsedError = null
20
21
let passwordError: string = ' '
21
22
let isBusy = false
22
23
44
45
handleError (err )
45
46
isBusy = false
46
47
const message = err ?.message ?? ' '
47
- const parsedError = isValidJson (message ) ? JSON .parse (message ) : ' '
48
- passwordError = parsedError ?.payload ?.error .replaceAll (' `' , ' ' ) ?? localize (message )
49
- if (passwordError . trim () == " stronghold migration error: input snapshot has incorrect/ unexpected version " ){
48
+ parsedError = isValidJson (message ) ? JSON .parse (message ) : ' '
49
+ const error = parsedError ?.payload ?.error .replaceAll (' `' , ' ' ) ?? localize (message )
50
+ if (error . includes ( " input unexpected" ) ){
50
51
$onboardingProfile .strongholdVersion = StrongholdVersion .V3 ;
52
+ emitStrongholdMigrationEvent ({ success: true })
51
53
$updateStrongholdRouter .next ()
52
54
return
55
+ } else {
56
+ passwordError = error
53
57
}
54
58
emitStrongholdMigrationEvent ({ success: false , onboardingType })
55
59
return
76
80
</form >
77
81
</div >
78
82
<div slot =" leftpane__action" >
83
+ <p >{JSON .stringify (parsedError )}</p >
79
84
<Button
80
85
type ={HTMLButtonType .Submit }
81
86
form =" update-stronghold-form"
You can’t perform that action at this time.
0 commit comments