From 54b6425dc6a72ab2f9e83f8570e3b685db67f966 Mon Sep 17 00:00:00 2001 From: Aleksandr Kraiz Date: Mon, 28 Nov 2022 14:21:07 +0400 Subject: [PATCH] Fix types --- src/services/OrionBlockchain/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/services/OrionBlockchain/index.ts b/src/services/OrionBlockchain/index.ts index 59bef09..88fa473 100644 --- a/src/services/OrionBlockchain/index.ts +++ b/src/services/OrionBlockchain/index.ts @@ -199,7 +199,11 @@ class OrionBlockchain { }), ); - claimOrder = (secretHash: string, targetNetwork: string, redeemTxHash?: string) => fetchWithValidation( + claimOrder = ( + secretHash: string, + targetNetwork: typeof networkCodes[number], + redeemTxHash?: string, + ) => fetchWithValidation( `${this.apiUrl}/api/atomic/claim-order`, z.string(), { @@ -218,7 +222,7 @@ class OrionBlockchain { redeemAtomicSwap = ( redeemOrder: z.infer, secret: string, - sourceNetwork: string, + sourceNetwork: typeof networkCodes[number], ) => fetchWithValidation( `${this.apiUrl}/api/atomic/matcher-redeem`, z.string(), @@ -240,7 +244,7 @@ class OrionBlockchain { secret1: string, redeemOrder2: z.infer, secret2: string, - sourceNetwork: string, + sourceNetwork: typeof networkCodes[number], ) => fetchWithValidation( `${this.apiUrl}/api/atomic/matcher-redeem2atomics`, z.string(),