chore(all): replace all fmt.Errorf without paramters with errors.New (#21068)

This commit is contained in:
yukionfire
2024-07-25 14:54:49 +02:00
committed by GitHub
parent 6a2d039e12
commit d6ad92db0f
57 changed files with 127 additions and 103 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package decoding
import (
"errors"
"fmt"
"reflect"
"sort"
@@ -360,7 +361,7 @@ func (e exampleBankModule) subBalance(acct, denom string, amount uint64) error {
key := balanceKey(acct, denom)
cur := e.store.GetUInt64(key)
if cur < amount {
return fmt.Errorf("insufficient balance")
return errors.New("insufficient balance")
}
e.store.SetUInt64(key, cur-amount)
return nil