MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / setTransactionStatus

Function setTransactionStatus

transaction.go:2010–2016  ·  view source on GitHub ↗

setTransactionStatus determines and sets the appropriate status for a transaction. It evaluates the transaction's scheduled time and current status to set the correct status. If the transaction is scheduled for the future, it sets StatusScheduled. If the transaction has no status, it sets StatusQueu

(transaction *model.Transaction)

Source from the content-addressed store, hash-verified

2008// Parameters:
2009// - transaction *model.Transaction: The transaction for which to set the status.
2010func setTransactionStatus(transaction *model.Transaction) {
2011 if !transaction.ScheduledFor.IsZero() {
2012 transaction.Status = StatusScheduled
2013 } else if transaction.Status == "" {
2014 transaction.Status = StatusQueued
2015 }
2016}
2017
2018// setTransactionMetadata initializes and sets the required metadata for a transaction.
2019// calculates the transaction hash, and sets the precise amount based on the transaction's precision.

Callers 2

QueueTransactionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected