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.
15 lines
342 B
15 lines
342 B
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;
|
|
}
|
|
}
|
|
}
|
|
|