OrionUnit siblings introduced

This commit is contained in:
Aleksandr Kraiz
2022-05-12 10:55:46 +04:00
parent 5735374575
commit c9acc57d68
7 changed files with 34 additions and 11 deletions

View File

@@ -10,8 +10,7 @@ import {
assetPairsConfigSchema, addressUpdateSchema, swapInfoSchema,
} from './schemas';
import UnsubscriptionType from './UnsubscriptionType';
import { SwapInfoByAmountIn, SwapInfoByAmountOut } from '../../..';
import { SupportedChainId } from '../../../types';
import { SwapInfoByAmountIn, SwapInfoByAmountOut, SupportedChainId } from '../../../types';
// import errorSchema from './schemas/errorSchema';
const UNSUBSCRIBE = 'u';

View File

@@ -9,7 +9,7 @@ import {
import { OrionBlockchainSocketIO } from './ws';
import redeemOrderSchema from '../OrionAggregator/schemas/redeemOrderSchema';
import { sourceAtomicHistorySchema, targetAtomicHistorySchema } from './schemas/atomicHistorySchema';
import { utils } from '../..';
import { makePartial } from '../../utils';
interface IAdminAuthHeaders {
auth: string;
@@ -115,11 +115,11 @@ class OrionBlockchain {
}
getPrices() {
return fetchWithValidation(`https://${this.apiUrl}/api/prices`, z.record(z.string()).transform(utils.makePartial));
return fetchWithValidation(`https://${this.apiUrl}/api/prices`, z.record(z.string()).transform(makePartial));
}
getTokensFee() {
return fetchWithValidation(`https://${this.apiUrl}/api/tokensFee`, z.record(z.string()).transform(utils.makePartial));
return fetchWithValidation(`https://${this.apiUrl}/api/tokensFee`, z.record(z.string()).transform(makePartial));
}
getGasPriceWei() {
@@ -295,7 +295,7 @@ class OrionBlockchain {
checkIfHashUsed(secretHashes: string[]) {
return fetchWithValidation(
`https://${this.apiUrl}/api/atomic/is-hash-used`,
z.record(z.boolean()).transform(utils.makePartial),
z.record(z.boolean()).transform(makePartial),
{
headers: {
'Content-Type': 'application/json',