From fe2e4124423f08c8bcfde60faff05d9349e0a0a6 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Fri, 18 Dec 2020 14:38:50 -0800 Subject: [PATCH] Removing commented code --- src/components/footer/index.js | 129 ++++++--------------------------- src/components/site-config.js | 5 +- 2 files changed, 27 insertions(+), 107 deletions(-) diff --git a/src/components/footer/index.js b/src/components/footer/index.js index f45542f..1f2a82b 100644 --- a/src/components/footer/index.js +++ b/src/components/footer/index.js @@ -3,12 +3,8 @@ import './footer.css' import { Row, Col } from 'adminlte-2-react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faGithub } from '@fortawesome/free-brands-svg-icons' -// import { getWalletInfo } from '../localWallet' import PropTypes from 'prop-types' -// Get the IPFS hash from the BCH Blockchain. -// import MemoGet from 'memo-get-gatsby' - // Get the IPFS hash from the BCH Blockchain. import Memo from '../../services/memo-hash' const siteConfig = require('../site-config') @@ -29,23 +25,17 @@ class Footer extends React.Component { bchWallet: props.bchWallet, bchAddr: siteConfig.memoAddr }) - - // memo-get-gatsby Instance - // this.memoGet = _this.instantiateMemoLib() } async componentDidMount () { // Get hash using memo service await this.handleMemoService() - - // Get hash using memo-get-gatsby library - // await this.handleMemoGet() } async handleMemoService () { // This is a hard-coded hash or 'checkpoint' to use in times when the // connection fails. - const hash = 'QmXbaYeTMMsQnLYpthpfoUJhz8o1DWqjoUwLUhC9KFUrAW' + const hash = 'QmXT85Xoi7xMRD9m7Ta4Cx8Yrsd2WSzLrq2VRo26KW4xLu' // Try to retrieve the hash from the BCH blockchain. try { @@ -65,110 +55,63 @@ class Footer extends React.Component { }) } - // Get hash using memo-get-gatsby - // async handleMemoGet () { - // try { - // const addr = 'bitcoincash:qq8mk8etntclfdkny2aknh4ylc0uaewalszh5eytnr' - // const hash = await _this.memoGet.read(addr) - // console.log(`hash: ${hash}`) - // - // this.setState({ - // ipfsHash: hash, - // ipfsHashLink: `https://ipfs-gateway.fullstack.cash/ipfs/${hash}` - // }) - // } catch (err) { - // console.error('Error trying to retrieve IPFS hash for the site: ', err) - // - // // Manually set an old hash. - // const hash = 'QmVm1y1MX4YPzmgQiAafY96Pq7j6GTNMFNuvHki1jAwxYg' - // this.setState({ - // ipfsHash: hash, - // ipfsHashLink: `https://ipfs-gateway.fullstack.cash/ipfs/${hash}` - // }) - // } - // - // // const bchjs = new BCHJS() - // // const balance = await bchjs.Blockbook.balance(addr) - // // console.log(`balance: ${JSON.stringify(balance, null, 2)}`) - // } - - // Instantiate the library with the - // bchjs options established in the configuration section - // instantiateMemoLib () { - // // Get wallet info - // const localStorageInfo = getWalletInfo() - // - // // Get bchjs options - // const jwtToken = localStorageInfo.JWT - // const restURL = localStorageInfo.selectedServer - // const bchjsOptions = {} - // - // if (jwtToken) { - // bchjsOptions.apiToken = jwtToken - // } - // if (restURL) { - // bchjsOptions.restURL = restURL - // } - // return new MemoGet(bchjsOptions) - // } - render () { return ( -