Token Accounts: return ui_amount, decimals with decoded account (#11407)
* Return ui_amount, decimals from token client methods * Return ui_amount, decimals in RPC jsonParsed token accounts * Fixup docs * Return ui_amount, decimals in pubsub jsonParsed token accounts * Remove unnecessary duplicate struct * StringAmount rename
This commit is contained in:
@@ -1235,7 +1235,7 @@ fn process_show_account(
|
||||
let cli_account = CliAccount {
|
||||
keyed_account: RpcKeyedAccount {
|
||||
pubkey: account_pubkey.to_string(),
|
||||
account: UiAccount::encode(account, UiAccountEncoding::Binary),
|
||||
account: UiAccount::encode(account, UiAccountEncoding::Binary, None),
|
||||
},
|
||||
use_lamports_unit,
|
||||
};
|
||||
|
@@ -350,7 +350,7 @@ mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let nonce_pubkey = Pubkey::new(&[4u8; 32]);
|
||||
let rpc_nonce_account = UiAccount::encode(nonce_account, UiAccountEncoding::Binary);
|
||||
let rpc_nonce_account = UiAccount::encode(nonce_account, UiAccountEncoding::Binary, None);
|
||||
let get_account_response = json!(Response {
|
||||
context: RpcResponseContext { slot: 1 },
|
||||
value: json!(Some(rpc_nonce_account)),
|
||||
|
Reference in New Issue
Block a user