getLineageProvider extracts the fund provider from the transaction metadata. Parameters: - txn *model.Transaction: The transaction to extract the provider from. Returns: - string: The provider identifier, or empty string if not set.
(txn *model.Transaction)
| 175 | // Returns: |
| 176 | // - string: The provider identifier, or empty string if not set. |
| 177 | func (l *LedgerForge) getLineageProvider(txn *model.Transaction) string { |
| 178 | if txn.MetaData == nil { |
| 179 | return "" |
| 180 | } |
| 181 | provider, ok := txn.MetaData[LineageProviderKey].(string) |
| 182 | if !ok { |
| 183 | return "" |
| 184 | } |
| 185 | return provider |
| 186 | } |
| 187 | |
| 188 | // validateLineageProvider checks if the specified provider exists on the source balance. |
| 189 | // If the source tracks fund lineage but doesn't have the specified provider, |
no outgoing calls