Skip to content

Commit

Permalink
Merge pull request #21 from kryptokrona/delete-subwallet
Browse files Browse the repository at this point in the history
Delete subwallets correctly
  • Loading branch information
n9lsjr authored Mar 24, 2024
2 parents e08d0ca + 491a0ea commit 6d3939b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/SubWallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class SubWallets {
* The public spend keys this wallet contains. Used for verifying if a
* transaction is ours.
*/
private readonly publicSpendKeys: string[] = [];
private publicSpendKeys: string[] = [];

/**
* Mapping of public spend key to subwallet
Expand Down Expand Up @@ -939,6 +939,8 @@ export class SubWallets {
this.deleteAddressTransactions(this.transactions, publicSpendKey);
this.deleteAddressTransactions(this.lockedTransactions, publicSpendKey);

this.publicSpendKeys = this.publicSpendKeys.filter(elem => elem != publicSpendKey);

return SUCCESS;
}

Expand Down

0 comments on commit 6d3939b

Please sign in to comment.