Skip to content

Commit

Permalink
fix(fees): missing transactionID upon failing scheduled tx (#325)
Browse files Browse the repository at this point in the history
Signed-off-by: failfmi <[email protected]>
  • Loading branch information
failfmi authored Nov 8, 2021
1 parent ea0a6b3 commit a063ef8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/process/watcher/transfer/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (ctw Watcher) beginWatching(q qi.Queue) {
for {
transactions, e := ctw.client.GetAccountCreditTransactionsAfterTimestamp(ctw.accountID, milestoneTimestamp)
if e != nil {
ctw.logger.Errorf("Suddenly stopped monitoring account - [%s]", e)
ctw.logger.Errorf("Suddenly stopped monitoring account. Error: [%s]", e)
go ctw.beginWatching(q)
return
}
Expand Down
5 changes: 3 additions & 2 deletions app/services/transfers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ func (ts *Service) scheduledTxExecutionCallbacks(transferID, feeAmount string) (
return
}
err = ts.feeRepository.Create(&entity.Fee{
Amount: feeAmount,
Status: status.Failed,
TransactionID: transactionID,
Amount: feeAmount,
Status: status.Failed,
TransferID: sql.NullString{
String: transferID,
Valid: true,
Expand Down

0 comments on commit a063ef8

Please sign in to comment.