Skip to content

Commit

Permalink
pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Oct 22, 2024
1 parent aec511f commit af0069a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 2 additions & 6 deletions x/gmp/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ func GetCmdRelay() *cobra.Command {
return err
}

ctx := sdk.UnwrapSDKContext(cmd.Context())

if args[0] == "" {
return fmt.Errorf("destination-chain cannot be empty")
}
Expand Down Expand Up @@ -92,7 +90,7 @@ func GetCmdRelay() *cobra.Command {
denoms, // denoms
commandSelector, // command-selector
commandParams, // command-params
ctx.BlockTime().Unix(), // timestamp
0,
)
err = msg.ValidateBasic()
if err != nil {
Expand Down Expand Up @@ -120,8 +118,6 @@ func GetCmdRelayWithContractCall() *cobra.Command {
return err
}

ctx := sdk.UnwrapSDKContext(cmd.Context())

if args[0] == "" {
return fmt.Errorf("destination-chain cannot be empty")
}
Expand Down Expand Up @@ -176,7 +172,7 @@ func GetCmdRelayWithContractCall() *cobra.Command {
denoms, // denoms
commandSelector, // command-selector
commandParams, // command-params
ctx.BlockTime().Unix(), // timestamp
0,
)
err = msg.ValidateBasic()
if err != nil {
Expand Down
5 changes: 4 additions & 1 deletion x/gmp/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (k Keeper) RelayPrice(
ctx := sdk.UnwrapSDKContext(goCtx)
params := k.GetParams(ctx)

// set the timestamp to the current block time
msg.Timestamp = ctx.BlockTime().Unix()

bz, err := msg.Marshal()
if err != nil {
return nil, err
Expand Down Expand Up @@ -299,7 +302,7 @@ func (k Keeper) ProcessPayment(
[]string{payment.Denom},
types.EmptyByteSlice,
types.EmptyByteSlice,
ctx.BlockTime().Unix(),
0,
)
_, err = k.RelayPrice(goCtx, msg)
if err != nil {
Expand Down

0 comments on commit af0069a

Please sign in to comment.