Skip to content

Commit 9cad3f4

Browse files
committed
If user provided porter URIs then don't use default URIs
1 parent ee51b90 commit 9cad3f4

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

packages/shared/src/porter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ export const getPorterUri = async (domain: Domain): Promise<string> => {
4040

4141
export const getPorterUris = async (
4242
domain: Domain,
43-
porterUris: string[] = [],
4443
): Promise<string[]> => {
45-
const fullList = [...porterUris];
44+
const fullList = [];
4645
const uri = defaultPorterUri[domain];
4746
if (!uri) {
4847
throw new Error(`No default Porter URI found for domain: ${domain}`);

packages/taco/src/taco.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const encryptWithPublicKey = async (
130130
* Must match the `ritualId`.
131131
* @param {ThresholdMessageKit} messageKit - The kit containing the message to be decrypted
132132
* @param authProvider - The authentication provider that will be used to provide the authorization
133-
* @param {string[]} [porterUri] - The URI(s) for the Porter service. If not provided, a value will be obtained
133+
* @param {string[]} [porterUris] - The URI(s) for the Porter service. If not provided, a value will be obtained
134134
* from the Domain
135135
* @param {Record<string, CustomContextParam>} [customParameters] - Optional custom parameters that may be required
136136
* depending on the condition used
@@ -145,10 +145,10 @@ export const decrypt = async (
145145
domain: Domain,
146146
messageKit: ThresholdMessageKit,
147147
authProvider?: EIP4361AuthProvider,
148-
porterUris: string[] = [],
148+
porterUris?: string[],
149149
customParameters?: Record<string, CustomContextParam>,
150150
): Promise<Uint8Array> => {
151-
const porterUrisFull: string[] = await getPorterUris(domain, porterUris);
151+
const porterUrisFull: string[] = porterUris ? porterUris : await getPorterUris(domain);
152152

153153
const ritualId = await DkgCoordinatorAgent.getRitualIdFromPublicKey(
154154
provider,

0 commit comments

Comments
 (0)