I hereby claim:
- I am gre on github.
- I am greweb (https://keybase.io/greweb) on keybase.
- I have a public key whose fingerprint is 70D1 29E9 37F5 DB8B BC04 6E46 92B0 2128 CF8C 915B
To claim this, I am signing this object:
{ | |
"private": true, | |
"name": "send-example", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"@ledgerhq/hw-transport-node-hid-noevents": "canary", | |
"@ledgerhq/ledger-core": "alpha", | |
"@ledgerhq/live-common": "alpha", |
require("babel-polyfill"); | |
const request = require("request"); | |
const { listTokens } = require("@ledgerhq/live-common/lib/currencies"); | |
require("@ledgerhq/live-common/lib/load/tokens/ethereum/erc20"); | |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
const fetch = url => | |
new Promise((resolve, reject) => | |
request(url, (error, response, body) => { |
/* | |
* I want to trigger something 5s after mount with some props | |
*/ | |
const Thing = ({ a, b }) => { | |
useEffect(() => { | |
const timeout = setTimeout(() => { | |
doTheThing(a, b); | |
}, 5000); |
async function suspenseReadToPromise(read, ...args) { | |
let value; | |
try { | |
value = read(...args); | |
} catch (e) { | |
if (e && typeof e.then === "function") { | |
value = await e; | |
} | |
else { |
I hereby claim:
To claim this, I am signing this object:
class Finish extends r.Component { | |
constructor(...e) { | |
var t | |
return ( | |
(t = super(...e)), | |
Object.defineProperty(this, 'state', { | |
configurable: !0, | |
enumerable: !0, | |
writable: !0, | |
value: { emit: !1 }, |
This is a quick guide to show how to integrate Ledger Ethereum libraries into an existing web application.
If you are starting a new DApp project from scratch, or simply are beginning in this Ethereum Smart Contract world, we have made create-dapp
Starter Kit for you, it comes with a out-of-the-box support of Ledger and MetaMask and shows a complete smart contract example (that allows to get/set a value globally).
Whether you want to integrate on an existing app or bootstrap it from scratch with our starter kit, the follow guide will drive you to important part on how things work with the Ledger.
function recordHistory() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
// Toggle a cell that is used in one of a CRYPTOFINANCE formula to force-trigger a refresh | |
var r = ss.getSheetByName("folio").getRange("A30"); | |
var unit = r.getValues()[0][0]; | |
r.setValue(unit==='BTCEUR'?'BTC/EUR':'BTCEUR'); | |
// accumulate history | |
var sheet = ss.getSheetByName("History"); |
import React, { Component } from "react"; | |
class Counter extends Component { | |
state = { count: 1 }; | |
onClick = () => this.setState(({ count }) => ({ count: count + 1 })); | |
render() { | |
return ( | |
<button onClick={this.onClick}> | |
{this.state.count} | |
</button> |
//@flow | |
import React, { | |
Component, | |
PropTypes, | |
} from "react"; | |
const hasWindow = typeof window !== "undefined"; | |
export default class AspectRatioDiv extends Component { | |
state: { width: ?number } = { |