Merge branch 'main' into integrator_service

This commit is contained in:
Dmitry Leleko
2023-10-04 09:08:46 +02:00
40 changed files with 464 additions and 626 deletions

View File

@@ -198,7 +198,7 @@ describe('Orion', () => {
expect(unit.aggregator.ws.api).toBe(`ws://localhost:${server1.port}/v1`);
expect(unit.blockchainService.api).toBe(blockchainServiceAPI);
expect(unit.priceFeed.api).toBe(orionPriceFeedAPI + '/price-feed');
expect(unit.provider.connection.url).toBe('https://cloudflare-eth.com/');
expect(unit.provider._getConnection().url).toBe('https://cloudflare-eth.com/');
const info = await simpleFetch(unit.blockchainService.getInfo)();
expect(info).toBeDefined();
@@ -249,7 +249,7 @@ describe('Orion', () => {
});
const bscUnit = orion.units[SupportedChainId.BSC_TESTNET]
expect(bscUnit?.provider.connection.url).toBe('https://data-seed-prebsc-1-s1.binance.org:8545/');
expect(bscUnit?.provider._getConnection().url).toBe('https://data-seed-prebsc-1-s1.binance.org:8545/');
expect(orion.referralSystem.api).toBe('https://zxczxc.orionprotocol.io');
});
@@ -315,7 +315,7 @@ describe('Orion', () => {
const network = await unitBSC.provider.getNetwork();
expect(network.chainId).toBe(97);
const zeroAddressWithout0x = ethers.constants.AddressZero.slice(2);
const zeroAddressWithout0x = ethers.ZeroAddress.slice(2);
expect(simpleFetch(orion.referralSystem.getMiniStats)(zeroAddressWithout0x))
.rejects
.toThrow('empty reward history');

View File

@@ -83,7 +83,7 @@ describe('Fee calculation', () => {
const gasPriceGwei = 3;
const feePercent = 0.2;
const baseAssetAddress = '0xcb2951e90d8dcf16e1fa84ac0c83f48906d6a744';
const baseCurrencyAddress = ethers.constants.AddressZero;
const baseCurrencyAddress = ethers.ZeroAddress;
const feeAssetAddress = '0xf223eca06261145b3287a0fefd8cfad371c7eb34';
const { totalFeeInFeeAsset: ornTotalFee } = calculateFeeInFeeAsset(
amount,