Skip to content

Commit 4f706e1

Browse files
refactor(amount): keep cashu request amount as plain u64
1 parent 8f2b0e4 commit 4f706e1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/portal-rest/src/handlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ pub async fn request_cashu(
727727
let content = CashuRequestContent {
728728
mint_url: req.mint_url,
729729
unit: req.unit,
730-
amount: Amount::new(req.amount),
730+
amount: req.amount,
731731
request_id: Uuid::new_v4().to_string(),
732732
expires_at,
733733
};
@@ -1057,7 +1057,7 @@ async fn spawn_verification_token_request(
10571057
let content = CashuRequestContent {
10581058
mint_url: VERIFICATION_MINT_URL.to_string(),
10591059
unit: VERIFICATION_TICKET_UNIT.to_string(),
1060-
amount: Amount::new(VERIFICATION_TOKEN_AMOUNT),
1060+
amount: VERIFICATION_TOKEN_AMOUNT,
10611061
request_id: Uuid::new_v4().to_string(),
10621062
expires_at,
10631063
};

crates/portal/src/protocol/model.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ pub mod payment {
444444
pub request_id: String,
445445
pub mint_url: String,
446446
pub unit: String,
447-
pub amount: Amount,
447+
pub amount: u64,
448448
pub expires_at: Timestamp,
449449
}
450450

0 commit comments

Comments
 (0)