Skip to content

Commit

Permalink
SFT-2757: fixed account deletion with passphrases
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg-foundation committed Sep 13, 2023
1 parent f408cd6 commit c9ea05b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ async def confirm_delete(self):
self.set_result(False)

async def do_delete(self):
from common import settings

(error,) = await spinner_task('Deleting Account', delete_account_task,
args=[self.account.get('acct_num')])
args=[self.account.get('acct_num'),
settings.get('xfp')])
if error is None:
import common
from utils import start_task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from utils import get_accounts


async def delete_account_task(on_done, account_num):
async def delete_account_task(on_done, account_num, xfp):
from common import settings

accounts = get_accounts()
accounts = list(filter(lambda acct: acct.get('acct_num') != account_num, accounts))
accounts = list(filter(lambda acct: (acct.get('acct_num') != account_num or acct.get('xfp') != xfp), accounts))
settings.set('accounts', accounts)
settings.save()

Expand Down

0 comments on commit c9ea05b

Please sign in to comment.