added CheckTokenInPool to the account_service and test utils

This commit is contained in:
Alfred Kamanda 2025-05-17 14:45:12 +03:00
parent ee434dba69
commit 050998ff82
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
3 changed files with 10 additions and 0 deletions

View File

@ -27,4 +27,5 @@ type AccountService interface {
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)
CheckTokenInPool(ctx context.Context, poolAddress, tokenAddress string) (*models.TokenInPoolResult, error)
}

View File

@ -105,3 +105,8 @@ func (m MockAccountService) GetSwapFromTokenMaxLimit(ctx context.Context, poolAd
args := m.Called(poolAddress, fromTokenAddress, toTokenAddress, publicKey)
return args.Get(0).(*models.MaxLimitResult), args.Error(1)
}
func (m MockAccountService) CheckTokenInPool(ctx context.Context, poolAddress, tokenAddress string) (*models.TokenInPoolResult, error) {
args := m.Called(poolAddress, tokenAddress)
return args.Get(0).(*models.TokenInPoolResult), args.Error(1)
}

View File

@ -104,3 +104,7 @@ func (m TestAccountService) PoolSwap(ctx context.Context, amount, from, fromToke
func (m TestAccountService) GetSwapFromTokenMaxLimit(ctx context.Context, poolAddress, fromTokenAddress, toTokenAddress, publicKey string) (*models.MaxLimitResult, error) {
return &models.MaxLimitResult{}, nil
}
func (m TestAccountService) CheckTokenInPool(ctx context.Context, poolAddress, tokenAddress string) (*models.TokenInPoolResult, error) {
return &models.TokenInPoolResult{}, nil
}