Update Wallet::fetch_mint_info #1277

Merged
crodas merged 1 commit from feature/fetch_mint_info-with-cache into main 2025-11-15 15:28:25 +00:00
crodas commented 2025-11-15 02:33:15 +00:00 (Migrated from github.com)

Description

Make fetch_mint_info fetch the mint_info through the mint metadata cache instead of calling the Mint Connector directly.

This will make sure to persist the data correctly in other instances and the database


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

### Description Make `fetch_mint_info` fetch the mint_info through the mint metadata cache instead of calling the Mint Connector directly. This will make sure to persist the data correctly in other instances and the database ----- ### 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 * [x] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [x] I ran `just final-check` before committing
thesimplekid (Migrated from github.com) requested changes 2025-11-15 10:59:09 +00:00
thesimplekid (Migrated from github.com) left a comment
Remove https://github.com/cashubtc/cdk/pull/1277/commits/da29331ea186b35e0e2ee47a7ba829a4e764429f
@ -284,72 +284,66 @@ impl Wallet {
/// Query mint for current mint information
#[instrument(skip(self))]
pub async fn fetch_mint_info(&self) -> Result<Option<MintInfo>, Error> {
thesimplekid (Migrated from github.com) commented 2025-11-15 10:59:00 +00:00

We should change this name and comment. Seems like it always makes an http call which it used to but not anymore.

At one point I tried to be consistent with naming load would never make an http call, get would try to get it locally and if not make an http call, fetch would always make an http call. I don't think we strictly follow this anymore with the metadata cache though.

We should change this name and comment. Seems like it always makes an http call which it used to but not anymore. At one point I tried to be consistent with naming load would never make an http call, get would try to get it locally and if not make an http call, fetch would always make an http call. I don't think we strictly follow this anymore with the metadata cache though.
crodas (Migrated from github.com) reviewed 2025-11-15 11:01:50 +00:00
@ -284,72 +284,66 @@ impl Wallet {
/// Query mint for current mint information
#[instrument(skip(self))]
pub async fn fetch_mint_info(&self) -> Result<Option<MintInfo>, Error> {
crodas (Migrated from github.com) commented 2025-11-15 11:01:49 +00:00

But we still always go http, even now.

But we still always go http, even now.
thesimplekid (Migrated from github.com) reviewed 2025-11-15 11:03:47 +00:00
@ -284,72 +284,66 @@ impl Wallet {
/// Query mint for current mint information
#[instrument(skip(self))]
pub async fn fetch_mint_info(&self) -> Result<Option<MintInfo>, Error> {
thesimplekid (Migrated from github.com) commented 2025-11-15 11:03:47 +00:00

Doesn't load from cache get it from there if we have it. Not a big thing anyway we can leave it.

Doesn't load from cache get it from there if we have it. Not a big thing anyway we can leave it.
thesimplekid commented 2025-11-15 13:08:23 +00:00 (Migrated from github.com)
ACK 9778bc3e31f15df6efa41f802ca7c56411ac1433
thesimplekid (Migrated from github.com) approved these changes 2025-11-15 15:28:17 +00:00
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!1277
No description provided.