findMappingByShadowID finds a lineage mapping by its shadow balance ID. Parameters: - mappings []model.LineageMapping: The lineage mappings to search. - shadowBalanceID string: The shadow balance ID to find. Returns: - *model.LineageMapping: The matching mapping, or nil if not found.
(mappings []model.LineageMapping, shadowBalanceID string)
| 1033 | // Returns: |
| 1034 | // - *model.LineageMapping: The matching mapping, or nil if not found. |
| 1035 | func (l *LedgerForge) findMappingByShadowID(mappings []model.LineageMapping, shadowBalanceID string) *model.LineageMapping { |
| 1036 | for i := range mappings { |
| 1037 | if mappings[i].ShadowBalanceID == shadowBalanceID { |
| 1038 | return &mappings[i] |
| 1039 | } |
| 1040 | } |
| 1041 | return nil |
| 1042 | } |
| 1043 | |
| 1044 | // GetBalanceLineage retrieves the fund lineage for a balance. |
| 1045 | // It returns a breakdown of funds by provider, showing how much was received and spent from each source. |
no outgoing calls