From 28b76ce4ca6c5f1b1a43b0317116ed4ef0e43e37 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Mon, 11 Jul 2022 20:41:43 +0300 Subject: [PATCH] Fix DeleteAccount --- protocol/messenger.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol/messenger.go b/protocol/messenger.go index bd0a17445..ddcac3377 100644 --- a/protocol/messenger.go +++ b/protocol/messenger.go @@ -2800,12 +2800,13 @@ func (m *Messenger) SaveAccounts(accs []*accounts.Account) error { } func (m *Messenger) DeleteAccount(address types.Address) error { - err := m.settings.DeleteAccount(address) + + acc, err := m.settings.GetAccountByAddress(address) if err != nil { return err } - acc, err := m.settings.GetAccountByAddress(address) + err = m.settings.DeleteAccount(address) if err != nil { return err }