receive page: auto-select account if it is the only account in the wallet
This commit is contained in:
parent
cd6d388e60
commit
e6dda6a930
1 changed files with 5 additions and 1 deletions
|
|
@ -112,10 +112,14 @@ export class ReceiveComponent implements OnInit, OnDestroy {
|
|||
|
||||
await this.updatePendingBlocks();
|
||||
|
||||
// Set the account selected in the sidebar as default
|
||||
if (this.walletService.wallet.selectedAccount !== null) {
|
||||
// Set the account selected in the sidebar as default
|
||||
this.pendingAccountModel = this.walletService.wallet.selectedAccount.id;
|
||||
this.onSelectedAccountChange(this.pendingAccountModel);
|
||||
} else if (this.accounts.length === 1) {
|
||||
// Auto-select account if it is the only account in the wallet
|
||||
this.pendingAccountModel = this.accounts[0].id;
|
||||
this.onSelectedAccountChange(this.pendingAccountModel);
|
||||
}
|
||||
|
||||
// Listen as new transactions come in. Ignore the latest transaction that is already present on page load.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue