diff --git a/esdt-safe/tests/esdt_safe_blackbox_test.rs b/esdt-safe/tests/esdt_safe_blackbox_test.rs index 11eb3eb0..35d8ff4c 100644 --- a/esdt-safe/tests/esdt_safe_blackbox_test.rs +++ b/esdt-safe/tests/esdt_safe_blackbox_test.rs @@ -114,8 +114,6 @@ impl EsdtSafeTestState { fn init_supply_should_fail( &mut self, - from_address: TestAddress, - to_address: TestSCAddress, token_id: TestTokenIdentifier, tx_token_id: TestTokenIdentifier, tx_amount: u64, @@ -125,8 +123,8 @@ impl EsdtSafeTestState { ) { self.world .tx() - .from(from_address) - .to(to_address) + .from(OWNER_ADDRESS) + .to(ESDT_SAFE_ADDRESS) .typed(esdt_safe_proxy::EsdtSafeProxy) .init_supply(token_id, BigUint::from(amount)) .egld_or_single_esdt( @@ -181,8 +179,6 @@ fn init_supply_test() { state.config_esdtsafe(); state.init_supply_should_fail( - OWNER_ADDRESS, - ESDT_SAFE_ADDRESS, NON_WHITELISTED_TOKEN, NATIVE_TOKEN_ID, 10_000u64, @@ -192,8 +188,6 @@ fn init_supply_test() { ); state.init_supply_should_fail( - OWNER_ADDRESS, - ESDT_SAFE_ADDRESS, TOKEN_ID, TOKEN_ID, 10_000u64, @@ -203,8 +197,6 @@ fn init_supply_test() { ); state.init_supply_should_fail( - OWNER_ADDRESS, - ESDT_SAFE_ADDRESS, TOKEN_WITHOUT_BURN_ROLE, TOKEN_WITHOUT_BURN_ROLE, 1_000u64, diff --git a/multi-transfer-esdt/tests/multi_transfer_blackbox_test.rs b/multi-transfer-esdt/tests/multi_transfer_blackbox_test.rs index 67321022..ba7474e4 100644 --- a/multi-transfer-esdt/tests/multi_transfer_blackbox_test.rs +++ b/multi-transfer-esdt/tests/multi_transfer_blackbox_test.rs @@ -332,8 +332,7 @@ impl MultiTransferTestState { expected_status: u64, expected_error: &str, ) { - let mut tx = self - .esdt_raw_transaction() + self.esdt_raw_transaction() .set_transaction_batch_status(batch_id, statuses) .returns(ExpectError(expected_status, expected_error)) .run(); @@ -344,8 +343,7 @@ impl MultiTransferTestState { batch_id: u32, statuses: MultiValueEncoded, ) { - let mut tx = self - .esdt_raw_transaction() + self.esdt_raw_transaction() .set_transaction_batch_status(batch_id, statuses) .returns(ReturnsResult) .run(); @@ -357,7 +355,6 @@ impl MultiTransferTestState { to_address: TestSCAddress, transfers: ManagedVec>, payment: EgldOrMultiEsdtPayment, - expected_status: u64, expected_error: &str, ) { self.world @@ -367,7 +364,7 @@ impl MultiTransferTestState { .typed(esdt_safe_proxy::EsdtSafeProxy) .add_refund_batch(transfers) .egld_or_multi_esdt(payment) - .returns(ExpectError(expected_status, expected_error)) + .returns(ExpectError(ERROR, expected_error)) .run(); } @@ -787,21 +784,21 @@ fn set_transaction_batch_status_test() { state.set_transaction_batch_status_should_fail( 5u32, tx_statuses.clone(), - 4, + ERROR, "Batches must be processed in order", ); state.set_transaction_batch_status_should_fail( 1u32, tx_multiple_statuses.clone(), - 4, + ERROR, "Invalid number of statuses provided", ); state.set_transaction_batch_status_should_fail( 1u32, tx_statuses_invalid.clone(), - 4, + ERROR, "Transaction status may only be set to Executed or Rejected", ); @@ -864,7 +861,6 @@ fn add_refund_batch_test() { ESDT_SAFE_ADDRESS, transfers.clone(), payment.clone(), - 4, "Invalid caller", ); @@ -898,7 +894,7 @@ fn add_refund_batch_test() { transfers.clone(), BRIDGE_TOKEN_ID, 10u64, - 4, + ERROR, "Token identifiers do not match", ); @@ -913,7 +909,6 @@ fn add_refund_batch_test() { ESDT_SAFE_ADDRESS, transfers.clone(), payment_invalid.clone(), - 4, "Amounts do not match", ); @@ -971,7 +966,7 @@ fn claim_refund_test() { state .esdt_raw_transaction() .claim_refund(TOKEN_ID) - .with_result(ExpectStatus(4)) + .with_result(ExpectStatus(ERROR)) .returns(ExpectError(ERROR, "Nothing to refund")) .run();