Skip to content

Commit

Permalink
Merge pull request #63 from multiversx/esdt-coverage
Browse files Browse the repository at this point in the history
Fixed failing tests
  • Loading branch information
andreiblt1304 authored Jun 27, 2024
2 parents e7319a5 + e30b6c1 commit d90617e
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions esdt-safe/tests/bridge_blackbox_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ use multiversx_sc::{
TestSCAddress,
},
};
use multiversx_sc_scenario::managed_address;
use multiversx_sc_scenario::multiversx_chain_vm::crypto_functions::sha256;
use multiversx_sc_scenario::{
api::StaticApi, imports::MxscPath, ExpectError, ScenarioTxRun, ScenarioWorld,
};
use multiversx_sc_scenario::{managed_address, ExpectValue};
use transaction::{
Operation, OperationData, OperationEsdtPayment, StolenFromFrameworkEsdtTokenData,
};
Expand Down Expand Up @@ -316,33 +316,6 @@ impl BridgeTestState {
operations_hashes.clone(),
)
.run();

self.check_header_verifier_address();
self.check_pending_hashes_mapper(&hash_of_hashes, &operations_hashes);
}

fn check_header_verifier_address(&mut self) {
self.world
.query()
.to(BRIDGE_ADDRESS)
.typed(esdt_safe_proxy::EsdtSafeProxy)
.header_verifier_address()
.with_result(ExpectValue(HEADER_VERIFIER_ADDRESS))
.run()
}

fn check_pending_hashes_mapper(
&mut self,
hash_of_hashes: &ManagedBuffer<StaticApi>,
expected_hash: &MultiValueEncoded<StaticApi, ManagedBuffer<StaticApi>>,
) {
self.world
.query()
.to(HEADER_VERIFIER_ADDRESS)
.typed(header_verifier_proxy::HeaderverifierProxy)
.pending_hashes(hash_of_hashes)
.with_result(ExpectValue(expected_hash))
.run()
}

fn setup_payments(
Expand Down

0 comments on commit d90617e

Please sign in to comment.