Преглед на файлове

Remove assert and send in favor of transfer for PullPayment.sol (#823)

* Removed assert from send() and changed to transfer()

* Slightly adapted docs
Schneider Jakob преди 7 години
родител
ревизия
b33260ac44
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      contracts/payment/PullPayment.sol

+ 3 - 3
contracts/payment/PullPayment.sol

@@ -7,7 +7,7 @@ import "../math/SafeMath.sol";
 /**
  * @title PullPayment
  * @dev Base contract supporting async send for pull payments. Inherit from this
- * contract and use asyncSend instead of send.
+ * contract and use asyncSend instead of send or transfer.
  */
 contract PullPayment {
   using SafeMath for uint256;
@@ -16,7 +16,7 @@ contract PullPayment {
   uint256 public totalPayments;
 
   /**
-  * @dev withdraw accumulated balance, called by payee.
+  * @dev Withdraw accumulated balance, called by payee.
   */
   function withdrawPayments() public {
     address payee = msg.sender;
@@ -28,7 +28,7 @@ contract PullPayment {
     totalPayments = totalPayments.sub(payment);
     payments[payee] = 0;
 
-    assert(payee.send(payment));
+    payee.transfer(payment);
   }
 
   /**