I hereby claim:
- I am mosesfinlay on github.
- I am mosesfinlay (https://keybase.io/mosesfinlay) on keybase.
- I have a public key ASA7lhU2XdYcyKva-CbkplG6NtqX2vjj9f_ygviIpPQuvAo
To claim this, I am signing this object:
const fs = require("fs"); | |
const axios = require("axios"); | |
const blocks = []; | |
let gasUsed = 0; | |
function toDateTime(secs) { | |
var t = new Date(1970, 0, 1); // Epoch | |
t.setSeconds(secs); | |
return t; |
// ... | |
nearLogin = () => { | |
const { wallet } = this.state; | |
wallet.requestSignIn("example.testnet"); | |
} | |
componentDidMount() { | |
this.initNear(); | |
} |
// ... | |
class App extends Component { | |
state = { | |
wallet: false, | |
accountId: null, | |
} | |
sendNear = async (amount, receiver) => { | |
const { wallet } = this.state; |
render() { | |
const { accountId } = this.state; | |
return ( | |
<div className="App"> | |
<header> | |
<h1>Near Tip Button</h1> | |
<button onClick={this.nearLogin}>Login with Near</button> | |
{accountId && <p>Signed in as: {accountId}</p>} |
// ... | |
// Import library | |
import * as nearAPI from "near-api-js"; | |
const { utils, connect, keyStores, WalletConnection } = nearAPI; | |
// Connection configuration | |
const config = { | |
testnet: { | |
networkId: "testnet", | |
keyStore: new keyStores.BrowserLocalStorageKeyStore(), |
I hereby claim:
To claim this, I am signing this object: