mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-10 04:57:31 +03:00
Merge remote-tracking branch 'origin/main' into price-with-quote-asset
This commit is contained in:
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
||||
import {
|
||||
IDOSchema, atomicHistorySchema,
|
||||
poolsConfigSchema, poolsInfoSchema, infoSchema, historySchema,
|
||||
poolsV3InfoSchema,
|
||||
type addPoolSchema, adminPoolsListSchema, adminPoolSchema,
|
||||
atomicSummarySchema,
|
||||
poolsLpAndStakedSchema,
|
||||
@@ -81,6 +82,7 @@ class BlockchainService {
|
||||
this.getPoolsLpAndStaked = this.getPoolsLpAndStaked.bind(this);
|
||||
this.getUserVotes = this.getUserVotes.bind(this);
|
||||
this.getUserEarned = this.getUserEarned.bind(this);
|
||||
this.getPoolsV3Info = this.getPoolsV3Info.bind(this);
|
||||
this.getHistory = this.getHistory.bind(this);
|
||||
this.getPricesWithQuoteAsset = this.getPricesWithQuoteAsset.bind(this);
|
||||
this.getTokensFee = this.getTokensFee.bind(this);
|
||||
@@ -201,6 +203,12 @@ class BlockchainService {
|
||||
{ headers: this.basicAuthHeaders }
|
||||
);
|
||||
|
||||
getPoolsV3Info = () => fetchWithValidation(
|
||||
`${this.apiUrl}/api/pools-v3/info`,
|
||||
poolsV3InfoSchema,
|
||||
{ headers: this.basicAuthHeaders }
|
||||
);
|
||||
|
||||
getHistory = (address: string) => fetchWithValidation(
|
||||
`${this.apiUrl}/api/history/${address}`,
|
||||
historySchema,
|
||||
@@ -326,18 +334,18 @@ class BlockchainService {
|
||||
|
||||
checkAuth = (headers: IAdminAuthHeaders) => fetchWithValidation(`${this.apiUrl}/api/auth/check`, z.object({
|
||||
auth: z.boolean(),
|
||||
}), { headers: { ...headers, ...this.basicAuthHeaders }});
|
||||
}), { headers: { ...headers, ...this.basicAuthHeaders } });
|
||||
|
||||
getPool = (address: string, headers: IAdminAuthHeaders) => fetchWithValidation(
|
||||
`${this.apiUrl}/api/pools/${address}`,
|
||||
adminPoolSchema,
|
||||
{ headers: { ...headers, ...this.basicAuthHeaders }},
|
||||
{ headers: { ...headers, ...this.basicAuthHeaders } },
|
||||
);
|
||||
|
||||
getPoolsList = (headers: IAdminAuthHeaders) => fetchWithValidation(
|
||||
`${this.apiUrl}/api/pools/list`,
|
||||
adminPoolsListSchema,
|
||||
{ headers: { ...headers, ...this.basicAuthHeaders }},
|
||||
{ headers: { ...headers, ...this.basicAuthHeaders } },
|
||||
);
|
||||
|
||||
editPool = (address: string, data: IEditPool, headers: IAdminAuthHeaders) => fetchWithValidation(
|
||||
|
||||
Reference in New Issue
Block a user