0.7.29
This commit is contained in:
@@ -1321,7 +1321,7 @@ fn collect_account_keys_from_candidate_path(
|
||||
target.push(text.to_string());
|
||||
continue;
|
||||
}
|
||||
if let Some(pubkey) = item.get("pubkey").and_then(|value| value.as_str()) {
|
||||
if let Some(pubkey) = item.get("pubkey").and_then(|value| return value.as_str()) {
|
||||
target.push(pubkey.to_string());
|
||||
}
|
||||
}
|
||||
@@ -1344,7 +1344,7 @@ fn collect_loaded_address_array(
|
||||
key: &str,
|
||||
target: &mut std::vec::Vec<std::string::String>,
|
||||
) {
|
||||
let array = match loaded_addresses.get(key).and_then(|value| value.as_array()) {
|
||||
let array = match loaded_addresses.get(key).and_then(|value| return value.as_array()) {
|
||||
Some(array) => array,
|
||||
None => return,
|
||||
};
|
||||
@@ -1391,12 +1391,12 @@ fn token_balance_amount_for_account_index(
|
||||
key: &str,
|
||||
account_index: usize,
|
||||
) -> std::option::Option<i128> {
|
||||
let balances = match meta.get(key).and_then(|value| value.as_array()) {
|
||||
let balances = match meta.get(key).and_then(|value| return value.as_array()) {
|
||||
Some(balances) => balances,
|
||||
None => return None,
|
||||
};
|
||||
for balance in balances {
|
||||
let balance_index = balance.get("accountIndex").and_then(|value| value.as_u64());
|
||||
let balance_index = balance.get("accountIndex").and_then(|value| return value.as_u64());
|
||||
let balance_index = match balance_index {
|
||||
Some(balance_index) => balance_index,
|
||||
None => continue,
|
||||
@@ -1410,8 +1410,8 @@ fn token_balance_amount_for_account_index(
|
||||
}
|
||||
let amount_text = balance
|
||||
.get("uiTokenAmount")
|
||||
.and_then(|value| value.get("amount"))
|
||||
.and_then(|value| value.as_str());
|
||||
.and_then(|value| return value.get("amount"))
|
||||
.and_then(|value| return value.as_str());
|
||||
let amount_text = match amount_text {
|
||||
Some(amount_text) => amount_text,
|
||||
None => return None,
|
||||
@@ -1504,7 +1504,7 @@ mod tests {
|
||||
stack_height,
|
||||
accounts_json: "[]".to_string(),
|
||||
data_json: None,
|
||||
parsed_type: parsed_type.map(|value| value.to_string()),
|
||||
parsed_type: parsed_type.map(|value| return value.to_string()),
|
||||
parsed_json,
|
||||
created_at: chrono::Utc::now(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user