From fcebfeadfa5da939a851b7116398fd4815114d24 Mon Sep 17 00:00:00 2001 From: Nikita-Polyakov Date: Tue, 23 Jul 2024 09:38:39 +0300 Subject: [PATCH] update SelectProvider --- .../shared/Dialog/SelectProvider.vue | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/components/shared/Dialog/SelectProvider.vue b/src/components/shared/Dialog/SelectProvider.vue index 9966c306a..2b6834331 100644 --- a/src/components/shared/Dialog/SelectProvider.vue +++ b/src/components/shared/Dialog/SelectProvider.vue @@ -43,26 +43,22 @@ export default class SelectProviderDialog extends Mixins(WalletConnectMixin) { return [Provider.WalletConnect]; } - return [Provider.Metamask, Provider.SubWallet, Provider.TrustWallet, Provider.WalletConnect]; + return Object.keys(Provider).map((key) => Provider[key]); } get wallets(): WalletInfo[] { - return Object.keys(Provider) - .filter((key) => this.allowedProviders.includes(key as Provider)) - .map((key) => { - const provider = Provider[key]; - - return { - extensionName: provider, - title: provider, - chromeUrl: '', - mozillaUrl: '', - logo: { - src: this.getEvmProviderIcon(provider), - alt: provider, - }, - }; - }); + return this.allowedProviders.map((provider) => { + return { + extensionName: provider, + title: provider, + chromeUrl: '', + mozillaUrl: '', + logo: { + src: this.getEvmProviderIcon(provider), + alt: provider, + }, + }; + }); } get selectedProvider(): Nullable {