fix: check digg transfer return value
@@ -47,7 +47,7 @@ contract DiggSett is Sett {
return strategyShares.add(settShares);
}
- function getPricePerFullShare() public view override returns (uint256) {
+ function getPricePerFullShare() public override view returns (uint256) {
if (totalSupply() == 0) {
return 1e18;
}
@@ -66,7 +66,7 @@ contract DiggSett is Sett {
uint256 _poolBefore = shares(); // Shares realized in system before transfer
uint256 _before = digg.sharesOf(address(this));
- digg.transferFrom(msg.sender, address(this), _amount);
+ require(digg.transferFrom(msg.sender, address(this), _amount));
uint256 _after = digg.sharesOf(address(this));
uint256 _sharesTransferred = _after.sub(_before); // Additional check for deflationary tokens
