fix(wallet) ignoring err in RowsAffected()

Co-authored-by: saledjenic <86303051+saledjenic@users.noreply.github.com>
This commit is contained in:
Stefan Dunca 2023-11-29 14:34:08 +01:00
parent 99f4d621e0
commit c433908834
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ func ChangePairingState(db *sql.DB, topic Topic, active bool) error {
} }
rowsAffected, err := res.RowsAffected() rowsAffected, err := res.RowsAffected()
if err != nil {
return err
}
if rowsAffected == 0 { if rowsAffected == 0 {
return errors.New("unable to locate pairing entry for DB state change") return errors.New("unable to locate pairing entry for DB state change")
} }