Skip to content

Commit

Permalink
Merge pull request #109 from HAOYUatHZ/patch-2
Browse files Browse the repository at this point in the history
style: refactor to more consistent error handlings style
  • Loading branch information
ZhAnGeek authored Jan 10, 2024
2 parents 409542e + b15a0cf commit c76a1a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions ecdsa/keygen/round_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,9 @@ func (round *round3) Start() *tss.Error {
var multiErr error
if len(culprits) > 0 {
for _, vssResult := range vssResults {
if vssResult.unWrappedErr == nil {
continue
if vssResult.unWrappedErr != nil {
multiErr = multierror.Append(multiErr, vssResult.unWrappedErr)
}
multiErr = multierror.Append(multiErr, vssResult.unWrappedErr)
}
return round.WrapError(multiErr, culprits...)
}
Expand Down
5 changes: 2 additions & 3 deletions eddsa/keygen/round_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ func (round *round3) Start() *tss.Error {
var multiErr error
if len(culprits) > 0 {
for _, vssResult := range vssResults {
if vssResult.unWrappedErr == nil {
continue
if vssResult.unWrappedErr != nil {
multiErr = multierror.Append(multiErr, vssResult.unWrappedErr)
}
multiErr = multierror.Append(multiErr, vssResult.unWrappedErr)
}
return round.WrapError(multiErr, culprits...)
}
Expand Down

0 comments on commit c76a1a5

Please sign in to comment.