Code has been added to clipboard!
Subcurrency: Using the IF Statement
Example
Coin.Sent().watch({}, '', function(error, result) {
if (!error) {
console.log("Coin transfer: " + result.args.amount +
" coins were sent from " + result.args.from +
" to " + result.args.to + ".");
console.log("Coin balances now:\n" +
"Sender: " + Coin.coinBalances.call(result.args.from) +
"Receiver: " + Coin.coinBalances.call(result.args.to));
}
})