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