Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-enebeli committed Jan 18, 2025
1 parent f3ec0ad commit a48fd76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -1076,9 +1076,10 @@ func (l *Blnk) finalizeCommitment(ctx context.Context, transaction *model.Transa
transaction.TransactionID = model.GenerateUUIDWithSuffix("txn")
transaction.Reference = model.GenerateUUIDWithSuffix("ref")
transaction.Hash = transaction.HashTxn()
transaction.PreciseAmount = model.ApplyPrecision(transaction)

// Queue the transaction for further processing
transaction, err := l.QueueTransaction(ctx, transaction)
transaction, err := l.RecordTransaction(ctx, transaction)
if err != nil {
span.RecordError(err)
return nil, l.logAndRecordError(span, "saving transaction to db error", err)
Expand Down Expand Up @@ -1662,6 +1663,7 @@ func (l *Blnk) RefundTransaction(ctx context.Context, transactionID string) (*mo

// Create a new refund transaction
newTransaction := *originalTxn
newTransaction.TransactionID = model.GenerateUUIDWithSuffix("txn")
newTransaction.Reference = model.GenerateUUIDWithSuffix("ref")
newTransaction.ParentTransaction = originalTxn.TransactionID
newTransaction.Source = originalTxn.Destination
Expand Down

0 comments on commit a48fd76

Please sign in to comment.