Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
fix some more references
Browse files Browse the repository at this point in the history
  • Loading branch information
levity committed May 26, 2020
1 parent 4e88fea commit fcbeec5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/dai-plugin-mcd/src/SystemDataService.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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 ----------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions packages/dai-plugin-mcd/test/SystemDataService.spec.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
});
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
});
Expand Down

0 comments on commit fcbeec5

Please sign in to comment.