Skip to content

Commit

Permalink
feat: implement interface changes for cctp (#5)
Browse files Browse the repository at this point in the history
* chore: init module

* feat: implement interface changes for cctp
  • Loading branch information
johnletey committed Oct 23, 2023
1 parent 286ae19 commit 5c05160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/fiattokenfactory/keeper/msg_server_burn.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import (

func (k msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.MsgBurnResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
return k.Keeper.Burn(ctx, msg)
}

func (k Keeper) Burn(ctx sdk.Context, msg *types.MsgBurn) (*types.MsgBurnResponse, error) {
_, found := k.GetMinters(ctx, msg.From)
if !found {
return nil, sdkerrors.Wrapf(types.ErrBurn, "%v: you are not a minter", types.ErrUnauthorized)
Expand Down
3 changes: 3 additions & 0 deletions x/fiattokenfactory/keeper/msg_server_mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import (

func (k msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types.MsgMintResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
return k.Keeper.Mint(ctx, msg)
}

func (k Keeper) Mint(ctx sdk.Context, msg *types.MsgMint) (*types.MsgMintResponse, error) {
minter, found := k.GetMinters(ctx, msg.From)
if !found {
return nil, sdkerrors.Wrapf(types.ErrUnauthorized, "you are not a minter")
Expand Down

0 comments on commit 5c05160

Please sign in to comment.