Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaryab2000/10a20ff98f0406c25afc42755e2cc9ba to your computer and use it in GitHub Desktop.
Save zaryab2000/10a20ff98f0406c25afc42755e2cc9ba to your computer and use it in GitHub Desktop.
//DONATING FUNDS TO PATIENTS
function donateAmount(address _pid) public payable{
require((msg.sender).balance >= msg.value);
patientList[_pid].donatedAmount = msg.value;
donorList[msg.sender] = msg.value;
donorCount++;
donationHistoryList[donorCount] = donationHistory(_pid, msg.sender,now,msg.value,patientList[_pid].name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment