Skip to content

Commit 715f9a9

Browse files
committed
Avoid error (liveEndpointUrlPrefix missing) upon Client initialisation
1 parent 7311e5d commit 715f9a9

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/__tests__/client.spec.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,6 @@ describe("API Client", function (): void {
103103
expect(client.config.terminalApiCloudEndpoint).toBe("https://terminal-api-us.adyen.com");
104104
});
105105

106-
test("should throw error if liveEndpointUrlPrefix is missing in LIVE environment", () => {
107-
const config = new Config({
108-
apiKey: "ADYEN_API_KEY",
109-
environment: "LIVE"
110-
});
111-
expect(() => {
112-
new Client(config);
113-
}).toThrow("Live endpoint URL prefix must be provided for LIVE environment.");
114-
});
115-
116106
test("should set and get custom http client", () => {
117107
const config = new Config({
118108
apiKey: "ADYEN_API_KEY",

src/client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ class Client {
5454
}
5555
}
5656

57-
if(this.config.environment === "LIVE" && !this.config.liveEndpointUrlPrefix) {
58-
throw new Error("Live endpoint URL prefix must be provided for LIVE environment.");
59-
}
60-
6157
// legacy support for marketPayEndpoint
6258
if (this.config.environment === "TEST") {
6359
this.config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST;

0 commit comments

Comments
 (0)