Remove redundant function in MixinZrxVault

This commit is contained in:
Amir Bandeali
2019-08-28 11:20:00 -07:00
parent 1a833d9dfb
commit 16c9d00494
2 changed files with 2 additions and 21 deletions

View File

@@ -171,7 +171,7 @@ contract MixinStake is
internal
{
// deposit equivalent amount of ZRX into vault
_depositFromOwnerIntoZrxVault(owner, amount);
zrxVault.depositFrom(owner, amount);
// mint stake
stakeByOwner[owner] = stakeByOwner[owner].safeAdd(amount);
@@ -193,7 +193,7 @@ contract MixinStake is
stakeByOwner[owner] = stakeByOwner[owner].safeSub(amount);
// withdraw equivalent amount of ZRX from vault
_withdrawToOwnerFromZrxVault(owner, amount);
zrxVault.withdrawFrom(owner, amount);
// emit stake event
emit StakeBurned(

View File

@@ -27,7 +27,6 @@ import "../immutable/MixinStorage.sol";
contract MixinZrxVault is
MixinStorage
{
/// @dev Set the Zrx Vault.
/// @param zrxVaultAddress Address of the Zrx Vault.
function setZrxVault(address zrxVaultAddress)
@@ -46,22 +45,4 @@ contract MixinZrxVault is
{
return address(zrxVault);
}
/// @dev Deposits Zrx Tokens from the `owner` into the vault.
/// @param owner of Zrx Tokens
/// @param amount of tokens to deposit.
function _depositFromOwnerIntoZrxVault(address owner, uint256 amount)
internal
{
zrxVault.depositFrom(owner, amount);
}
/// @dev Withdraws Zrx Tokens from to `owner` from the vault.
/// @param owner of deposited Zrx Tokens
/// @param amount of tokens to withdraw.
function _withdrawToOwnerFromZrxVault(address owner, uint256 amount)
internal
{
zrxVault.withdrawFrom(owner, amount);
}
}