You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
342 B
16 lines
342 B
9 years ago
|
contract PullPaymentCapable {
|
||
|
mapping(address => uint) refunds;
|
||
|
|
||
|
function asyncSend(address dest, uint amount) {
|
||
|
refunds[dest] += amount;
|
||
|
}
|
||
|
|
||
|
function withdrawRefund() external {
|
||
|
uint refund = refunds[msg.sender];
|
||
|
refunds[msg.sender] = 0;
|
||
|
if (!msg.sender.send(refund)) {
|
||
|
refunds[msg.sender] = refund;
|
||
|
}
|
||
|
}
|
||
|
}
|