Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/LoopringProtocol.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract LoopringProtocol {
function cancelAllOrdersByTradingPair(
address token1,
address token2,
uint cutoff
uint cutoff
)
external;

Expand Down Expand Up @@ -116,7 +116,7 @@ contract LoopringProtocol {
function submitRing(
address[5][] addressesList,
uint[6][] valuesList,
uint8[] optionList,
uint8[] optionList,
bytes[] sigList,
address miner,
uint8 feeSelections
Expand Down
2 changes: 2 additions & 0 deletions contracts/LoopringProtocolImpl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ contract LoopringProtocolImpl is LoopringProtocol {
order.amountS < availableAmountS ?
order.amountS : availableAmountS
);
require(order.fillAmountS > 0, "fillAmountS is 0");
}
}
}
Expand Down Expand Up @@ -842,6 +843,7 @@ contract LoopringProtocolImpl is LoopringProtocol {
order.fillAmountS = fillAmountB.mul(
order.rateS
) / order.rateB;
require(order.fillAmountS > 0, "fillAmountS is 0");

newSmallestIdx = i;
}
Expand Down
18 changes: 10 additions & 8 deletions contracts/TokenTransferDelegateImpl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,16 @@ contract TokenTransferDelegateImpl is TokenTransferDelegate, Claimable {
// Here batch[i + 4] has been checked not to be 0.
if (owner != prevOwner) {
amount = uint(batch[i + 4]);
require(
ERC20(token).transferFrom(
owner,
prevOwner,
amount
),
"token transfer failure"
);
if (amount > 0) {
require(
ERC20(token).transferFrom(
owner,
prevOwner,
amount
),
"token transfer failure"
);
}

if (tracker != 0x0) {
require(
Expand Down