tron driver removed
This commit is contained in:
@@ -61,11 +61,15 @@ func (*WalletBalance) Collection() string {
|
||||
// ManagedWalletFilter describes list filters.
|
||||
type ManagedWalletFilter struct {
|
||||
OrganizationRef string
|
||||
OwnerRef string
|
||||
Network string
|
||||
TokenSymbol string
|
||||
Cursor string
|
||||
Limit int32
|
||||
// OwnerRefFilter is a 3-state filter:
|
||||
// - nil: no filter on owner_ref (return all)
|
||||
// - pointer to empty string: filter for wallets where owner_ref is empty
|
||||
// - pointer to a value: filter for wallets where owner_ref matches
|
||||
OwnerRefFilter *string
|
||||
Network string
|
||||
TokenSymbol string
|
||||
Cursor string
|
||||
Limit int32
|
||||
}
|
||||
|
||||
// ManagedWalletList contains paginated wallet results.
|
||||
|
||||
@@ -156,9 +156,10 @@ func (w *Wallets) List(ctx context.Context, filter model.ManagedWalletFilter) (*
|
||||
query = query.Filter(repository.Field("organizationRef"), org)
|
||||
fields = append(fields, zap.String("organization_ref", org))
|
||||
}
|
||||
if owner := strings.TrimSpace(filter.OwnerRef); owner != "" {
|
||||
query = query.Filter(repository.Field("ownerRef"), owner)
|
||||
fields = append(fields, zap.String("owner_ref", owner))
|
||||
if filter.OwnerRefFilter != nil {
|
||||
ownerRef := strings.TrimSpace(*filter.OwnerRefFilter)
|
||||
query = query.Filter(repository.Field("ownerRef"), ownerRef)
|
||||
fields = append(fields, zap.String("owner_ref_filter", ownerRef))
|
||||
}
|
||||
if network := strings.TrimSpace(filter.Network); network != "" {
|
||||
normalized := strings.ToLower(network)
|
||||
|
||||
Reference in New Issue
Block a user