Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
Fix do not send to 0x0 if overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaylina committed Apr 21, 2017
1 parent 3b368e1 commit d7439be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/VaultController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ contract VaultController is Owned {


VaultController public parentVaultController; // Controller of the Vault that feeds this Vault (if there is one)
address public parentVault; // Address that feeds this Vault, and recieves money when this Vault overflows
address public parentVault; // Address that feeds this Vault, and recieves money when this Vault overflows
Vault public primaryVault; // Vault that is funding all the childVaults

VaultFactory public vaultFactory; // the contract that is used to create vaults
Expand Down Expand Up @@ -442,7 +442,9 @@ contract VaultController is Owned {
/// @notice A `childVaultController` calls this function to reduce their
/// Vault's Balance to the `highestAcceptableBalance`
function sendBackOverflow() {
if (primaryVault.getBalance() > highestAcceptableBalance) {
if ( (primaryVault.getBalance() > highestAcceptableBalance)
&&(parentVault != 0))
{
primaryVault.authorizePayment(
"VAULT OVERFLOW",
bytes32(0),
Expand Down

0 comments on commit d7439be

Please sign in to comment.