Created
August 12, 2017 04:04
-
-
Save ukd1/2314c6d3350f6e9bece47a1bad91113c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function faucet(session) { | |
// send $0.10 USD at current exchange rates | |
let amt = 0.1 | |
let count = (session.get('count') || 0) + amt | |
session.set('count', count) | |
Fiat.fetch().then((toEth) => { | |
session.sendEth(toEth.USD(amt)) | |
sendMessage(session, `Sent ${amt} π°π€π°`) | |
sendMessage(session, `FYI you've recieved ${count} eth from the me so far π`) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment