show-stake-account now works for reward pool accounts (#5416)
automerge
This commit is contained in:
parent
80bb0158b7
commit
ccc0f2d956
|
@ -227,7 +227,7 @@ Returns all accounts owned by the provided program Pubkey
|
|||
|
||||
##### Results:
|
||||
The result field will be an array of arrays. Each sub array will contain:
|
||||
* `string` - a the account Pubkey as base-58 encoded string
|
||||
* `string` - the account Pubkey as base-58 encoded string
|
||||
and a JSON object, with the following sub fields:
|
||||
|
||||
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
|
||||
|
|
|
@ -725,10 +725,12 @@ fn process_show_stake_account(
|
|||
}
|
||||
Ok("".to_string())
|
||||
}
|
||||
Ok(StakeState::RewardsPool) => Ok("Stake account is a rewards pool".to_string()),
|
||||
Ok(StakeState::Uninitialized) => Ok("Stake account is uninitialized".to_string()),
|
||||
_ => Err(WalletError::RpcRequestError(
|
||||
"Account data could not be deserialized to stake state".to_string(),
|
||||
))?,
|
||||
Err(err) => Err(WalletError::RpcRequestError(format!(
|
||||
"Account data could not be deserialized to stake state: {:?}",
|
||||
err
|
||||
)))?,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue