sephynox / xrpl-rust

A 100% Rust library to interact with the XRPL. XRPL Grant Winner
https://crates.io/crates/xrpl-rust
ISC License
20 stars 8 forks source link

DEV: Split `Currency` into unique structs #10

Closed LimpidCrypto closed 2 years ago

LimpidCrypto commented 2 years ago

I find it easier to work with currencies and currency amounts if they were unique structs. So you would have the following structs: Currencies:

Amounts:

Currently I am having issues accessing the Currency amount but maybe you know a way how to write a get_amount_value function. The way I am suggesting is how other libraries do it (except for the XRPAmount). You can then wrap the currencies in a Currency enum and the amounts in a Amount enum.

LimpidCrypto commented 2 years ago

nvm, found a way :) will be added with #9