mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Merge branch 'main' into feature/swap-info-eps-field
# Conflicts: # package.json
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.48-dev.2-rc-2",
|
||||
"version": "0.19.48-dev.2-rc-3",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -51,7 +51,7 @@ type AtomicSwapHistoryBaseQuery = {
|
||||
type AtomicSwapHistorySourceQuery = AtomicSwapHistoryBaseQuery & {
|
||||
type?: 'source'
|
||||
expiredLock?: 0 | 1
|
||||
state?: 'LOCKED' | 'CLAIMED' | 'REFUNDED'
|
||||
state?: 'BEFORE-LOCK' | 'LOCKED' | 'CLAIMED' | 'REFUNDED'
|
||||
|
||||
}
|
||||
type AtomicSwapHistoryTargetQuery = AtomicSwapHistoryBaseQuery & {
|
||||
@@ -84,7 +84,6 @@ class BlockchainService {
|
||||
this.getUserEarned = this.getUserEarned.bind(this);
|
||||
this.getPoolsV3Info = this.getPoolsV3Info.bind(this);
|
||||
this.getHistory = this.getHistory.bind(this);
|
||||
this.getPrices = this.getPrices.bind(this);
|
||||
this.getPricesWithQuoteAsset = this.getPricesWithQuoteAsset.bind(this);
|
||||
this.getTokensFee = this.getTokensFee.bind(this);
|
||||
this.getGasPriceWei = this.getGasPriceWei.bind(this);
|
||||
@@ -216,12 +215,6 @@ class BlockchainService {
|
||||
{ headers: this.basicAuthHeaders }
|
||||
);
|
||||
|
||||
getPrices = () => fetchWithValidation(
|
||||
`${this.apiUrl}/api/prices`,
|
||||
z.record(z.string()).transform(makePartial),
|
||||
{ headers: this.basicAuthHeaders }
|
||||
);
|
||||
|
||||
getPricesWithQuoteAsset = () => fetchWithValidation(
|
||||
`${this.apiUrl}/api/quotedPrices`,
|
||||
pricesWithQuoteAssetSchema,
|
||||
|
||||
@@ -34,7 +34,7 @@ const sourceAtomicHistorySchemaItem = baseAtomicHistoryItem.extend({
|
||||
expiration: z.object({
|
||||
lock: z.number().optional(),
|
||||
}).optional(),
|
||||
state: z.enum(['LOCKED', 'REFUNDED', 'CLAIMED']),
|
||||
state: z.enum(['BEFORE-LOCK', 'LOCKED', 'REFUNDED', 'CLAIMED']),
|
||||
targetChainId: z.number(),
|
||||
transactions: z.object({
|
||||
lock: z.string().optional(),
|
||||
@@ -51,7 +51,7 @@ const targetAtomicHistorySchemaItem = baseAtomicHistoryItem.extend({
|
||||
expiration: z.object({
|
||||
redeem: z.number().optional(),
|
||||
}).optional(),
|
||||
state: z.enum(['REDEEMED', 'BEFORE-REDEEM']),
|
||||
state: z.enum(['BEFORE-REDEEM', 'REDEEMED']),
|
||||
transactions: z.object({
|
||||
redeem: z.string().optional(),
|
||||
}).optional(),
|
||||
|
||||
@@ -12,6 +12,8 @@ const ratingSchema = z.object({
|
||||
wallet: z.string(),
|
||||
staked_ve_token: z.string(),
|
||||
staked_ve_token_fmt: z.number(),
|
||||
staked_ve_token_weight: z.string(),
|
||||
staked_ve_token_weight_fmt: z.number(),
|
||||
weighted_volume: z.string(),
|
||||
weighted_volume_fmt: z.number(),
|
||||
total_weight: z.string(),
|
||||
@@ -25,6 +27,8 @@ const ratingSchema = z.object({
|
||||
wallet: z.string(),
|
||||
staked_ve_token: z.string(),
|
||||
staked_ve_token_fmt: z.number(),
|
||||
staked_ve_token_weight: z.string(),
|
||||
staked_ve_token_weight_fmt: z.number(),
|
||||
weighted_volume: z.string(),
|
||||
weighted_volume_fmt: z.number(),
|
||||
total_weight: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user