rename the variables and read the stables param from the config
This commit is contained in:
		
							parent
							
								
									a354371a94
								
							
						
					
					
						commit
						343d30a2f2
					
				| @ -403,20 +403,23 @@ func (as HTTPAccountService) getPoolSwappableVouchers(ctx context.Context, poolA | ||||
| 		PoolSwappableVouchers []dataserviceapi.TokenHoldings `json:"filtered"` | ||||
| 	} | ||||
| 
 | ||||
| 	ep, err := url.JoinPath(config.PoolSwappableVouchersURL, poolAddress, "to") | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	u, err := url.Parse(ep) | ||||
| 	basePath, err := url.JoinPath(config.PoolSwappableVouchersURL, poolAddress, "to") | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	query := u.Query() | ||||
| 	query.Set("stable", "true") | ||||
| 	u.RawQuery = query.Encode() | ||||
| 	parsedURL, err := url.Parse(basePath) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	req, err := http.NewRequest("GET", u.String(), nil) | ||||
| 	query := parsedURL.Query() | ||||
| 	if config.IncludeStablesParam != "" { | ||||
| 		query.Set("stables", config.IncludeStablesParam) | ||||
| 	} | ||||
| 	parsedURL.RawQuery = query.Encode() | ||||
| 
 | ||||
| 	req, err := http.NewRequest("GET", parsedURL.String(), nil) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user