added CheckTokenInPool to the account_service and test utils
This commit is contained in:
parent
ee434dba69
commit
050998ff82
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user