mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
19 lines
497 B
Go
19 lines
497 B
Go
package services
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/storage/bun/paginate"
|
|
"github.com/hanzo-fi/payments/pkg/domain/models"
|
|
"github.com/hanzo-fi/payments/internal/storage"
|
|
)
|
|
|
|
func (s *Service) ConversionsList(ctx context.Context, query storage.ListConversionsQuery) (*paginate.Cursor[models.Conversion], error) {
|
|
cursor, err := s.storage.ConversionsList(ctx, query)
|
|
if err != nil {
|
|
return nil, newStorageError(err, "cannot list conversions")
|
|
}
|
|
|
|
return cursor, nil
|
|
}
|