Skip to content

Commit

Permalink
fix(jsonrpc): read simple positional argument in getBalance
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Sep 19, 2023
1 parent ad46722 commit 22e4aa1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/src/actors/json_rpc/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,11 @@ pub async fn get_balance(params: Params) -> JsonRpcResult {
));
};

simple = false;
if let Some(Value::String(simple_arg)) = params.get(1) {
simple = simple_arg.parse().unwrap_or(false);
} else {
simple = false;
}
} else {
let params: GetBalanceParams = params.parse()?;
pkh = params.pkh;
Expand Down

0 comments on commit 22e4aa1

Please sign in to comment.