use the TokenHoldings instead of TokenDetails
This commit is contained in:
@@ -24,7 +24,7 @@ type AccountService interface {
|
||||
FetchTopPools(ctx context.Context) ([]dataserviceapi.PoolDetails, error)
|
||||
RetrievePoolDetails(ctx context.Context, sym string) (*dataserviceapi.PoolDetails, error)
|
||||
GetPoolSwappableFromVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error)
|
||||
GetPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenDetails, error)
|
||||
GetPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenHoldings, error)
|
||||
GetPoolSwapQuote(ctx context.Context, amount, from, fromTokenAddress, poolAddress, toTokenAddress string) (*models.PoolSwapQuoteResult, error)
|
||||
PoolSwap(ctx context.Context, amount, from, fromTokenAddress, poolAddress, toTokenAddress string) (*models.PoolSwapResult, error)
|
||||
GetSwapFromTokenMaxLimit(ctx context.Context, poolAddress, fromTokenAddress, toTokenAddress, publicKey string) (*models.MaxLimitResult, error)
|
||||
|
||||
@@ -390,7 +390,7 @@ func (as *HTTPAccountService) getPoolSwappableFromVouchers(ctx context.Context,
|
||||
return r.PoolSwappableVouchers, nil
|
||||
}
|
||||
|
||||
func (as *HTTPAccountService) GetPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenDetails, error) {
|
||||
func (as *HTTPAccountService) GetPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
svc := dev.NewDevAccountService(ctx, as.SS)
|
||||
if as.UseApi {
|
||||
return as.getPoolSwappableVouchers(ctx, poolAddress)
|
||||
@@ -399,9 +399,9 @@ func (as *HTTPAccountService) GetPoolSwappableVouchers(ctx context.Context, pool
|
||||
}
|
||||
}
|
||||
|
||||
func (as HTTPAccountService) getPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenDetails, error) {
|
||||
func (as HTTPAccountService) getPoolSwappableVouchers(ctx context.Context, poolAddress string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
var r struct {
|
||||
PoolSwappableVouchers []dataserviceapi.TokenDetails `json:"filtered"`
|
||||
PoolSwappableVouchers []dataserviceapi.TokenHoldings `json:"filtered"`
|
||||
}
|
||||
|
||||
basePath, err := url.JoinPath(config.PoolSwappableVouchersURL, poolAddress, "to")
|
||||
|
||||
Reference in New Issue
Block a user