From c9320fd1b7a9bb228806f99ce48d28163a9e2885 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 4 Nov 2017 14:32:45 -0500 Subject: [PATCH] chequebook: use modern transfer method --- contracts/chequebook/contract/chequebook.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/chequebook/contract/chequebook.sol b/contracts/chequebook/contract/chequebook.sol index 538ca48336..cc1a24888b 100644 --- a/contracts/chequebook/contract/chequebook.sol +++ b/contracts/chequebook/contract/chequebook.sol @@ -33,10 +33,7 @@ contract chequebook is mortal { if (diff <= this.balance) { // update the cumulative amount before sending sent[beneficiary] = amount; - if (!beneficiary.send(diff)) { - // Upon failure to execute send, revert everything - throw; - } + beneficiary.transfer(diff); } else { // Upon failure, punish owner for writing a bounced cheque. // owner.sendToDebtorsPrison();