Update registry.sol

Update in addDsa to add any DSA.
This commit is contained in:
Samyak Jain 2020-08-27 18:35:33 +10:00 committed by GitHub
parent 4e423adf1a
commit 1589018a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,9 +137,11 @@ contract Registry {
emit LogUpdateInsureFee(_pool, _newFee);
}
function addDsa(address _pool) external isMaster {
function addDsa(address _pool, address _dsa) external isMaster {
require(isPool[_pool], "not-pool");
address _dsa = instaIndex.build(_pool, 1, address(this));
if (_dsa == address(0)) {
_dsa = instaIndex.build(_pool, 1, address(this));
}
isDsa[_pool][_dsa] = true;
emit LogNewDSA(_pool, _dsa);
}