Skip to content

Commit 1f1fb06

Browse files
authored
Merge pull request #63 from Cardinal-Cryptography/fix-e2e-tests
Update to work with aleph-node release 12.1
2 parents 89100e2 + 5810095 commit 1f1fb06

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

amm/e2e-tests/src/test/factory.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub async fn factory_contract_set_up_correctly() -> Result<()> {
102102
let FactoryTestSetup {
103103
wealthy_connection,
104104
regular_account,
105-
zero_account,
105+
zero_account: _zero_account,
106106
factory_contract,
107107
..
108108
} = set_up_factory_test().await?;
@@ -115,7 +115,7 @@ pub async fn factory_contract_set_up_correctly() -> Result<()> {
115115
.read(factory_contract.all_pairs_length())
116116
.await??;
117117

118-
assert!(recipient == zero_account);
118+
assert!(recipient.is_none());
119119
assert!(setter == regular_account);
120120
assert!(all_pairs_length == 0);
121121

@@ -137,7 +137,7 @@ pub async fn set_fee() -> Result<()> {
137137

138138
let fee_recipient = wealthy_connection.read(factory_contract.fee_to()).await??;
139139

140-
assert!(fee_recipient == zero_account);
140+
assert!(fee_recipient.is_none());
141141

142142
ensure!(
143143
wealthy_connection
@@ -156,7 +156,7 @@ pub async fn set_fee() -> Result<()> {
156156

157157
let regular_recipient = regular_connection.read(factory_contract.fee_to()).await??;
158158

159-
assert!(regular_recipient == regular_account);
159+
assert!(regular_recipient == Some(regular_account));
160160

161161
Ok(())
162162
}

amm/e2e-tests/src/test/pair.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub async fn swap_tokens() -> Result<()> {
297297
assert!(regular_balance_before == EXPECTED_INITIAL_REGULAR_BALANCE);
298298

299299
let swap_tx_info = wealthy_connection
300-
.exec(pair_contract.swap(FIRST_AMOUNT_OUT, SECOND_AMOUNT_OUT, regular_account))
300+
.exec(pair_contract.swap(FIRST_AMOUNT_OUT, SECOND_AMOUNT_OUT, regular_account, None))
301301
.await?;
302302

303303
let all_pair_contract_events = wealthy_connection.get_contract_events(swap_tx_info).await?;
@@ -359,7 +359,7 @@ pub async fn burn_liquidity_provider_token() -> Result<()> {
359359
.exec(first_token.transfer(pair, FIRST_AMOUNT_IN, vec![]))
360360
.await?;
361361
wealthy_connection
362-
.exec(pair_contract.swap(FIRST_AMOUNT_OUT, SECOND_AMOUNT_OUT, regular_account))
362+
.exec(pair_contract.swap(FIRST_AMOUNT_OUT, SECOND_AMOUNT_OUT, regular_account, None))
363363
.await?;
364364

365365
let first_token_balance_before = wealthy_connection

0 commit comments

Comments
 (0)