Skip to content

Commit

Permalink
fix: wrong compare address onchain asset (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
trkhoi authored Nov 20, 2023
1 parent 108e6e4 commit c0b36fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/entities/wallet_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"

"github.com/defipod/mochi/pkg/logger"
Expand Down Expand Up @@ -411,7 +412,7 @@ func (e *Entity) enrichDataWalletAsset(assets []response.WalletAssetData) []resp
// enrich id into assets
for i, asset := range assets {
for _, token := range tokens {
if token.Symbol == asset.Token.Symbol && token.ChainId == fmt.Sprint(asset.ChainID) && token.Address == asset.Token.Address {
if strings.EqualFold(token.Symbol, asset.Token.Symbol) && token.ChainId == fmt.Sprint(asset.ChainID) && strings.EqualFold(token.Address, asset.Token.Address) {
assets[i].Token.Id = token.Id
break
}
Expand Down

0 comments on commit c0b36fd

Please sign in to comment.