-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: fungible metadata amount utils + get_route_ui_fields() FFI #78
Conversation
8017600
to
e2f33b2
Compare
e2f33b2
to
5eb523d
Compare
…/fungible-metadata-amount-utils
serialize_with = "crate::utils::serialize_unit" | ||
)] | ||
#[serde(default = "default_unit")] | ||
pub decimals: Unit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can use U8 here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I think we should use Unit
since it's alloy's type to represent these decimals. It has built-in assertions that the value is less than 77, so we know it's a valid unit. Rust code can also have fewer error conditions when this type is already being used by calling code.
…com/reown-com/yttrium into feat/fungible-metadata-amount-utils
91fc711
to
7ab64ef
Compare
decimals
field so Blockchain API can return thisto_[bridging_fee_]amount()
utils to get formatted valuesget_route_ui_fields()
FFI