Skip to content

Commit

Permalink
nicholas feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
stackman27 committed Jan 18, 2023
1 parent aaea359 commit 590593f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/apps/transfer/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func GetCmdQueryDenomHash() *cobra.Command {
}

// GetCmdQueryDenomHash defines the command to query a denomination hash from a given trace.
func GetCmdQueryIBCTokenOut() *cobra.Command {
func GetCmdQueryTotalEscrowForDenom() *cobra.Command {
cmd := &cobra.Command{
Use: "token-out [denom]",
Short: "Query the total source chain tokens that has been ibc'd out",
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability
// GetIBCOutDenomAmount gets the total source chain tokens that has been IBC'd out.
func (k Keeper) GetIBCOutDenomAmount(ctx sdk.Context, denom string) sdk.Int {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.GetIBCOutDenom(denom))
bz := store.Get(types.GetTotalEscrowForDenomKey(denom))
if bz == nil {
return sdk.NewInt(0)
}
Expand All @@ -174,5 +174,5 @@ func (k Keeper) SetIBCOutDenomAmount(ctx sdk.Context, denom string, amount sdk.I
if err != nil {
panic(err)
}
store.Set(types.GetIBCOutDenom(denom), bz)
store.Set(types.GetTotalEscrowForDenomKey(denom), bz)
}
2 changes: 1 addition & 1 deletion modules/apps/transfer/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ func GetEscrowAddress(portID, channelID string) sdk.AccAddress {
}

// GetIBCOutDenom holds the total ibcout for native tokens per transfer.
func GetIBCOutDenom(denom string) []byte {
func GetTotalEscrowForDenomKey(denom string) []byte {
return []byte(fmt.Sprintf("total_native_ibc_out/%s", denom))
}

0 comments on commit 590593f

Please sign in to comment.