Skip to content

Commit

Permalink
Expand getPorterUris()
Browse files Browse the repository at this point in the history
  • Loading branch information
vzotova committed Jul 30, 2024
1 parent 03f6d2b commit fd1278c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/shared/src/porter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/taco/src/taco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, CustomContextParam>,
): Promise<Uint8Array> => {
Expand Down

0 comments on commit fd1278c

Please sign in to comment.