Skip to content

Commit 6a39fbb

Browse files
committed
fixed broken unitests
1 parent 1fe8d5c commit 6a39fbb

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

sovryn-token-bridge/federator/test/Federator.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,12 @@ describe('Federator module tests', () => {
386386

387387
expect(sendTransactionSpy).toHaveBeenCalledTimes(0); // sanity check
388388

389-
let result = await federator._voteTransaction(log, '0x0'); // should not throw
389+
let result = await federator._voteTransaction(log, '0x0', null, null, null, null, null, null, null, null, 1, 2); // should not throw
390390
expect(result).toBeFalsy();
391391
expect(sendTransactionSpy).toHaveBeenCalledTimes(1);
392392

393393
// After another call, it should NOT try to send the transaction again
394-
result = await federator._voteTransaction(log, '0x0');
394+
result = await federator._voteTransaction(log, '0x0', null, null, null, null, null, null, null, null, 1, 2);
395395
expect(result).toBeFalsy();
396396
expect(sendTransactionSpy).toHaveBeenCalledTimes(1);
397397
});

sovryn-token-bridge/federator/test/web3Mock/contracts/Federation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ methods.getTransactionId = () => ({
1111
call: () => Promise.resolve(defaults.data.transactionId)
1212
});
1313

14+
methods.getTransactionIdU = () => ({
15+
call: () => Promise.resolve(defaults.data.transactionIdU)
16+
});
17+
1418
methods.transactionWasProcessed = () => ({
1519
call: () => Promise.resolve(false)
1620
});

sovryn-token-bridge/federator/test/web3Mock/mockData.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@
8282
}
8383
}
8484
],
85-
"transactionId": "0x7cfbaa6f05794922229e60c7c9695cc52cd13ed9ab1b88597626bd70bb8315d9"
85+
"transactionId": "0x7cfbaa6f05794922229e60c7c9695cc52cd13ed9ab1b88597626bd70bb8315d9",
86+
"transactionIdU": "0x7cfbaa6f05794922229e60c7c9695cc52cd13ed9ab1b88597626bd70bb8315d1"
8687
}

0 commit comments

Comments
 (0)