diff --git a/x/transfermiddleware/keeper/abci.go b/x/transfermiddleware/keeper/abci.go index 032c09a51..4c45d2be5 100644 --- a/x/transfermiddleware/keeper/abci.go +++ b/x/transfermiddleware/keeper/abci.go @@ -10,7 +10,7 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) { // Iterate over remove list k.IterateRemoveListInfo(ctx, func(removeList types.RemoveParachainIBCTokenInfo) (stop bool) { // If pass the duration, remove parachain token info - if removeList.RemoveTime.After(ctx.BlockTime()) { + if ctx.BlockTime().After(removeList.RemoveTime) { k.RemoveParachainIBCInfo(ctx, removeList.NativeDenom) } diff --git a/x/transfermiddleware/keeper/keeper.go b/x/transfermiddleware/keeper/keeper.go index 39489758c..9a2700076 100644 --- a/x/transfermiddleware/keeper/keeper.go +++ b/x/transfermiddleware/keeper/keeper.go @@ -87,6 +87,8 @@ func (keeper Keeper) AddParachainIBCInfo(ctx sdk.Context, ibcDenom, channelID, n return nil } +// TODO: testing +// AddParachainIBCInfoToRemoveList add parachain token information token to remove list. func (keeper Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDenom string) (time.Time, error) { params := keeper.GetParams(ctx) store := ctx.KVStore(keeper.storeKey) @@ -110,6 +112,8 @@ func (keeper Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDeno return removeTime, nil } +// TODO: testing +// IterateRemoveListInfo iterate all parachain token in remove list. func (keeper Keeper) IterateRemoveListInfo(ctx sdk.Context, cb func(removeInfo types.RemoveParachainIBCTokenInfo) (stop bool)) { store := ctx.KVStore(keeper.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.KeyParachainIBCTokenRemoveListByNativeDenom)