Skip to content

Commit

Permalink
Dont process incoming ics20 transfers for minting denom if tokenfacto…
Browse files Browse the repository at this point in the history
…ry is paused (#79)
  • Loading branch information
jtieri authored Feb 6, 2023
1 parent ba79176 commit 4fc0441
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/tokenfactory/blockibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ func (im IBCMiddleware) OnRecvPacket(
return im.app.OnRecvPacket(ctx, packet, relayer)
}

if im.keeper.GetPaused(ctx).Paused {
return channeltypes.NewErrorAcknowledgement(types.ErrPaused.Error())
}

_, found := im.keeper.GetBlacklisted(ctx, data.Receiver)
if found {
ackErr = sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "receiver address is blacklisted")
Expand Down

0 comments on commit 4fc0441

Please sign in to comment.