v0.2.2-pre.002-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/unit_tests/rpc_tokens.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
#[test]
|
||||
fn token_selector_is_exclusive_by_construction() {
|
||||
@@ -17,3 +17,17 @@ fn token_amount_fixture_preserves_nullable_ui_amount() {
|
||||
assert_eq!(amount.ui_amount(), std::option::Option::None);
|
||||
assert_eq!(amount.ui_amount_string(), "18446744073.709551615");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn staged_token_account_balance_helper_preserves_address_and_amount() {
|
||||
let value = serde_json::json!({
|
||||
"address":"11111111111111111111111111111111",
|
||||
"amount":"10",
|
||||
"decimals":2,
|
||||
"uiAmount":0.1,
|
||||
"uiAmountString":"0.1"
|
||||
});
|
||||
let balance = crate::SolanaTokenAccountBalance::decode_wire("fixture", value).expect("token account balance must decode");
|
||||
assert_eq!(balance.address().to_string(), "11111111111111111111111111111111");
|
||||
assert_eq!(balance.amount().amount(), "10");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user