Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/only withdraw tokens from l1 #76

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename error
  • Loading branch information
beer-1 committed May 23, 2024
commit fc82b985643f9c94922c9e5ad73902bc9653de9c
9 changes: 0 additions & 9 deletions x/opchild/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,3 @@ func (k Keeper) L1ChainId(ctx context.Context) (string, error) {

return info.L1ChainId, nil
}

func (k Keeper) BridgeId(ctx context.Context) (uint64, error) {
info, err := k.BridgeInfo.Get(ctx)
if err != nil {
return 0, err
}

return info.BridgeId, nil
}
2 changes: 1 addition & 1 deletion x/opchild/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func (ms MsgServer) InitiateTokenWithdrawal(ctx context.Context, req *types.MsgI
if ok, err := ms.DenomPairs.Has(ctx, coin.Denom); err != nil {
return nil, err
} else if !ok {
return nil, types.ErrNotTokenFromL1
return nil, types.ErrNonL1Token
}

senderAddr, err := ms.authKeeper.AddressCodec().StringToBytes(req.Sender)
Expand Down
2 changes: 1 addition & 1 deletion x/opchild/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ var (
ErrInvalidPrices = errorsmod.Register(ModuleName, 19, "invalid oracle prices")
ErrMaxValidatorsExceeded = errorsmod.Register(ModuleName, 20, "max validators exceeded")
ErrMaxValidatorsLowerThanCurrent = errorsmod.Register(ModuleName, 21, "max validators cannot be lower than current number of validators")
ErrNotTokenFromL1 = errorsmod.Register(ModuleName, 22, "token is not from L1")
ErrNonL1Token = errorsmod.Register(ModuleName, 22, "token is not from L1")
)
Loading