Skip to content

Commit

Permalink
fix(oracle): convert the assetID to lowercase format when setting ora…
Browse files Browse the repository at this point in the history
…cle parameter (#166)

* convert the assetID to lowercase format when set oracle parameter

* rebase to the develop and fix the lint error
  • Loading branch information
TimmyExogenous authored Aug 19, 2024
1 parent 738e0b8 commit 60c3f17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion testutil/tx/eip712.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func PrepareEIP712CosmosTx(
if err != nil {
return nil, err
}
fee := legacytx.NewStdFee(txArgs.Gas, txArgs.Fees) //nolint: staticcheck
//nolint: staticcheck
fee := legacytx.NewStdFee(txArgs.Gas, txArgs.Fees)

msgs := txArgs.Msgs
data := legacytx.StdSignBytes(ctx.ChainID(), accNumber, nonce, 0, fee, msgs, "", nil)
Expand Down
2 changes: 2 additions & 0 deletions x/oracle/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"errors"
"strings"

paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -277,6 +278,7 @@ func (p Params) UpdateTokens(currentHeight uint64, tokens ...*Token) (Params, er
update := false
for tokenID := 1; tokenID < len(p.Tokens); tokenID++ {
token := p.Tokens[tokenID]
token.AssetID = strings.ToLower(token.AssetID)
if token.ChainID == t.ChainID && token.Name == t.Name {
// modify existing token
update = true
Expand Down

0 comments on commit 60c3f17

Please sign in to comment.