You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since in root vault the parentVault is 0, cancelVault() will generate an primaryVault.authorizePayment and balance will be sent to 0 address
function cancelVault() onlyOwnerOrParent returns (bool _finished) {
// If ! initialized, just mark it as cancelled and return
if (address(primaryVault) == 0) {
canceled = true;
}
if (canceled) return true; //If it is already canceled, just return.
cancelAllChildVaults();
if (msg.gas < GAS_LIMIT) return false;
uint vaultBalance = primaryVault.getBalance();
canceled = true;
highestAcceptableBalance = 0;
lowestAcceptableBalance = 0;
owner = parentVaultController;
if (vaultBalance > 0) {
primaryVault.authorizePayment(
"CANCEL CHILD VAULT",
bytes32(msg.sender),
address(parentVault),
vaultBalance,
0
);
VaultCanceled(msg.sender);
}
// Be sure that there is nothing remaining in the vault
if (primaryVault.getBalance() > 0) throw;
return true;
}
The text was updated successfully, but these errors were encountered:
Since in root vault the
parentVault
is 0,cancelVault()
will generate anprimaryVault.authorizePayment
and balance will be sent to 0 addressThe text was updated successfully, but these errors were encountered: