Skip to content

Commit

Permalink
apply nits
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Jan 7, 2025
1 parent db5cff6 commit 9006269
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mm2src/coins/rpc_command/tendermint/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) enum ValidatorStatus {
Bonded,
/// Validator is not in the active set and does not participate in consensus.
/// Accordingly, they do not receive rewards and cannot be slashed.
/// It is possible to delegate tokens to a validator in this state.
/// It is still possible to delegate tokens to a validator in this state.
Unbonded,
}

Expand Down
12 changes: 6 additions & 6 deletions mm2src/coins/tendermint/tendermint_coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,10 @@ impl From<TendermintCoinRpcError> for BalanceError {
match err {
TendermintCoinRpcError::InvalidResponse(e) => BalanceError::InvalidResponse(e),
TendermintCoinRpcError::Prost(e) => BalanceError::InvalidResponse(e),
TendermintCoinRpcError::PerformError(e) => BalanceError::Transport(e),
TendermintCoinRpcError::RpcClientError(e) | TendermintCoinRpcError::InternalError(e) => {
BalanceError::Internal(e)
TendermintCoinRpcError::PerformError(e) | TendermintCoinRpcError::RpcClientError(e) => {
BalanceError::Transport(e)
},
TendermintCoinRpcError::InternalError(e) => BalanceError::Internal(e),
TendermintCoinRpcError::UnexpectedAccountType { prefix } => {
BalanceError::Internal(format!("Account type '{prefix}' is not supported for HTLCs"))
},
Expand All @@ -478,10 +478,10 @@ impl From<TendermintCoinRpcError> for ValidatePaymentError {
match err {
TendermintCoinRpcError::InvalidResponse(e) => ValidatePaymentError::InvalidRpcResponse(e),
TendermintCoinRpcError::Prost(e) => ValidatePaymentError::InvalidRpcResponse(e),
TendermintCoinRpcError::PerformError(e) => ValidatePaymentError::Transport(e),
TendermintCoinRpcError::RpcClientError(e) | TendermintCoinRpcError::InternalError(e) => {
ValidatePaymentError::InternalError(e)
TendermintCoinRpcError::PerformError(e) | TendermintCoinRpcError::RpcClientError(e) => {
ValidatePaymentError::Transport(e)
},
TendermintCoinRpcError::InternalError(e) => ValidatePaymentError::InternalError(e),
TendermintCoinRpcError::UnexpectedAccountType { prefix } => {
ValidatePaymentError::InvalidParameter(format!("Account type '{prefix}' is not supported for HTLCs"))
},
Expand Down
8 changes: 4 additions & 4 deletions mm2src/mm2_test_helpers/src/for_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3112,10 +3112,10 @@ pub async fn tendermint_validators(
});
log!("{rpc_endpoint} request {}", json::to_string(&request).unwrap());

let request = mm.rpc(&request).await.unwrap();
assert_eq!(request.0, StatusCode::OK, "{rpc_endpoint} failed: {}", request.1);
log!("{rpc_endpoint} response {}", request.1);
json::from_str(&request.1).unwrap()
let response = mm.rpc(&request).await.unwrap();
assert_eq!(response.0, StatusCode::OK, "{rpc_endpoint} failed: {}", response.1);
log!("{rpc_endpoint} response {}", response.1);
json::from_str(&response.1).unwrap()
}

pub async fn init_utxo_electrum(
Expand Down

0 comments on commit 9006269

Please sign in to comment.