Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Oct 15, 2024
1 parent e6734ab commit 3126645
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/nexus/keeper/msg_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (m Messenger) routeMsg(ctx sdk.Context, msg exported.WasmMessage) error {
}

// If message already exists, then this is a no-op to avoid causing an error from reverting the whole message batch being routed in Amplifier
if _, ok := m.Nexus.GetMessage(ctx, msg.ID); ok {
if _, ok := m.GetMessage(ctx, msg.ID); ok {
return nil
}

Expand All @@ -78,7 +78,7 @@ func (m Messenger) routeMsg(ctx sdk.Context, msg exported.WasmMessage) error {
recipient := exported.CrossChainAddress{Chain: destinationChain, Address: msg.DestinationAddress}

nexusMsg := exported.NewGeneralMessage(fmt.Sprintf("%s-%s", msg.SourceChain, msg.ID), sender, recipient, msg.PayloadHash, msg.SourceTxID, msg.SourceTxIndex, nil)
if err := m.Nexus.SetNewMessage(ctx, nexusMsg); err != nil {
if err := m.SetNewMessage(ctx, nexusMsg); err != nil {
return err
}

Expand Down

0 comments on commit 3126645

Please sign in to comment.