File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,8 +91,12 @@ const transferAmount = ref('');
9191const showRestoreWallet = ref (false );
9292const restoreWalletReason = ref (' ' );
9393const importLock = ref (false );
94- watch (showExportModal, async (showExportModal ) => {
95- if (showExportModal) {
94+ watch (showExportModal, async () => {
95+ if (showExportModal .value ) {
96+ if (isViewOnly .value && ! (await restoreWallet ())) {
97+ showExportModal .value = false ;
98+ return ;
99+ }
96100 keyToBackup .value = await activeWallet .value .getKeyToBackup ();
97101 } else {
98102 // Wipe key to backup, just in case
Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ export class Wallet {
566566 const account = await (
567567 await Database . getInstance ( )
568568 ) . getAccount ( this . getKeyToExport ( ) ) ;
569- return account . encWif ;
569+ if ( account ?. encWif ) return account . encWif ;
570570 }
571571 return this . getKeyToEncrypt ( ) ;
572572 }
You can’t perform that action at this time.
0 commit comments