diff --git a/packages/dai-plugin-mcd/src/EventHistory.js b/packages/dai-plugin-mcd/src/EventHistory.js index 3c9984dff..cb528d7a9 100644 --- a/packages/dai-plugin-mcd/src/EventHistory.js +++ b/packages/dai-plugin-mcd/src/EventHistory.js @@ -291,7 +291,7 @@ export async function getDsrEventHistory(service, address, cache) { .filter(({ topics }) => parseWeiNumeric(topics[3]) !== '0') .map(({ blockNumber: block, transactionHash: txHash, topics }) => { return { - type: 'DEPOSIT', + type: 'DSR_DEPOSIT', order: 0, block, txHash, @@ -314,8 +314,8 @@ export async function getDsrEventHistory(service, address, cache) { .filter(({ topics }) => parseWeiNumeric(topics[3]) !== '0') .map(({ blockNumber: block, transactionHash: txHash, topics }) => { return { - type: 'WITHDRAW', - order: 0, + type: 'DSR_WITHDRAW', + order: 1, block, txHash, amount: parseWeiNumeric(topics[3]), diff --git a/packages/dai-plugin-mcd/test/SavingsService.spec.js b/packages/dai-plugin-mcd/test/SavingsService.spec.js index 0365d8626..91339985b 100644 --- a/packages/dai-plugin-mcd/test/SavingsService.spec.js +++ b/packages/dai-plugin-mcd/test/SavingsService.spec.js @@ -249,8 +249,8 @@ describe('Savings Service', () => { await service.join(MDAI(3)); const events = await service.getEventHistory(proxyAddress); - const depositEventIdx = findIndex(events, { type: 'DEPOSIT' }); - const withdrawEventIdx = findIndex(events, { type: 'WITHDRAW' }); + const depositEventIdx = findIndex(events, { type: 'DSR_DEPOSIT' }); + const withdrawEventIdx = findIndex(events, { type: 'DSR_WITHDRAW' }); expect(depositEventIdx).toBeGreaterThan(-1); expect(events[depositEventIdx].gem).toEqual('DAI');