Replace nonReentrant + refundFinalBalance with refundFinalBalanceNoReentry
This commit is contained in:
@@ -18,8 +18,12 @@
|
||||
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "./ReentrancyGuard.sol";
|
||||
|
||||
contract Refundable {
|
||||
|
||||
contract Refundable is
|
||||
ReentrancyGuard
|
||||
{
|
||||
|
||||
// This bool is used by the refund modifier to allow for lazily evaluated refunds.
|
||||
bool internal _shouldNotRefund;
|
||||
@@ -29,6 +33,13 @@ contract Refundable {
|
||||
_refundNonZeroBalanceIfEnabled();
|
||||
}
|
||||
|
||||
modifier refundFinalBalanceNoReentry {
|
||||
_lockMutexOrThrowIfAlreadyLocked();
|
||||
_;
|
||||
_refundNonZeroBalanceIfEnabled();
|
||||
_unlockMutex();
|
||||
}
|
||||
|
||||
modifier disableRefundUntilEnd {
|
||||
if (_areRefundsDisabled()) {
|
||||
_;
|
||||
|
Reference in New Issue
Block a user