mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
TST: Add Electrum backup JSON test
This commit is contained in:
parent
99b4a1611c
commit
ed1640fe7c
@ -167,7 +167,12 @@ export class AbstractWallet {
|
||||
let parsedSecret;
|
||||
// regex might've matched invalid data. if so, parse newSecret.
|
||||
if (this.secret.trim().length > 0) {
|
||||
parsedSecret = JSON.parse(this.secret);
|
||||
try {
|
||||
parsedSecret = JSON.parse(this.secret);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
parsedSecret = JSON.parse(newSecret);
|
||||
}
|
||||
} else {
|
||||
parsedSecret = JSON.parse(newSecret);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user