Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
fix: use Msgf instead of Msg
Browse files Browse the repository at this point in the history
  • Loading branch information
wregulski committed Feb 1, 2024
1 parent 520d187 commit d86e177
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions action_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ func (c *Client) RevertTransaction(ctx context.Context, id string) error {
func (c *Client) UpdateTransaction(ctx context.Context, callbackResp *broadcast.SubmittedTx) error {
bump, err := bc.NewBUMPFromStr(callbackResp.MerklePath)
if err != nil {
msg := fmt.Sprintf("failed to parse merkle path from broadcast callback - tx: %v", callbackResp)
c.options.logger.Err(err).Msg(msg)
c.options.logger.Err(err).Msgf("failed to parse merkle path from broadcast callback - tx: %v", callbackResp)
return err
}

Expand All @@ -404,15 +403,13 @@ func (c *Client) UpdateTransaction(ctx context.Context, callbackResp *broadcast.

tx, err := c.GetTransaction(ctx, "", txInfo.ID)
if err != nil {
msg := fmt.Sprintf("failed to get transaction by id while processing callback: %v", txInfo.ID)
c.options.logger.Err(err).Msg(msg)
c.options.logger.Err(err).Msgf("failed to get transaction by id while processing callback: %v", txInfo.ID)
return err
}

tx.setChainInfo(txInfo)
if err = tx.Save(ctx); err != nil {
msg := fmt.Sprintf("failed to save transaction while processing callback: %v", txInfo.ID)
c.options.logger.Err(err).Msg(msg)
c.options.logger.Err(err).Msgf("failed to save transaction while processing callback: %v", txInfo.ID)
return err
}

Expand Down

0 comments on commit d86e177

Please sign in to comment.