Skip to content

Commit

Permalink
Merge pull request cashubtc#52 from aurorabor/warn-user-delete-mint
Browse files Browse the repository at this point in the history
Delete mint warning
  • Loading branch information
callebtc authored Jun 8, 2023
2 parents 2324b62 + 4d160ec commit 3a31f8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/mints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export const useMintsStore = defineStore("mints", {
}
},
removeMint: async function (url: string) {
// Ask for confirmation before removing the mint
if (!confirm("Are you sure you want to remove this mint?")) {
return; // Abort the removal if the user cancels
}
this.mints = this.mints.filter((m) => m.url !== url);
if (url === this.activeMintUrl) {
this.activeMintUrl = "";
Expand Down

0 comments on commit 3a31f8a

Please sign in to comment.