diff --git a/services/watcher/tests/api/revenues.ts b/services/watcher/tests/api/revenues.ts index d4c1f19f..2190d498 100644 --- a/services/watcher/tests/api/revenues.ts +++ b/services/watcher/tests/api/revenues.ts @@ -47,8 +47,6 @@ describe('revenueRouter', () => { // send a request to the endpoint const res = await request(app).get('/revenue'); - console.warn(res); - // check the result expect(res.status).to.eql(200); const resultParsed = JSON.parse(res.text); @@ -100,9 +98,9 @@ describe('revenueRouter', () => { // check the result expect(res.status).to.eql(200); const resultParsed = JSON.parse(res.text); - expect(resultParsed.total).to.eql(4); + expect(resultParsed.total).to.eql(3); const revenueIds = resultParsed.items.map((revenue: any) => revenue.id); - expect(revenueIds).to.eql([4, 3]); + expect(revenueIds).to.eql([3]); }); /** diff --git a/services/watcher/tests/api/testDataEvents.ts b/services/watcher/tests/api/testDataEvents.ts index ec5ee322..41130f2b 100644 --- a/services/watcher/tests/api/testDataEvents.ts +++ b/services/watcher/tests/api/testDataEvents.ts @@ -110,7 +110,7 @@ const events = [ boxSerialized: 'box2', block: 'blockID2', height: 100, - fromChain: 'ergo', + fromChain: 'cardano', toChain: 'toChain', fromAddress: 'fromAddress', toAddress: 'toAddressStar', @@ -144,7 +144,7 @@ const events = [ boxSerialized: 'box', block: 'blockID', height: 100, - fromChain: 'ergo', + fromChain: 'cardano', toChain: 'toChain', fromAddress: 'fromAddressStar', toAddress: 'toAddress', diff --git a/services/watcher/tests/database/mockedData.ts b/services/watcher/tests/database/mockedData.ts index 49a560eb..8b08993d 100644 --- a/services/watcher/tests/database/mockedData.ts +++ b/services/watcher/tests/database/mockedData.ts @@ -188,7 +188,7 @@ eventTriggerEntity.networkFee = '1000'; eventTriggerEntity.bridgeFee = '200'; eventTriggerEntity.fromAddress = 'fromAddressStar'; eventTriggerEntity.toAddress = 'toAddress'; -eventTriggerEntity.fromChain = 'ergo'; +eventTriggerEntity.fromChain = 'cardano'; eventTriggerEntity.toChain = 'toChain'; eventTriggerEntity.sourceChainTokenId = 'tokenId2'; eventTriggerEntity.targetChainTokenId = 'targetTokenId'; @@ -211,7 +211,7 @@ newEventTriggerEntity.networkFee = '1000'; newEventTriggerEntity.bridgeFee = '200'; newEventTriggerEntity.fromAddress = 'fromAddress'; newEventTriggerEntity.toAddress = 'toAddressStar'; -newEventTriggerEntity.fromChain = 'ergo'; +newEventTriggerEntity.fromChain = 'cardano'; newEventTriggerEntity.toChain = 'toChain'; newEventTriggerEntity.sourceChainTokenId = 'tokenId'; newEventTriggerEntity.targetChainTokenId = 'targetTokenId'; diff --git a/services/watcher/tests/ergo/statistics/mockUtils.ts b/services/watcher/tests/ergo/statistics/mockUtils.ts index 62a42e16..6edc6b26 100644 --- a/services/watcher/tests/ergo/statistics/mockUtils.ts +++ b/services/watcher/tests/ergo/statistics/mockUtils.ts @@ -208,7 +208,7 @@ const firstRevenue = { wid: 'WIDStatistics', eventId: 'ab59962c20f57d9d59e95f5170ccb3472df4279ad4967e51ba8be9ba75144c7b', lockHeight: 123457, - fromChain: 'ergo', + fromChain: 'cardano', toChain: 'toChain', fromAddress: 'fromAddress', toAddress: 'toAddressStar', @@ -216,9 +216,9 @@ const firstRevenue = { bridgeFee: '200', networkFee: '1000', lockToken: { - decimals: 6, + decimals: 0, isNativeToken: false, - name: 'test token 10', + name: 'Unsupported token', tokenId: 'tokenId', }, lockTxId: 'txId2', @@ -255,9 +255,9 @@ const lastRevenue = { bridgeFee: '200', networkFee: '1000', lockToken: { - decimals: 6, + decimals: 0, isNativeToken: false, - name: 'test token 10', + name: 'Unsupported token', tokenId: 'tokenId', }, lockTxId: 'txIdStar', @@ -277,7 +277,7 @@ const tokenId2Revenue = { permitTxId: 'txId', eventId: 'ab59962c20f57d9d59e95f5170ccb3472df4279ad4967e51ba8be9ba75144c7b', lockHeight: 123457, - fromChain: 'ergo', + fromChain: 'cardano', toChain: 'toChain', fromAddress: 'fromAddressStar', toAddress: 'toAddress', @@ -285,9 +285,9 @@ const tokenId2Revenue = { bridgeFee: '200', networkFee: '1000', lockToken: { - decimals: 6, + decimals: 0, isNativeToken: false, - name: 'test token 10', + name: 'Unsupported token', tokenId: 'tokenId', }, lockTxId: 'txId', @@ -307,7 +307,7 @@ const secondTokenId2Revenue = { permitTxId: 'txId', eventId: 'ab59962c20f57d9d59e95f5170ccb3472df4279ad4967e51ba8be9ba75144c7b', lockHeight: 123457, - fromChain: 'ergo', + fromChain: 'cardano', toChain: 'toChain', fromAddress: 'fromAddressStar', toAddress: 'toAddress', @@ -315,9 +315,9 @@ const secondTokenId2Revenue = { bridgeFee: '200', networkFee: '1000', lockToken: { - decimals: 6, + decimals: 0, isNativeToken: false, - name: 'test token 10', + name: 'Unsupported token', tokenId: 'tokenId', }, lockTxId: 'txId',