Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Oct 4, 2024
1 parent efdecad commit 27d830c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions x/move/keeper/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,17 +438,17 @@ func (k Keeper) dispatchMessage(parentCtx sdk.Context, message vmtypes.CosmosMes
sdk.NewAttribute(types.AttributeKeySuccess, fmt.Sprintf("%v", success)),
)

// return error if failed and not allowed to fail
if !success && !allowFailure {
// emit failed reason event
if !success {
// return error if failed and not allowed to fail
if !allowFailure {
return

Check warning on line 444 in x/move/keeper/handler.go

View check run for this annotation

Codecov / codecov/patch

x/move/keeper/handler.go#L444

Added line #L444 was not covered by tests
}

// emit failed reason event if failed and allowed to fail
event.AppendAttributes(sdk.NewAttribute(types.AttributeKeyReason, err.Error()))
parentCtx.EventManager().EmitEvent(event)

return
}

// commit if success
if success {
} else {
// commit if success
commit()
}

Expand Down

0 comments on commit 27d830c

Please sign in to comment.