added CheckTokenInPool to check whether a token can be swapped from in a pool

This commit is contained in:
2025-05-17 14:37:06 +03:00
parent f101ffd4c9
commit ee434dba69
2 changed files with 33 additions and 1 deletions

View File

@@ -870,7 +870,6 @@ func (das *DevAccountService) GetPoolSwappableVouchers(ctx context.Context, pool
}
func (das *DevAccountService) GetSwapFromTokenMaxLimit(ctx context.Context, poolAddress, fromTokenAddress, toTokenAddress, publicKey string) (*models.MaxLimitResult, error) {
p, ok := das.pools[poolAddress]
if !ok {
return nil, fmt.Errorf("Pool address: %v not found ", poolAddress)
@@ -884,3 +883,9 @@ func (das *DevAccountService) GetSwapFromTokenMaxLimit(ctx context.Context, pool
Max: limit,
}, nil
}
func (das *DevAccountService) CheckTokenInPool(ctx context.Context, poolAddress, tokenAddress string) (*models.TokenInPoolResult, error) {
return &models.TokenInPoolResult{
CanSwapFrom: true,
}, nil
}