getStableCoins

This commit is contained in:
Kirill Litvinov
2024-04-08 15:33:45 +03:00
parent 5e19224114
commit 515888a268
3 changed files with 14 additions and 3 deletions

View File

@@ -61,6 +61,7 @@ class Aggregator {
this.getPairsList = this.getPairsList.bind(this);
this.getSwapInfo = this.getSwapInfo.bind(this);
this.getTradeProfits = this.getTradeProfits.bind(this);
this.getStableCoins = this.getStableCoins.bind(this);
this.placeAtomicSwap = this.placeAtomicSwap.bind(this);
this.placeOrder = this.placeOrder.bind(this);
this.cancelOrder = this.cancelOrder.bind(this);
@@ -340,6 +341,16 @@ class Aggregator {
);
};
getStableCoins = () => {
const url = new URL(`${this.apiUrl}/api/v1/tokens/stable/`);
return fetchWithValidation(
url.toString(),
z.array(z.string()),
{ headers: this.basicAuthHeaders },
errorSchema,
);
};
/**
* Placing atomic swap. Placement must take place on the target chain.
* @param secretHash Secret hash