Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add From<Amount> conversion for u64 #486

Closed
Tracked by #431
Farhad-Shabani opened this issue Feb 28, 2023 · 2 comments · Fixed by #487
Closed
Tracked by #431

Add From<Amount> conversion for u64 #486

Farhad-Shabani opened this issue Feb 28, 2023 · 2 comments · Fixed by #487
Assignees
Labels
O: usability Objective: aims to enhance user experience (UX) and streamline product usability
Milestone

Comments

@Farhad-Shabani
Copy link
Member

Summary

Improve user experience around struct Amount(U256) by adding an additional conversion helper method From<Amount> for u64

@Farhad-Shabani Farhad-Shabani added the O: usability Objective: aims to enhance user experience (UX) and streamline product usability label Feb 28, 2023
@Farhad-Shabani Farhad-Shabani self-assigned this Feb 28, 2023
@Farhad-Shabani Farhad-Shabani added this to the v0.31.0 milestone Feb 28, 2023
@kevinji
Copy link
Contributor

kevinji commented Feb 28, 2023

Maybe a silly question but won't calling amount.into() panic if amount is bigger than a u64 but smaller than a U256?

@plafer
Copy link
Contributor

plafer commented Feb 28, 2023

Oh yes you're right, I totally missed that! We'll fix this right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: usability Objective: aims to enhance user experience (UX) and streamline product usability
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants