From fcbeec58236033dbec2c04ba3370d44151e91ed6 Mon Sep 17 00:00:00 2001 From: Lawrence Wang Date: Tue, 26 May 2020 14:44:18 -0700 Subject: [PATCH] fix some more references --- packages/dai-plugin-mcd/src/SystemDataService.js | 4 ++-- packages/dai-plugin-mcd/test/SystemDataService.spec.js | 4 ++-- .../src/migrations/GlobalSettlementDaiRedeemer.js | 10 +++++----- .../GlobalSettlementCollateralClaims.spec.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/dai-plugin-mcd/src/SystemDataService.js b/packages/dai-plugin-mcd/src/SystemDataService.js index 583b51ed9..3842ec903 100644 --- a/packages/dai-plugin-mcd/src/SystemDataService.js +++ b/packages/dai-plugin-mcd/src/SystemDataService.js @@ -1,7 +1,7 @@ import { PublicService } from '@makerdao/services-core'; import { RAD, RAY, ServiceRoles, SECONDS_PER_YEAR } from './constants'; import BigNumber from 'bignumber.js'; -import { MDAI } from './index'; +import { DAI } from './index'; export default class SystemDataService extends PublicService { constructor(name = ServiceRoles.SYSTEM_DATA) { @@ -40,7 +40,7 @@ export default class SystemDataService extends PublicService { this.vat.dai(vowAddr), this.vat.sin(vowAddr) ]); - return MDAI.rad(dai).minus(MDAI.rad(sin)); + return DAI.rad(dai).minus(DAI.rad(sin)); } // Helpers ---------------------------------------------- diff --git a/packages/dai-plugin-mcd/test/SystemDataService.spec.js b/packages/dai-plugin-mcd/test/SystemDataService.spec.js index c47d4b618..14d51eeed 100644 --- a/packages/dai-plugin-mcd/test/SystemDataService.spec.js +++ b/packages/dai-plugin-mcd/test/SystemDataService.spec.js @@ -1,6 +1,6 @@ import { mcdMaker } from './helpers'; import { ServiceRoles } from '../src/constants'; -import { MDAI } from '../src/index'; +import { DAI } from '../src/index'; let service; let maker; @@ -28,5 +28,5 @@ test('get global settlement status', async () => { test('get system surplus', async () => { const surplus = await service.getSystemSurplus(); console.log('surplus.toNumber', surplus.toNumber()); - expect(surplus).toEqual(MDAI(0)); //TODO change to expect non-zero number + expect(surplus).toEqual(DAI(0)); //TODO change to expect non-zero number }); diff --git a/packages/dai-plugin-migrations/src/migrations/GlobalSettlementDaiRedeemer.js b/packages/dai-plugin-migrations/src/migrations/GlobalSettlementDaiRedeemer.js index ad0b146fe..161af92b8 100644 --- a/packages/dai-plugin-migrations/src/migrations/GlobalSettlementDaiRedeemer.js +++ b/packages/dai-plugin-migrations/src/migrations/GlobalSettlementDaiRedeemer.js @@ -54,11 +54,11 @@ export default class GlobalSettlementDaiRedeemer { async bagAmount(address) { const end = this._container.get('smartContract').getContract('MCD_END_1'); const bag = await end.bag(address); - return MDAI_1.wei(bag); + return DAI_1.wei(bag); } async packDai(daiAmount) { - const formattedAmount = MDAI_1(daiAmount).toFixed('wei'); + const formattedAmount = DAI_1(daiAmount).toFixed('wei'); const endAddress = this._container .get('smartContract') .getContractAddress('MCD_END_1'); @@ -72,7 +72,7 @@ export default class GlobalSettlementDaiRedeemer { } async cashEth(daiAmount) { - const formattedAmount = MDAI_1(daiAmount).toFixed('wei'); + const formattedAmount = DAI_1(daiAmount).toFixed('wei'); const joinAddress = this._container .get('smartContract') .getContractAddress('MCD_JOIN_ETH_A'); @@ -89,7 +89,7 @@ export default class GlobalSettlementDaiRedeemer { } async cashBat(daiAmount) { - const formattedAmount = MDAI_1(daiAmount).toFixed('wei'); + const formattedAmount = DAI_1(daiAmount).toFixed('wei'); const joinAddress = this._container .get('smartContract') .getContractAddress('MCD_JOIN_BAT_A'); @@ -106,7 +106,7 @@ export default class GlobalSettlementDaiRedeemer { } async cashUsdc(daiAmount) { - const formattedAmount = MDAI_1(daiAmount).toFixed('wei'); + const formattedAmount = DAI_1(daiAmount).toFixed('wei'); const joinAddress = this._container .get('smartContract') .getContractAddress('MCD_JOIN_USDC_A'); diff --git a/packages/dai-plugin-migrations/test/migrations/GlobalSettlementCollateralClaims.spec.js b/packages/dai-plugin-migrations/test/migrations/GlobalSettlementCollateralClaims.spec.js index e65b8060f..540aca731 100644 --- a/packages/dai-plugin-migrations/test/migrations/GlobalSettlementCollateralClaims.spec.js +++ b/packages/dai-plugin-migrations/test/migrations/GlobalSettlementCollateralClaims.spec.js @@ -89,7 +89,7 @@ describe('Global Settlement Collateral Claims migration', () => { xtest('freeEth', async () => { await setupCollateral(maker, 'ETH-A', { price: 150, debtCeiling: 50 }); - const cdp = await cdpManager.openLockAndDraw('ETH-A', ETH(0.1), MDAI(1)); + const cdp = await cdpManager.openLockAndDraw('ETH-A', ETH(0.1), DAI(1)); mockContracts(smartContract, { MCD_END_1: globalSettlement.afterCageCollateral({ 'ETH-A': 150 }) });