From 558e90585710e78136b0c6cd780f6a74399acef1 Mon Sep 17 00:00:00 2001 From: Aleksandr Kraiz Date: Fri, 11 Aug 2023 17:12:54 +0400 Subject: [PATCH 1/4] Remove prices endpoint --- package.json | 2 +- src/services/BlockchainService/index.ts | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/package.json b/package.json index feab0ee..0fd34f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.49", + "version": "0.19.50", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/services/BlockchainService/index.ts b/src/services/BlockchainService/index.ts index 15f88a0..22238bf 100644 --- a/src/services/BlockchainService/index.ts +++ b/src/services/BlockchainService/index.ts @@ -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, From d728a79eb9f8fed38b5ef8a8e26c0dbd54ee4ef9 Mon Sep 17 00:00:00 2001 From: Kirill Litvinov Date: Mon, 14 Aug 2023 18:56:04 +0300 Subject: [PATCH 2/4] stacked ve token weight --- package.json | 4 ++-- src/services/ReferralSystem/schemas/ratingSchema.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0fd34f8..8e31a9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.50", + "version": "0.19.51-rc1", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", @@ -108,4 +108,4 @@ "overrides": { "tsconfig-paths": "^4.0.0" } -} \ No newline at end of file +} diff --git a/src/services/ReferralSystem/schemas/ratingSchema.ts b/src/services/ReferralSystem/schemas/ratingSchema.ts index b67128a..c72b70b 100644 --- a/src/services/ReferralSystem/schemas/ratingSchema.ts +++ b/src/services/ReferralSystem/schemas/ratingSchema.ts @@ -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(), From 4c844574677df72b8253a05a257c4d85d2678a18 Mon Sep 17 00:00:00 2001 From: Kirill Litvinov Date: Mon, 14 Aug 2023 18:56:46 +0300 Subject: [PATCH 3/4] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e31a9c..ecdf176 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.51-rc1", + "version": "0.19.51", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", From c052c917f0dbd905fba04c810cc83e45dcd89776 Mon Sep 17 00:00:00 2001 From: Aleksandr Kraiz Date: Mon, 14 Aug 2023 20:04:36 +0400 Subject: [PATCH 4/4] Added state to bridge --- package.json | 4 ++-- src/services/BlockchainService/index.ts | 2 +- src/services/BlockchainService/schemas/atomicHistorySchema.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ecdf176..7c1a0e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.51", + "version": "0.19.52", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", @@ -108,4 +108,4 @@ "overrides": { "tsconfig-paths": "^4.0.0" } -} +} \ No newline at end of file diff --git a/src/services/BlockchainService/index.ts b/src/services/BlockchainService/index.ts index 22238bf..df239e9 100644 --- a/src/services/BlockchainService/index.ts +++ b/src/services/BlockchainService/index.ts @@ -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 & { diff --git a/src/services/BlockchainService/schemas/atomicHistorySchema.ts b/src/services/BlockchainService/schemas/atomicHistorySchema.ts index 4ab4fe9..afe4d40 100644 --- a/src/services/BlockchainService/schemas/atomicHistorySchema.ts +++ b/src/services/BlockchainService/schemas/atomicHistorySchema.ts @@ -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(),