Skip to content

Instantly share code, notes, and snippets.

@devonwesley
Created October 14, 2017 00:40
Show Gist options
  • Save devonwesley/c2e84f54537165dec2083c36e0d888a1 to your computer and use it in GitHub Desktop.
Save devonwesley/c2e84f54537165dec2083c36e0d888a1 to your computer and use it in GitHub Desktop.
function withdrawShares() insureShareholder {
uint shareCount = shares[msg.sender].shareCount;
shares[msg.sender].shareCount = 0;
if (msg.sender.send(shareCount)){
SharesWithdrawn(msg.sender, shareCount);
} else {
shares[msg.sender].shareCount = shareCount;
FailedSend(msg.sender, shareCount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment