Skip to content

Commit

Permalink
Pull Request Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-pepo committed Feb 2, 2018
1 parent 929ce3e commit cea5fe5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions contracts/OpenSTUtility.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ contract OpenSTUtility is Hasher, OpsManaged {
address _beneficiary, uint256 _amountUT);

event RedemptionIntentDeclared(bytes32 indexed _uuid, bytes32 indexed _redemptionIntentHash,
address _token, address _redeemer, address _beneficiary, uint256 _nonce, uint256 _amount, uint256 _unlockHeight,
address _token, address _redeemer, uint256 _nonce, address _beneficiary, uint256 _amount, uint256 _unlockHeight,
uint256 _chainIdValue);

event ProcessedRedemption(bytes32 indexed _uuid, bytes32 indexed _redemptionIntentHash, address _token,
Expand Down Expand Up @@ -349,7 +349,7 @@ contract OpenSTUtility is Hasher, OpsManaged {
});

RedemptionIntentDeclared(_uuid, redemptionIntentHash, address(token),
msg.sender, _beneficiary, _nonce, _amountBT, unlockHeight, chainIdValue);
msg.sender, _nonce, _beneficiary, _amountBT, unlockHeight, chainIdValue);

return (unlockHeight, redemptionIntentHash);
}
Expand Down Expand Up @@ -397,7 +397,7 @@ contract OpenSTUtility is Hasher, OpsManaged {
});

RedemptionIntentDeclared(uuidSTPrime, redemptionIntentHash, simpleTokenPrime,
msg.sender, _beneficiary, _nonce, amountSTP, unlockHeight, chainIdValue);
msg.sender, _nonce, _beneficiary, amountSTP, unlockHeight, chainIdValue);

return (amountSTP, unlockHeight, redemptionIntentHash);
}
Expand Down
6 changes: 3 additions & 3 deletions test/OpenSTUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ contract('OpenSTUtility', function(accounts) {
const requester = "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const token = "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
const redeemer = accounts[0];
const redeemBeneficiary = accounts[0];
const redeemBeneficiary = accounts[2];

var result = null;
var checkBtUuid = null;
Expand Down Expand Up @@ -345,7 +345,7 @@ contract('OpenSTUtility', function(accounts) {
result = await openSTUtility.redeem(checkBtUuid, redeemAmountUT, 2, redeemBeneficiary, { from: redeemer });

await OpenSTUtility_utils.checkRedemptionIntentDeclaredEvent(result.logs[0], checkBtUuid, checkRedemptionIntentHash, brandedToken,
redeemer, redeemBeneficiary, 2, redeemAmountUT, unlockHeight, chainIdValue);
redeemer, 2, redeemBeneficiary, redeemAmountUT, unlockHeight, chainIdValue);
})
})

Expand Down Expand Up @@ -383,7 +383,7 @@ contract('OpenSTUtility', function(accounts) {
result = await openSTUtility.redeemSTPrime(redeemSTP, redeemBeneficiary, { from: redeemer, value: redeemSTP });

await OpenSTUtility_utils.checkRedemptionIntentDeclaredEvent(result.logs[0], uuidSTPrime, checkRedemptionIntentHash, stPrime.address,
redeemer, redeemBeneficiary, 2, redeemSTP.toNumber(), unlockHeight, chainIdValue);
redeemer, 2, redeemBeneficiary, redeemSTP.toNumber(), unlockHeight, chainIdValue);
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/OpenSTUtility_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module.exports.checkProcessedMintEvent = (event, _uuid, _stakingIntentHash, _tok
assert.equal(event.args._amount.toNumber(), _amount.toNumber());
}

module.exports.checkRedemptionIntentDeclaredEvent = (event, _uuid, _redemptionIntentHash, _token, _redeemer, _beneficiary, _nonce, _amount, _unlockHeight, _chainIdValue) => {
module.exports.checkRedemptionIntentDeclaredEvent = (event, _uuid, _redemptionIntentHash, _token, _redeemer, _nonce, _beneficiary, _amount, _unlockHeight, _chainIdValue) => {
if (Number.isInteger(_amount)) {
_amount = new BigNumber(_amount);
}
Expand Down
10 changes: 5 additions & 5 deletions test/Protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ contract('OpenST', function(accounts) {
redemptionIntentHash = redeemResult.logs[0].args._redemptionIntentHash;
unlockHeight = redeemResult.logs[0].args._unlockHeight;
openSTUtilityUtils.checkRedemptionIntentDeclaredEvent(redeemResult.logs[0], registeredBrandedTokenUuid, redemptionIntentHash, brandedToken.address,
redeemer, redeemBeneficiary, nonce, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);
redeemer, nonce, redeemBeneficiary, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);
utils.logResponse(redeemResult, "OpenSTUtility.redeem");

});
Expand Down Expand Up @@ -450,7 +450,7 @@ contract('OpenST', function(accounts) {
redemptionIntentHash = redeemResult.logs[0].args._redemptionIntentHash;
unlockHeight = redeemResult.logs[0].args._unlockHeight;
openSTUtilityUtils.checkRedemptionIntentDeclaredEvent(redeemResult.logs[0], uuidSTP, redemptionIntentHash, stPrime.address,
redeemer, redeemBeneficiary, nonce, REDEEM_AMOUNT_STPRIME, unlockHeight, CHAINID_VALUE);
redeemer, nonce, redeemBeneficiary, REDEEM_AMOUNT_STPRIME, unlockHeight, CHAINID_VALUE);

utils.logResponse(redeemResult, "OpenSTUtility.STPrime.redeem");

Expand Down Expand Up @@ -759,7 +759,7 @@ contract('OpenST', function(accounts) {
redemptionIntentHash = redeemResult.logs[0].args._redemptionIntentHash;
unlockHeight = redeemResult.logs[0].args._unlockHeight;
openSTUtilityUtils.checkRedemptionIntentDeclaredEvent(redeemResult.logs[0], registeredBrandedTokenUuid, redemptionIntentHash,
brandedToken.address, redeemer, redeemBeneficiary, nonce, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);
brandedToken.address, redeemer, nonce, redeemBeneficiary, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);

utils.logResponse(redeemResult, "OpenSTUtility.revertRedemption.redeem");

Expand Down Expand Up @@ -821,7 +821,7 @@ contract('OpenST', function(accounts) {
redemptionIntentHash = redeemResult.logs[0].args._redemptionIntentHash;
unlockHeight = redeemResult.logs[0].args._unlockHeight;
openSTUtilityUtils.checkRedemptionIntentDeclaredEvent(redeemResult.logs[0], registeredBrandedTokenUuid, redemptionIntentHash,
brandedToken.address, redeemer, redeemBeneficiary, nonce, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);
brandedToken.address, redeemer, nonce, redeemBeneficiary, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);

utils.logResponse(redeemResult, "OpenSTUtility.revertUnstake.redeem");

Expand Down Expand Up @@ -925,7 +925,7 @@ contract('OpenST', function(accounts) {
redemptionIntentHash = redeemResult.logs[0].args._redemptionIntentHash;
unlockHeight = redeemResult.logs[0].args._unlockHeight;
openSTUtilityUtils.checkRedemptionIntentDeclaredEvent(redeemResult.logs[0], registeredBrandedTokenUuid, redemptionIntentHash,
brandedToken.address, redeemer, redeemBeneficiary, nonce, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);
brandedToken.address, redeemer, nonce, redeemBeneficiary, REDEEM_AMOUNT_BT, unlockHeight, CHAINID_VALUE);

utils.logResponse(redeemResult, "OpenSTUtility.revertUnstake.redeem");

Expand Down

0 comments on commit cea5fe5

Please sign in to comment.