-
Notifications
You must be signed in to change notification settings - Fork 59
Brian/open order amount #90
Conversation
describe("when the set was not created through core", async () => { | ||
beforeEach(async () => { | ||
issuanceOrderParams = await generateFillOrderParameters(NULL_ADDRESS, signerAddress, signerAddress, componentAddresses[0]) | ||
issuanceOrderParams = await generateFillOrderParameters(NULL_ADDRESS, signerAddress, signerAddress, componentAddresses[0], relayerAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the maker address you're passing in here also signerAddress
?
}); | ||
}); | ||
|
||
describe("when the order quantity is not a multiple of the natural unit of the set", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In these specs where the setup is all common, can you help identify what is is you're toggling? I would put generateFillOrderParameters
. In beforeEach
on line 124, you're already doing this generation, and then you're regenerating for each of these test cases. I'd create a variable for each one and then just toggle the specific variable in each test case.
function validateOrder( | ||
OrderLibrary.IssuanceOrder _order, | ||
uint _fillQuantity | ||
uint _executeQuantity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference behind executeQuantity and fillQuantity? Are you just making it generic for this private function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si Papi
const naturalUnit: BigNumber = ether(2); | ||
let components: StandardTokenMockContract[] = []; | ||
let componentUnits: BigNumber[]; | ||
let setToken: SetTokenContract; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's tighten these up, remove any variables here, also in cancelOrder
for variables that don't need to be toggled.
naturalUnit
, components
, componentUnits
, setToken
test/core/lib/orderLibrary.spec.ts
Outdated
let issuanceOrderParams: any; | ||
|
||
beforeEach(async () => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: space
c3297c1
to
b0b6044
Compare
…onciling fill and cancel amounts with open order size. Added some natural unit checks on fill and cancel quantities.
b0b6044
to
0190c80
Compare
Pull Request Test Coverage Report for Build 448
💛 - Coveralls |
No description provided.