Fix token rpc-client methods (#11361)
* Convert None to error in parse_keyed_accounts * Allow encoding configuration in getTokenAccounts methods
This commit is contained in:
@ -1120,7 +1120,15 @@ fn parse_keyed_accounts(
|
||||
request,
|
||||
)
|
||||
})?;
|
||||
pubkey_accounts.push((pubkey, account.decode().unwrap()));
|
||||
pubkey_accounts.push((
|
||||
pubkey,
|
||||
account.decode().ok_or_else(|| {
|
||||
ClientError::new_with_request(
|
||||
RpcError::ParseError("Account from rpc".to_string()).into(),
|
||||
request,
|
||||
)
|
||||
})?,
|
||||
));
|
||||
}
|
||||
Ok(pubkey_accounts)
|
||||
}
|
||||
|
Reference in New Issue
Block a user