Skip to content

Commit 873e3fa

Browse files
committed
Add condition if tx is not success
Signed-off-by: Satyam Zode <[email protected]>
1 parent 292880c commit 873e3fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/friendbot/internal/minion.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ func (minion *Minion) Run(ctx context.Context, destAddress string, resultChan ch
9696
maybeTransactionSuccess: succ,
9797
maybeErr: errors.Wrapf(err, "submitting tx to minion %x", txHash),
9898
}
99-
span.SetAttributes(attribute.Bool("minion.tx_success_status", succ.Successful))
100-
span.SetStatus(codes.Ok, codes.Ok.String())
99+
if succ != nil {
100+
span.SetAttributes(attribute.Bool("minion.tx_success_status", succ.Successful))
101+
span.SetStatus(codes.Ok, codes.Ok.String())
102+
}
101103
}
102104

103105
// SubmitTransaction should be passed to the Minion.

0 commit comments

Comments
 (0)