Closed LimpidCrypto closed 2 years ago
Looks good! However, the src/models/transactions.rs file has implementations, methods, etc. and should have accompanying unit tests for each method. Tests should always be present before any merge otherwise they end up never being added later.
High Level Overview of Change
TransactionFields
State
inAccountObjectType
toRippleState
Context of Change
To make it as easy as possible to define a transaction there should be transaction objects. Because rust does not support inheritance of two structs each transaction contain the common fields, making the
TransactionFields
object unnecessary. Doing so makes it easier for the user to define the transaction (define one object instead of two). This PR also includes transaction flags.Type of Change
Test Plan
test_to_json
(teststo_json
anditer_to_flags
)test_has_flag
test_get_transaction_type
TODO
TRANSACTION_HASH_PREFIX
flags
should be typedOption<Vec<AccountSetFlag>>
instead ofOption<Vec<u32>>
. Unfortunately I currently have no solution getting the value from theenum
, needed foriter_to_int
. HELP WANTEDRemarks
requests
objects. Please add/remove markers if it makes sense.