Skip to content

Commit

Permalink
Always show account selector
Browse files Browse the repository at this point in the history
Don't skip it even when only one account exists, as the user might want to log into another account.
  • Loading branch information
sisou committed Sep 24, 2024
1 parent eba1382 commit f7c05fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/views/ChooseAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ export default class ChooseAddress extends BitcoinSyncBaseView {
staticStore.originalRouteName = RequestType.CHOOSE_ADDRESS;
if (useReplace) {
this.$router.replace({name: RequestType.ONBOARD});
} else {
this.$router.push({name: RequestType.ONBOARD});
}
this.$router.push({name: RequestType.ONBOARD});
}
private backgroundClass(address: string) {
Expand Down
17 changes: 9 additions & 8 deletions src/views/ConnectAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@ export default class ConnectAccount extends Vue {
private AccountType = AccountType;
private showAccountSelector = false;
private showAccountSelector = true;
private async created() {
if (this.wallets.length === 1 && this.wallets[0].type !== WalletType.LEDGER) {
this.setWallet(this.wallets[0], false);
} else {
// If more than one wallet exists or the one wallet is an unsupported LEDGER wallet, show the selector
this.showAccountSelector = true;
if (this.wallets.length === 0) {
this.goToOnboarding();
}
}
Expand Down Expand Up @@ -136,10 +133,14 @@ export default class ConnectAccount extends Vue {
client.connectAccount(request);
}
private goToOnboarding() {
private goToOnboarding(useReplace?: boolean) {
// Redirect to onboarding
staticStore.originalRouteName = RequestType.CONNECT_ACCOUNT;
this.$router.push({name: RequestType.ONBOARD});
if (useReplace) {
this.$router.replace({name: RequestType.ONBOARD});
} else {
this.$router.push({name: RequestType.ONBOARD});
}
}
}
</script>
Expand Down

0 comments on commit f7c05fb

Please sign in to comment.