Skip to content

Commit

Permalink
displayErrorsOnModal param added in web3auth
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshuchawla009 committed Mar 30, 2022
1 parent 968ad57 commit f8f2923
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/vue-app/src/chains/ethereum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ export default Vue.extend({
try {
this.parseConfig();
this.loading = true;
this.web3auth = new Web3Auth({ chainConfig: ethChainConfig, clientId: config.clientId, authMode: "DAPP", enableLogging: true });
this.web3auth = new Web3Auth({
chainConfig: ethChainConfig,
clientId: config.clientId,
authMode: "DAPP",
enableLogging: true,
});
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
network: this.openloginNetwork as OPENLOGIN_NETWORK_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ class WalletConnectV1Adapter extends BaseAdapter<void> {
}, Please switch to correct network from wallet`
)
);
this.status = ADAPTER_STATUS.READY;
this.rehydrated = true;
return;
}
}
Expand Down
8 changes: 8 additions & 0 deletions packages/modal/src/modalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ export interface Web3AuthOptions extends Web3AuthCoreOptions {
* Config for configuring modal ui display properties
*/
uiConfig?: UIConfig;

/**
* Whether to show errors on Web3Auth modal.
*
* @defaultValue `true`
*/
displayErrorsOnModal?: boolean;
}
export class Web3Auth extends Web3AuthCore {
public loginModal: LoginModal;
Expand Down Expand Up @@ -95,6 +102,7 @@ export class Web3Auth extends Web3AuthCore {
appLogo: this.options.uiConfig?.appLogo || "",
version: "",
adapterListener: this,
displayErrorsOnModal: this.options.displayErrorsOnModal,
});
this.subscribeToLoginModalEvents();
}
Expand Down

0 comments on commit f8f2923

Please sign in to comment.