From fd1278c4a0fc2654cf1dd94d3f9f58b5cd2f5bf1 Mon Sep 17 00:00:00 2001 From: Victoria Zotova Date: Thu, 25 Jul 2024 12:09:07 -0400 Subject: [PATCH] Expand getPorterUris() --- packages/shared/src/porter.ts | 8 ++++++-- packages/taco/src/taco.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/shared/src/porter.ts b/packages/shared/src/porter.ts index 0d6d5d16c..4dc054924 100644 --- a/packages/shared/src/porter.ts +++ b/packages/shared/src/porter.ts @@ -35,10 +35,14 @@ export const getPorterUri = (domain: Domain): string => { return getPorterUris(domain)[0]; }; -export const getPorterUris = (domain: Domain, porterUri?: string): string[] => { +export const getPorterUris = (domain: Domain, porterUri?: string | string[]): string[] => { const porterUris: string[] = []; if (porterUri) { - porterUris.push(porterUri); + if (porterUri instanceof Array) { + porterUris.push(...porterUri); + } else { + porterUris.push(porterUri); + } } const uri = defaultPorterUri[domain]; if (!uri) { diff --git a/packages/taco/src/taco.ts b/packages/taco/src/taco.ts index c5e60d92c..5a878fed0 100644 --- a/packages/taco/src/taco.ts +++ b/packages/taco/src/taco.ts @@ -139,7 +139,7 @@ export const decrypt = async ( provider: ethers.providers.Provider, domain: Domain, messageKit: ThresholdMessageKit, - porterUri?: string, + porterUri?: string | string[], signer?: ethers.Signer, customParameters?: Record, ): Promise => {