Added Max Dest Amount Argument in the executeTrade function.

This commit is contained in:
Sowmayjain 2018-11-26 01:00:47 +05:30
parent 544c92dda6
commit 70f48cb607
2 changed files with 6 additions and 5 deletions

View File

@ -81,10 +81,11 @@ contract Trade is Registry {
} }
function executeTrade( function executeTrade(
address src, address src, // token to sell
address dest, address dest, // token to buy
uint srcAmt, uint srcAmt, // amount of token for sell
uint minConversionRate uint minConversionRate, // minimum slippage rate
uint maxDestAmt // max amount of dest token
) public payable returns (uint destAmt) ) public payable returns (uint destAmt)
{ {
@ -97,7 +98,7 @@ contract Trade is Registry {
srcAmt, srcAmt,
dest, dest,
msg.sender, msg.sender,
2**256 - 1, maxDestAmt,
minConversionRate, minConversionRate,
getAddress("admin") getAddress("admin")
); );