Drop AmountStr #612

Merged
crodas merged 2 commits from feature/drop-amount-str into main 2025-02-22 17:46:02 +00:00
crodas commented 2025-02-21 23:04:30 +00:00 (Migrated from github.com)

Description

Fixes #609

Instead write a customer serializer for Keys to serialize amounts as strings


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

### Description Fixes #609 Instead write a customer serializer for Keys to serialize amounts as strings ----- ### 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
ok300 (Migrated from github.com) reviewed 2025-02-22 08:07:01 +00:00
ok300 (Migrated from github.com) left a comment

Found a NIT for error type, otherwise looks good.

Found a NIT for error type, otherwise looks good.
@ -26,3 +28,4 @@
InvalidAmount(String),
}
/// Amount can be any unit
ok300 (Migrated from github.com) commented 2025-02-22 07:22:54 +00:00

Parsing "1.23" will fail, but not because of overflow.

Maybe a more generic parsing error is better instead of Error::AmountOverflow?

Parsing "1.23" will fail, but not because of overflow. Maybe a more generic parsing error is better instead of `Error::AmountOverflow`?
crodas (Migrated from github.com) reviewed 2025-02-22 12:50:02 +00:00
@ -26,3 +28,4 @@
InvalidAmount(String),
}
/// Amount can be any unit
crodas (Migrated from github.com) commented 2025-02-22 12:50:02 +00:00

Great feedback, is it any better now (f1c69fe5da) @ok300 ?

Great feedback, is it any better now (f1c69fe5da3421f91a4c046709fb900e25564ac3) @ok300 ?
thesimplekid (Migrated from github.com) approved these changes 2025-02-22 15:19:45 +00:00
thesimplekid commented 2025-02-22 15:20:01 +00:00 (Migrated from github.com)
ACK 040259c131626cf0188326e8979b0da05749d6bc
ok300 (Migrated from github.com) reviewed 2025-02-22 17:23:11 +00:00
@ -26,3 +28,4 @@
InvalidAmount(String),
}
/// Amount can be any unit
ok300 (Migrated from github.com) commented 2025-02-22 17:23:11 +00:00

Yes, looking good!

Yes, looking good!
ok300 (Migrated from github.com) approved these changes 2025-02-22 17:23:21 +00:00
Sign in to join this conversation.
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!612
No description provided.