Skip to content
This repository was archived by the owner on Aug 12, 2023. It is now read-only.

Commit 39ae4e3

Browse files
authored
Ensure V3 events are correctly supported (#342)
* Ensure V3 events are correctly supported * Fix test case
1 parent f32d22c commit 39ae4e3

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/jobs/convert-protocol-fees/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const convertProtocolFees = async ({ batchSize }) => {
2626
await bluebird.each(fills, async fill => {
2727
const conversionRate = await withTimer(
2828
logger,
29-
'Fetch USD conversion rate',
29+
`Fetch ETH conversion rate for ${fill.date}`,
3030
async () => getConversionRate('ETH', 'USD', fill.date),
3131
);
3232

src/jobs/create-fills/create-fill.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('createFill', () => {
157157
makerFee: undefined,
158158
orderHash:
159159
'0x8739c67a2a559205a7c8c7b24713ec21f35fed8b565a225a998375b1dae1bb14',
160-
protocolFee: undefined,
160+
protocolFee: 100000000000,
161161
protocolVersion: 3,
162162
relayerId: undefined,
163163
senderAddress: '0xd3d0474124c1013ed6bfcfd9a49cfedb8c78fc44',

src/jobs/create-fills/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const withTransaction = require('../../util/with-transaction');
1616

1717
const logger = signale.scope('create fills');
1818

19-
const SUPPORTED_VERSIONS = [1, 2];
19+
const SUPPORTED_VERSIONS = [1, 2, 3];
2020

2121
const createFills = async ({ batchSize }) => {
2222
const events = await Event.find({

src/jobs/create-fills/normalize-event-args.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const normalizeFillArgs = (args, protocolVersion = 1) => {
5757
feeRecipient: args.feeRecipientAddress,
5858
maker: args.makerAddress,
5959
orderHash: args.orderHash,
60+
protocolFeePaid: args.protocolFeePaid,
6061
senderAddress: args.senderAddress,
6162
taker: args.takerAddress,
6263
};

0 commit comments

Comments
 (0)