From 3c2889ac72f0f09abac7604a2a820081d8542cc7 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Thu, 13 Mar 2025 10:05:49 +0300 Subject: [PATCH] Added pool swap functions to the TestAccountService --- testutil/testservice/account_service.go | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/testutil/testservice/account_service.go b/testutil/testservice/account_service.go index 12b9de4..445fd9b 100644 --- a/testutil/testservice/account_service.go +++ b/testutil/testservice/account_service.go @@ -57,6 +57,10 @@ func (tas *TestAccountService) TokenTransfer(ctx context.Context, amount, from, }, nil } +func (m TestAccountService) PoolDeposit(ctx context.Context, amount, from, poolAddress, tokenAddress string) (*models.PoolDepositResult, error) { + return &models.PoolDepositResult{}, nil +} + func (m TestAccountService) CheckAliasAddress(ctx context.Context, alias string) (*models.AliasAddress, error) { return &models.AliasAddress{}, nil } @@ -64,3 +68,27 @@ func (m TestAccountService) CheckAliasAddress(ctx context.Context, alias string) func (m TestAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) { return &models.RequestAliasResult{}, nil } + +func (m TestAccountService) FetchTopPools(ctx context.Context) ([]dataserviceapi.PoolDetails, error) { + return []dataserviceapi.PoolDetails{}, nil +} + +func (m TestAccountService) GetPoolSwappableFromVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error) { + return []dataserviceapi.TokenHoldings{}, nil +} + +func (m TestAccountService) GetPoolSwappableVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error) { + return []dataserviceapi.TokenHoldings{}, nil +} + +func (m TestAccountService) GetPoolSwapQuote(ctx context.Context, amount, from, fromTokenAddress, poolAddress, toTokenAddress string) (*models.PoolSwapQuoteResult, error) { + return &models.PoolSwapQuoteResult{}, nil +} + +func (m TestAccountService) PoolSwap(ctx context.Context, amount, from, fromTokenAddress, poolAddress, toTokenAddress string) (*models.PoolSwapResult, error) { + return &models.PoolSwapResult{}, nil +} + +func (m TestAccountService) GetSwapFromTokenMaxLimit(ctx context.Context, poolAddress, fromTokenAddress, toTokenAddress, publicKey string) (*models.MaxLimitResult, error) { + return &models.MaxLimitResult{}, nil +}