Skip to content

Commit

Permalink
remove useless variables
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Nov 8, 2024
1 parent 033aaa3 commit a64ae9a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions x/operator/keeper/consensus_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,17 +645,11 @@ func (k Keeper) NewValidatorByConsAddrForChainID(
delegatorTokens := make([]types.DelegatorInfo, 0)

opFunc := func(assetID string, state *assetstypes.OperatorAssetInfo) error {
// var price operatortypes.Price
var price oracletype.Price
var decimal uint32
if prices == nil {
return errorsmod.Wrap(types.ErrValueIsNilOrZero, "CalculateUSDValueForOperator prices map is nil")
}
price, ok := prices[assetID]
if !ok {
return errorsmod.Wrap(types.ErrKeyNotExistInMap, "CalculateUSDValueForOperator map: prices, key: assetID")
}
decimal, ok = decimals[assetID]
decimal, ok := decimals[assetID]
if !ok {
return errorsmod.Wrap(types.ErrKeyNotExistInMap, "CalculateUSDValueForOperator map: decimals, key: assetID")
}
Expand Down

0 comments on commit a64ae9a

Please sign in to comment.