From 093477543ebf4866222cd8f0382c968a819fee4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?= Date: Thu, 8 Feb 2024 15:22:42 +0000 Subject: [PATCH] fix(custody-keyring): get apiUrl from custody type (#621) --- .../src/custodianTypes/bitgo/BitgoCustodyKeyring.ts | 3 +-- .../src/custodianTypes/cactus/CactusCustodyKeyring.ts | 3 +-- .../src/custodianTypes/qredo/QredoCustodyKeyring.ts | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/custodyKeyring/src/custodianTypes/bitgo/BitgoCustodyKeyring.ts b/packages/custodyKeyring/src/custodianTypes/bitgo/BitgoCustodyKeyring.ts index 3a83d411..0dbfc603 100644 --- a/packages/custodyKeyring/src/custodianTypes/bitgo/BitgoCustodyKeyring.ts +++ b/packages/custodyKeyring/src/custodianTypes/bitgo/BitgoCustodyKeyring.ts @@ -46,8 +46,7 @@ export class BitgoCustodyKeyring extends CustodyKeyring { }; sdkFactory = (authDetails: AuthDetails, envName: string): MMISDK => { - const { apiUrl } = this.getCustodianFromEnvName(envName); - return mmiSDKFactory(BitgoCustodianApi, authDetails, this.authType, apiUrl); + return mmiSDKFactory(BitgoCustodianApi, authDetails, this.authType, this.custodianType.apiUrl); }; txDeepLink = async (_custodianDetails, _txId) => { diff --git a/packages/custodyKeyring/src/custodianTypes/cactus/CactusCustodyKeyring.ts b/packages/custodyKeyring/src/custodianTypes/cactus/CactusCustodyKeyring.ts index 947d1790..58f439ba 100644 --- a/packages/custodyKeyring/src/custodianTypes/cactus/CactusCustodyKeyring.ts +++ b/packages/custodyKeyring/src/custodianTypes/cactus/CactusCustodyKeyring.ts @@ -45,8 +45,7 @@ export class CactusCustodyKeyring extends CustodyKeyring { public static addressType: AddressType.POLYCHAIN; sdkFactory = (authDetails: IRefreshTokenAuthDetails, envName: string): MMISDK => { - const { apiUrl } = this.getCustodianFromEnvName(envName); - return mmiSDKFactory(CactusCustodianApi, authDetails, this.authType, apiUrl); + return mmiSDKFactory(CactusCustodianApi, authDetails, this.authType, this.custodianType.apiUrl); }; txDeepLink = async (_custodianDetails, _txId): Promise> => { diff --git a/packages/custodyKeyring/src/custodianTypes/qredo/QredoCustodyKeyring.ts b/packages/custodyKeyring/src/custodianTypes/qredo/QredoCustodyKeyring.ts index 376527c9..261bf515 100644 --- a/packages/custodyKeyring/src/custodianTypes/qredo/QredoCustodyKeyring.ts +++ b/packages/custodyKeyring/src/custodianTypes/qredo/QredoCustodyKeyring.ts @@ -18,7 +18,7 @@ export class QredoCustodyKeyring extends CustodyKeyring { public readonly custodianType = { name: "Qredo", displayName: "Qredo", - apiUrl: "https://api.qredo.network", + apiUrl: "https://api-v2.qredo.network/api/v2", imgSrc: "https://dashboard.metamask-institutional.io/custodian-icons/qredo-icon.svg", icon: "https://dashboard.metamask-institutional.io/custodian-icons/qredo-icon.svg", website: "https://www.qredo.com", @@ -45,8 +45,7 @@ export class QredoCustodyKeyring extends CustodyKeyring { public static addressType: AddressType.POLYCHAIN; sdkFactory = (authDetails: IRefreshTokenAuthDetails, envName: string): MMISDK => { - const { apiUrl } = this.getCustodianFromEnvName(envName); - return mmiSDKFactory(QredoCustodianApi, authDetails, this.authType, apiUrl); + return mmiSDKFactory(QredoCustodianApi, authDetails, this.authType, this.custodianType.apiUrl); }; txDeepLink = async (_address: string, _txId: string): Promise> => {