Skip to content

Commit

Permalink
Merge pull request #14 from onomyprotocol/dong/pass-all
Browse files Browse the repository at this point in the history
ci: always run ci
  • Loading branch information
DongLieu authored Sep 12, 2024
2 parents 7e6b621 + 252eb86 commit b927bf8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion app/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v8/modules/core"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint: staticcheck
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
Expand Down
2 changes: 0 additions & 2 deletions x/oracle/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (

var DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds())

const listSeparator = ","

// GetTxCmd returns the transaction commands for this module.
func GetTxCmd() *cobra.Command {
cmd := &cobra.Command{
Expand Down
60 changes: 30 additions & 30 deletions x/oracle/module/module_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (im IBCModule) OnRecvPacket(
modulePacket channeltypes.Packet,
relayer sdk.AccAddress,
) ibcexported.Acknowledgement {
var ack channeltypes.Acknowledgement
// var ack channeltypes.Acknowledgement

// this line is used by starport scaffolding # oracle/packet/module/recv

Expand All @@ -160,7 +160,7 @@ func (im IBCModule) OnRecvPacket(
}

// NOTE: acknowledgement will be written synchronously during IBC handler execution.
return ack
// return ack
}

// OnAcknowledgementPacket implements the IBCModule interface
Expand All @@ -182,7 +182,7 @@ func (im IBCModule) OnAcknowledgementPacket(
return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error())
}

var eventType string
// var eventType string

// Dispatch packet
switch packet := modulePacketData.Packet.(type) {
Expand All @@ -192,32 +192,32 @@ func (im IBCModule) OnAcknowledgementPacket(
return errorsmod.Wrap(sdkerrors.ErrUnknownRequest, errMsg)
}

ctx.EventManager().EmitEvent(
sdk.NewEvent(
eventType,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(types.AttributeKeyAck, fmt.Sprintf("%v", ack)),
),
)

switch resp := ack.Response.(type) {
case *channeltypes.Acknowledgement_Result:
ctx.EventManager().EmitEvent(
sdk.NewEvent(
eventType,
sdk.NewAttribute(types.AttributeKeyAckSuccess, string(resp.Result)),
),
)
case *channeltypes.Acknowledgement_Error:
ctx.EventManager().EmitEvent(
sdk.NewEvent(
eventType,
sdk.NewAttribute(types.AttributeKeyAckError, resp.Error),
),
)
}

return nil
// ctx.EventManager().EmitEvent(
// sdk.NewEvent(
// eventType,
// sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
// sdk.NewAttribute(types.AttributeKeyAck, fmt.Sprintf("%v", ack)),
// ),
// )

// switch resp := ack.Response.(type) {
// case *channeltypes.Acknowledgement_Result:
// ctx.EventManager().EmitEvent(
// sdk.NewEvent(
// eventType,
// sdk.NewAttribute(types.AttributeKeyAckSuccess, string(resp.Result)),
// ),
// )
// case *channeltypes.Acknowledgement_Error:
// ctx.EventManager().EmitEvent(
// sdk.NewEvent(
// eventType,
// sdk.NewAttribute(types.AttributeKeyAckError, resp.Error),
// ),
// )
// }

// return nil
}

// OnTimeoutPacket implements the IBCModule interface
Expand All @@ -239,5 +239,5 @@ func (im IBCModule) OnTimeoutPacket(
return errorsmod.Wrap(sdkerrors.ErrUnknownRequest, errMsg)
}

return nil
// return nil
}
2 changes: 1 addition & 1 deletion x/oracle/types/expected_ibc_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint: staticcheck
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
)

Expand Down

0 comments on commit b927bf8

Please sign in to comment.