From b33260ac44a79a5b3ce71af91e636ceb3c9d6100 Mon Sep 17 00:00:00 2001 From: Schneider Jakob Date: Wed, 21 Mar 2018 22:30:58 +0100 Subject: [PATCH] Remove assert and send in favor of transfer for PullPayment.sol (#823) * Removed assert from send() and changed to transfer() * Slightly adapted docs --- contracts/payment/PullPayment.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.sol index 7fc6c000c..5dd28c0f5 100644 --- a/contracts/payment/PullPayment.sol +++ b/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); } /**