feat(wallet): remove multi mint wallet #1582

Merged
asmogo merged 30 commits from feat/remove-multi-mint-wallet into main 2026-02-11 19:43:48 +00:00
asmogo commented 2026-01-28 07:37:03 +00:00 (Migrated from github.com)

Description


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

### Description <!-- Describe the purpose of this PR, what's being adding and/or fixed --> ----- ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ----- ### Suggested [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates <!-- Please do not edit the actual changelog but note what you changed here. --> #### CHANGED #### ADDED #### REMOVED #### FIXED ---- ### Checklist * [ ] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [ ] I ran `just final-check` before committing
thesimplekid (Migrated from github.com) requested changes 2026-02-09 14:55:53 +00:00
@ -0,0 +1,970 @@
//! Wallet Repository
thesimplekid (Migrated from github.com) commented 2026-02-09 14:07:24 +00:00

This could sum different units since it just takes the value of the get_balances BTreeMap without checking the unit. It could return a BTreeMap of <Unit, Amount>?

This could sum different units since it just takes the value of the `get_balances` BTreeMap without checking the unit. It could return a BTreeMap of <Unit, Amount>?
thesimplekid (Migrated from github.com) commented 2026-02-09 14:41:55 +00:00

Are these actually used, I do not see where they are?

Are these actually used, I do not see where they are?
thesimplekid (Migrated from github.com) commented 2026-02-09 14:42:48 +00:00

We should remove the multiple news and instead use a builder pattern like we do in other places.

We should remove the multiple news and instead use a builder pattern like we do in other places.
thesimplekid (Migrated from github.com) commented 2026-02-09 14:46:28 +00:00

Would it be safer to not remove the wallet from the db? I think having this case of it sometimes removes from the db isn't safe and that should be explicit.

Would it be safer to not remove the wallet from the db? I think having this case of it sometimes removes from the db isn't safe and that should be explicit.
thesimplekid (Migrated from github.com) commented 2026-02-09 14:49:39 +00:00

There is some inconsistency with the naming of the API in a few places we use add_mint but then to get the wallet we say get_wallet. I think we should align this and it should be add_wallet.

There is some inconsistency with the naming of the API in a few places we use `add_mint` but then to get the wallet we say `get_wallet`. I think we should align this and it should be `add_wallet`.
thesimplekid (Migrated from github.com) commented 2026-02-09 14:53:13 +00:00

Should we remove this and just force the caller to be explicit about if they are getting a wallet or creating one. In cdk-cli we already have an additional wrapper of a fn by the same name that does this, I think it makes more sense to be done like that.

Should we remove this and just force the caller to be explicit about if they are getting a wallet or creating one. In cdk-cli we already have an additional wrapper of a fn by the same name that does this, I think it makes more sense to be done like that.
thesimplekid (Migrated from github.com) approved these changes 2026-02-11 14:38:16 +00:00
thesimplekid (Migrated from github.com) left a comment

Thanks for this nice work. Looks good to me will merge assuming ci passes.

Thanks for this nice work. Looks good to me will merge assuming ci passes.
asmogo commented 2026-02-11 18:56:45 +00:00 (Migrated from github.com)

ACK b41ad66

ACK [b41ad66](https://github.com/cashubtc/cdk/pull/1582/commits/b41ad66a18b041c42d1e469c0c05877660c3492e)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!1582
No description provided.