Skip to content

Commit

Permalink
remove redundant validation for clientId
Browse files Browse the repository at this point in the history
aleady checked in parent nomodal cosntructor
  • Loading branch information
BboyStatix committed Oct 23, 2023
1 parent 25fb094 commit f097222
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/modal/src/modalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ import { AdaptersModalConfig, IWeb3AuthModal, ModalConfig } from "./interface";

const fetchWhitelabel = async (clientId: string, web3AuthNetwork?: OPENLOGIN_NETWORK_TYPE): Promise<WhiteLabelData> => {
try {
// TODO: is this check required
if (!clientId) {
throw new Error("unspecified clientId");
}
const url = new URL(`${signerHost(web3AuthNetwork)}/api/whitelabel`);
url.searchParams.append("project_id", clientId);
const res = await get<{ whitelabel: WhiteLabelData }>(url.href);
Expand Down

0 comments on commit f097222

Please sign in to comment.