Skip to content

Commit

Permalink
fix: onWalletSelected insertion logic papers/airgap/airgap-vault#451
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Jul 12, 2023
1 parent 3bc6678 commit 66bdd6c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/app/pages/accounts-list/accounts-list.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,9 @@ export class AccountsListPage {
}

public onWalletSelected(wallet: AirGapWallet): void {
if (this.selectedWallets?.includes(wallet)) {
const index = this.selectedWallets.indexOf(wallet)
if (index > -1) {
this.selectedWallets = this.selectedWallets.splice(index, 1)
}
} else {
this.selectedWallets.push(wallet)
}
if (this.selectedWallets?.includes(wallet)) return;

this.selectedWallets.push(wallet)
}

public async removeWallets(): Promise<void> {
Expand Down

0 comments on commit 66bdd6c

Please sign in to comment.