Remove redundant function in MixinZrxVault
This commit is contained in:
@@ -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(
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user