Skip to content

Commit

Permalink
fix: linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Jul 30, 2024
1 parent 05e755e commit 3377156
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions types/coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package types

import (
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
apilegacy "cosmossdk.io/api/cosmos/base/v1beta1"
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand All @@ -22,15 +21,15 @@ func CoinToProtoCoin(coin sdk.Coin) *basev1beta1.Coin {
}
}

func CoinToCosmosApiLegacy(coin sdk.Coin) *apilegacy.Coin {
c := apilegacy.Coin{Denom: coin.Denom, Amount: ""}
func CoinToCosmosAPILegacy(coin sdk.Coin) *basev1beta1.Coin {
c := basev1beta1.Coin{Denom: coin.Denom, Amount: ""}
if !coin.Amount.IsNil() {
c.Amount = coin.Amount.String()
}
return &c
}

func CoinFromCosmosApiLegacy(coin *apilegacy.Coin) sdk.Coin {
func CoinFromCosmosAPILegacy(coin *basev1beta1.Coin) sdk.Coin {
amount, _ := sdk.NewIntFromString(coin.Amount)
return sdk.Coin{Denom: coin.Denom, Amount: amount}
}
Expand Down

0 comments on commit 3377156

Please sign in to comment.