Skip to content

Commit

Permalink
add wallet name after connect
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed Oct 30, 2023
1 parent a8e6c7e commit f693e8a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/js/components/WalletConnectButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<WalletIcon class="h-6 w-6" />
<LoadingCircle v-if="loading" class="!text-white" />
<span v-else class="hidden sm:block">{{ walletSession ? 'Wallet connected' : 'Connect wallet' }}</span>
<span v-else class="hidden sm:block">{{ walletSession ? walletName : 'Connect wallet' }}</span>
</MenuButton>
</div>
<ScaleTransition>
Expand Down Expand Up @@ -68,6 +68,13 @@ const connectionStore = useConnectionStore();
const loading = ref(false);
const showAccountsModal = ref(false);
const walletName = computed(() => {
if (connectionStore.provider === 'wc') {
return 'Enjin Wallet';
} else if (connectionStore.provider === 'polkadot.js') {
return 'Polkadot.JS';
}
});
const walletSession = computed(() => connectionStore.wallet);
Expand Down

0 comments on commit f693e8a

Please sign in to comment.