diff --git a/src/app/components/receive/receive.component.ts b/src/app/components/receive/receive.component.ts index 1606cb6..ad11341 100644 --- a/src/app/components/receive/receive.component.ts +++ b/src/app/components/receive/receive.component.ts @@ -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.