Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Oct 16, 2024
1 parent 5f732d8 commit 5367434
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ mod tests {
validate_tx_request, Capabilities, DelegationCapability, OdysseyWalletError,
WalletCapabilities,
};
use alloy_network::TransactionBuilder;
use alloy_primitives::{address, map::HashMap, Address, U256};
use alloy_rpc_types::TransactionRequest;

Expand Down Expand Up @@ -395,20 +394,20 @@ mod tests {
#[test]
fn no_value_allowed() {
assert_eq!(
validate_tx_request(&TransactionRequest::default().with_value(U256::from(1))),
validate_tx_request(&TransactionRequest::default().value(U256::from(1))),
Err(OdysseyWalletError::ValueNotZero)
);

assert_eq!(
validate_tx_request(&TransactionRequest::default().with_value(U256::from(0))),
validate_tx_request(&TransactionRequest::default().value(U256::from(0))),
Ok(())
);
}

#[test]
fn no_from_allowed() {
assert_eq!(
validate_tx_request(&TransactionRequest::default().with_from(Address::ZERO)),
validate_tx_request(&TransactionRequest::default().from(Address::ZERO)),
Err(OdysseyWalletError::FromSet)
);

Expand All @@ -418,7 +417,7 @@ mod tests {
#[test]
fn no_nonce_allowed() {
assert_eq!(
validate_tx_request(&TransactionRequest::default().with_nonce(1)),
validate_tx_request(&TransactionRequest::default().nonce(1)),
Err(OdysseyWalletError::NonceSet)
);

Expand Down

0 comments on commit 5367434

Please sign in to comment.