Skip to content

generic lookupResources#2

Closed
cce wants to merge 3 commits intogmalouf:account-assets-applications-endpoint-enhancementsfrom
cce:account-assets-applications-endpoint-enhancements
Closed

generic lookupResources#2
cce wants to merge 3 commits intogmalouf:account-assets-applications-endpoint-enhancementsfrom
cce:account-assets-applications-endpoint-enhancements

Conversation

@cce
Copy link
Copy Markdown

@cce cce commented Feb 27, 2026

Example of having a single implementation of the core of lookupApplicationResources / lookupAssetResources

@cce
Copy link
Copy Markdown
Author

cce commented Feb 27, 2026

IDK? Easier to read? unsure

@cce
Copy link
Copy Markdown
Author

cce commented Mar 2, 2026

This version is pretty nice actually

Comment thread ledger/acctupdates.go
// resourceAdapter bridges lookupResources with the concrete delta slice and
// DB getters for a given resource type. These live in this package because
// ledgercore cannot import trackerdb (circular dependency).
type resourceAdapter[H, P any, R resourceDeltaRecord[H, P]] interface {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of adapter, wondering if it can also implement new methods of AssetHoldingDelta and co (GetHoldingValue, etc)

@cce cce deleted the branch gmalouf:account-assets-applications-endpoint-enhancements March 20, 2026 15:00
@cce cce closed this Mar 20, 2026
@cce cce deleted the account-assets-applications-endpoint-enhancements branch March 20, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants