add the RetrievePoolDetails to the testutil and dev account service
This commit is contained in:
parent
bf830e92de
commit
b5ccaea575
12
dev/api.go
12
dev/api.go
@ -833,6 +833,18 @@ func (das *DevAccountService) FetchTopPools(ctx context.Context) ([]dataservicea
|
||||
return topPools, nil
|
||||
}
|
||||
|
||||
func (das *DevAccountService) RetrievePoolDetails(ctx context.Context, sym string) (*dataserviceapi.PoolDetails, error) {
|
||||
testPool := &dataserviceapi.PoolDetails{
|
||||
PoolName: "DevTest",
|
||||
PoolSymbol: "DEVT",
|
||||
PoolContractAdrress: "0x145F87d6198dEDD45C614FFD8b70E9a2fCCc5cc9",
|
||||
LimiterAddress: "",
|
||||
VoucherRegistry: "",
|
||||
}
|
||||
|
||||
return testPool, nil
|
||||
}
|
||||
|
||||
func (das *DevAccountService) GetPoolSwappableFromVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
var swapFromList []dataserviceapi.TokenHoldings
|
||||
|
||||
|
@ -22,7 +22,7 @@ type AccountService interface {
|
||||
SendPINResetSMS(ctx context.Context, admin, phone string) error
|
||||
PoolDeposit(ctx context.Context, amount, from, poolAddress, tokenAddress string) (*models.PoolDepositResult, error)
|
||||
FetchTopPools(ctx context.Context) ([]dataserviceapi.PoolDetails, error)
|
||||
RetrievePoolDetails(ctx context.Context, sym string)
|
||||
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)
|
||||
GetPoolSwapQuote(ctx context.Context, amount, from, fromTokenAddress, poolAddress, toTokenAddress string) (*models.PoolSwapQuoteResult, error)
|
||||
|
@ -81,6 +81,11 @@ func (m MockAccountService) FetchTopPools(ctx context.Context) ([]dataserviceapi
|
||||
return args.Get(0).([]dataserviceapi.PoolDetails), args.Error(1)
|
||||
}
|
||||
|
||||
func (m MockAccountService) RetrievePoolDetails(ctx context.Context, sym string) (*dataserviceapi.PoolDetails, error) {
|
||||
args := m.Called()
|
||||
return args.Get(0).(*dataserviceapi.PoolDetails), args.Error(1)
|
||||
}
|
||||
|
||||
func (m MockAccountService) GetPoolSwappableFromVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
args := m.Called(poolAddress, publicKey)
|
||||
return args.Get(0).([]dataserviceapi.TokenHoldings), args.Error(1)
|
||||
|
@ -85,6 +85,10 @@ func (m TestAccountService) FetchTopPools(ctx context.Context) ([]dataserviceapi
|
||||
return []dataserviceapi.PoolDetails{}, nil
|
||||
}
|
||||
|
||||
func (m TestAccountService) RetrievePoolDetails(ctx context.Context, sym string) (*dataserviceapi.PoolDetails, error) {
|
||||
return &dataserviceapi.PoolDetails{}, nil
|
||||
}
|
||||
|
||||
func (m TestAccountService) GetPoolSwappableFromVouchers(ctx context.Context, poolAddress, publicKey string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
return []dataserviceapi.TokenHoldings{}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user