chore: fix formatting

This commit is contained in:
thesimplekid
2024-08-11 10:12:21 -04:00
parent da1acc4e6d
commit e57c7f1e9d
4 changed files with 41 additions and 31 deletions

View File

@@ -1 +1 @@
ALTER TABLE mint ADD mint_icon_url TEXT;
ALTER TABLE mint ADD mint_icon_url TEXT;

View File

@@ -65,35 +65,44 @@ impl WalletDatabase for WalletSqliteDatabase {
mint_url: UncheckedUrl,
mint_info: Option<MintInfo>,
) -> Result<(), Self::Err> {
let (name, pubkey, version, description, description_long, contact, nuts, mint_icon_url, motd) =
match mint_info {
Some(mint_info) => {
let MintInfo {
name,
pubkey,
version,
description,
description_long,
contact,
nuts,
mint_icon_url,
motd,
} = mint_info;
let (
name,
pubkey,
version,
description,
description_long,
contact,
nuts,
mint_icon_url,
motd,
) = match mint_info {
Some(mint_info) => {
let MintInfo {
name,
pubkey,
version,
description,
description_long,
contact,
nuts,
mint_icon_url,
motd,
} = mint_info;
(
name,
pubkey.map(|p| p.to_bytes().to_vec()),
version.map(|v| serde_json::to_string(&v).ok()),
description,
description_long,
contact.map(|c| serde_json::to_string(&c).ok()),
serde_json::to_string(&nuts).ok(),
mint_icon_url,
motd,
)
}
None => (None, None, None, None, None, None, None, None, None),
};
(
name,
pubkey.map(|p| p.to_bytes().to_vec()),
version.map(|v| serde_json::to_string(&v).ok()),
description,
description_long,
contact.map(|c| serde_json::to_string(&c).ok()),
serde_json::to_string(&nuts).ok(),
mint_icon_url,
motd,
)
}
None => (None, None, None, None, None, None, None, None, None),
};
sqlx::query(
r#"