Skip to content

Commit

Permalink
fix(custody-keyring): get apiUrl from custody type (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
zone-live authored Feb 8, 2024
1 parent c236f2c commit 0934775
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Partial<ICustodianTransactionLink>> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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<Partial<ICustodianTransactionLink>> => {
Expand Down

0 comments on commit 0934775

Please sign in to comment.