From 782ea8d9ab569616e01c159b8fc142d2f3b220d6 Mon Sep 17 00:00:00 2001 From: mingda Date: Fri, 7 Aug 2020 21:50:33 +0800 Subject: [PATCH] restruct dodozoo remove dodo --- contracts/DODOZoo.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/DODOZoo.sol b/contracts/DODOZoo.sol index 882a30f..5ece610 100644 --- a/contracts/DODOZoo.sol +++ b/contracts/DODOZoo.sol @@ -62,12 +62,13 @@ contract DODOZoo is Ownable { address quoteToken = IDODO(dodo)._QUOTE_TOKEN_(); require(isDODORegistered(baseToken, quoteToken), "DODO_NOT_REGISTERED"); _DODO_REGISTER_[baseToken][quoteToken] = address(0); - for (uint256 i = 0; i < _DODOs.length - 1; i++) + for (uint256 i = 0; i < _DODOs.length - 1; i++) { if (_DODOs[i] == dodo) { _DODOs[i] = _DODOs[_DODOs.length - 1]; + _DODOs.pop(); break; } - _DODOs.pop(); + } } function addDODO(address dodo) public onlyOwner {