Skip to content

Commit

Permalink
update SelectProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Polyakov committed Jul 23, 2024
1 parent 44c3d42 commit fcebfea
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions src/components/shared/Dialog/SelectProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<Provider> {
Expand Down

0 comments on commit fcebfea

Please sign in to comment.