Skip to content

Commit

Permalink
fix error checking in walletManager signTxn ref #255
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevAlDen committed Mar 9, 2020
1 parent 9b54a17 commit 9cd854b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/models/walletsManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,12 @@ func (walletM *WalletManager) signTxn(wltIds, address []string, source string, t
logWalletManager.WithError(err).Warnf("No signer %s for wallet %v", source, wlts[0])
return nil
}
if suid, err := signer.GetSignerUID(); err != nil && wlts[0].GetId() == string(suid) {
signerUid, err := signer.GetSignerUID()
if err != nil {
logWalletManager.WithError(err).Errorln("unable to ger signer uuid")
return nil
}
if wlts[0].GetId() == string(signerUid) {
// NOTE the signer is the wallet it self
signer = nil
}
Expand Down
2 changes: 0 additions & 2 deletions src/models/walletsModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ func (walletModel *WalletModel) data(index *core.QModelIndex, role int) *core.QV
}
return false
}
// FIXME: consider a double checking here instead of hadHwConnected
// be careful this can have a big performance impact
return core.NewQVariant1(valInSlice())
}
case Expand:
Expand Down

0 comments on commit 9cd854b

Please sign in to comment.