It's not usual to use an external property with different semantics (address(childVault) == 0) that the propery name says. Maybe is usefull to add a function like isInitialized() for this:
Instead:
function topUpVault() initialized notCanceled {
...
Vault childVault = Vault(vc.primaryVault());
if (address(childVault) == 0) throw; // Child project is not initialized
...
}
use
function topUpVault() initialized notCanceled {
...
if (!vc.isInitialized()) throw;
Vault childVault = Vault(vc.primaryVault());
...
}
It's not usual to use an external property with different semantics (address(childVault) == 0) that the propery name says. Maybe is usefull to add a function like
isInitialized()
for this:Instead:
use