Skip to content

Commit

Permalink
Unwrap less
Browse files Browse the repository at this point in the history
  • Loading branch information
bitdivine committed Oct 29, 2024
1 parent a04748b commit c62db93
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/signer/canister/tests/it/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
},
},
utils::{
mock::{CALLER, CALLER_ETH_ADDRESS, SEPOLIA_CHAIN_ID},
mock::{CALLER_ETH_ADDRESS, SEPOLIA_CHAIN_ID},
pic_canister::PicCanisterTrait,
test_environment::{TestSetup, LEDGER_FEE},
},
Expand Down Expand Up @@ -40,7 +40,7 @@ mod sign_transaction {
fn can_eth_sign_transaction() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let sign_request = &GOOD_SIGN_TRANSACTION_REQUEST;

Expand Down Expand Up @@ -72,7 +72,7 @@ mod sign_transaction {
fn test_cannot_sign_transaction_with_invalid_to_address() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down Expand Up @@ -130,7 +130,7 @@ mod personal_sign {
fn can_eth_personal_sign() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down Expand Up @@ -162,7 +162,7 @@ mod personal_sign {
fn cannot_personal_sign_if_message_is_not_hex_string() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let request = EthPersonalSignRequest {
message: "test message".to_string(),
Expand Down Expand Up @@ -217,7 +217,7 @@ mod eth_address {
fn test_caller_eth_address() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down Expand Up @@ -253,7 +253,7 @@ mod eth_address {
fn test_eth_address_of() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down Expand Up @@ -286,7 +286,7 @@ mod eth_address {
fn test_anonymous_cannot_call_eth_address() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down Expand Up @@ -317,7 +317,7 @@ mod eth_address {
fn test_cannot_call_eth_address_of_for_anonymous() {
let test_env = TestSetup::default();

let caller = Principal::from_text(CALLER).unwrap();
let caller = test_env.user;

let payment_type = PaymentType::CallerPaysIcrc2Cycles;
let payment_recipient = cycles_ledger::Account {
Expand Down

0 comments on commit c62db93

Please sign in to comment.