Skip to content

Instantly share code, notes, and snippets.

@gabrielbiga
Created February 11, 2019 02:14
Show Gist options
  • Save gabrielbiga/cffcc2ffc8e6787fcfd7575139f7f15a to your computer and use it in GitHub Desktop.
Save gabrielbiga/cffcc2ffc8e6787fcfd7575139f7f15a to your computer and use it in GitHub Desktop.
The org.wiboo.wibxp.financial file - Reusing functions in Hyperledger Composer chaincode
/** 
* Function to process the transfer transaction. 
* @param {org.wiboo.wibxp.financial.TransferTransaction} tx The financial transaction 
* @transaction 
*/ 
function transferTransaction(tx) 
{
  // Check if the amount is valid 
  isAmountValid(tx.amount); 
 
  // … Rest of your code … 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment