Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set sms otp enabled and wallet connect based on dashboard configs #1762

Merged
merged 10 commits into from
Mar 27, 2024
Prev Previous commit
Next Next commit
fix null references for wcv2Adapter when instantiated with empty cons…
…tructor
  • Loading branch information
BboyStatix committed Mar 26, 2024
commit 22feb025a5d2ba1425e1fbbb3f03dd7165f73e05
Original file line number Diff line number Diff line change
@@ -155,13 +155,17 @@ class WalletConnectV2Adapter extends BaseEvmAdapter<void> {
setAdapterSettings(adapterSettings: Partial<WalletConnectV2AdapterOptions>): void {
super.setAdapterSettings(adapterSettings);
const { qrcodeModal, walletConnectInitOptions } = adapterSettings?.adapterSettings || {};
if (!this.adapterOptions) {
this.adapterOptions = { adapterSettings: {}, loginSettings: {} };
}

this.adapterOptions = {
...this.adapterOptions,
adapterSettings: this.adapterOptions?.adapterSettings ?? {},
loginSettings: this.adapterOptions?.loginSettings ?? {},
};

if (qrcodeModal) this.adapterOptions.adapterSettings.qrcodeModal = qrcodeModal;
if (walletConnectInitOptions)
this.adapterOptions.adapterSettings.walletConnectInitOptions = {
...(this.adapterOptions.adapterSettings.walletConnectInitOptions || {}),
...(this.adapterOptions.adapterSettings.walletConnectInitOptions ?? {}),
...walletConnectInitOptions,
};

Loading