Skip to content

Commit

Permalink
fix: display select-able account on ‘Account Drawer’ after granting a…
Browse files Browse the repository at this point in the history
…uthorisation on wallet extensions (#889)

* fix: removed calling duplicated requestExtensionsIfFirstAccess function

* refactor: clean up

* fix: removed duplicated code

* refactor: clean up
  • Loading branch information
impelcrypto authored Aug 2, 2023
1 parent ac6409f commit b1688c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 56 deletions.
12 changes: 0 additions & 12 deletions src/components/header/modals/ModalAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ import { useStore } from 'src/store';
import { SubstrateAccount } from 'src/store/general/state';
import { computed, defineComponent, PropType, ref, watch, onUnmounted, watchEffect } from 'vue';
import { useI18n } from 'vue-i18n';
import { useExtensions } from 'src/hooks/useExtensions';
import { useMetaExtensions } from 'src/hooks/useMetaExtensions';
import { useBreakpoints, useNetworkInfo } from 'src/hooks';
import { Ledger } from '@polkadot/hw-ledger';
import { astarChain } from 'src/config/chain';
Expand Down Expand Up @@ -328,14 +326,6 @@ export default defineComponent({
{ immediate: true }
);
const requestExtensionsIfFirstAccess = (): void => {
// Memo: displays wallet's authorization popup
const { extensions } = useExtensions($api!!, store);
const { metaExtensions, extensionCount } = useMetaExtensions($api!!, extensions)!!;
store.commit('general/setMetaExtensions', metaExtensions.value);
store.commit('general/setExtensionCount', extensionCount.value);
};
const updateIsLedgerAccount = async (isLedger: boolean): Promise<void> => {
localStorage.setItem(LOCAL_STORAGE.IS_LEDGER, isLedger.toString());
store.commit('general/setIsLedger', isLedger);
Expand Down Expand Up @@ -377,8 +367,6 @@ export default defineComponent({
}
};
watch([props.selectedWallet], requestExtensionsIfFirstAccess, { immediate: true });
watch([selAccount], () => {
toggleIsLedger.value = false;
});
Expand Down
44 changes: 0 additions & 44 deletions src/components/header/modals/ModalConnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,50 +124,6 @@
</div>
</div>
</div>
<div v-if="selWallet && isNoExtension" class="box--no-extension">
<div class="title--no-extension">
<span class="text--install-title">
{{ $t('installWallet.getWallet', { value: $t(selWallet.name) }) }}
</span>
</div>
<div class="row--no-extension">
<span class="text--install">
{{ $t('installWallet.installWallet', { value: $t(selWallet.name) }) }}</span
>
</div>
<div class="row--icon-links">
<button>
<a
:href="selWallet.walletUrl"
target="_blank"
rel="noopener noreferrer"
class="button--link"
>
<div class="icon--link">
<astar-icon-external-link />
</div>
<span class="text--install-link">
{{ $t('installWallet.install') }}
</span>
</a>
</button>
<button>
<a
:href="selWallet.guideUrl"
target="_blank"
rel="noopener noreferrer"
class="button--link"
>
<div class="icon--link">
<astar-icon-external-link />
</div>
<span class="text--install-link">
{{ $t('installWallet.learn') }}
</span>
</a>
</button>
</div>
</div>
</div>
<button :disabled="!currentAccountName" class="btn--disconnect" @click="disconnectAccount()">
{{ $t('disconnect') }}
Expand Down

1 comment on commit b1688c4

@4everland
Copy link

@4everland 4everland bot commented on b1688c4 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following parameters

parameters Value
IC b5oiz-tyaaa-aaaag-abp6a-cai
Assigned domain https://b5oiz-tyaaa-aaaag-abp6a-cai.ic0.app/
Custom domain https://decentralized.portal.astar.network

Please sign in to comment.