style: general linting (#15756)

This commit is contained in:
Marko
2023-04-12 11:04:01 +00:00
committed by GitHub
parent 2b3fee5a29
commit 00e1f85eca
10 changed files with 22 additions and 33 deletions
+2 -2
View File
@@ -162,7 +162,7 @@ func (k keeper) addBalance(ctx context.Context, acct, denom string, amount uint6
Amount: amount,
}
} else {
balance.Amount = balance.Amount + amount
balance.Amount += amount
}
return k.store.BalanceTable().Save(ctx, balance)
@@ -179,7 +179,7 @@ func (k keeper) safeSubBalance(ctx context.Context, acct, denom string, amount u
return fmt.Errorf("insufficient funds")
}
balance.Amount = balance.Amount - amount
balance.Amount -= amount
if balance.Amount == 0 {
return balanceStore.Delete(ctx, balance)
+1
View File
@@ -12,6 +12,7 @@ func IsNotFound(err error) bool {
return errors.IsOf(err, NotFound)
}
// nolint: revive // avoid break API
var (
InvalidTableId = errors.New(codespace, 1, "invalid or missing table or single id, need a non-zero value")
MissingPrimaryKey = errors.New(codespace, 2, "table is missing primary key")