Removing commented code

This commit is contained in:
Chris Troutner
2020-12-18 14:38:50 -08:00
parent 7e9d9e2bda
commit fe2e412442
2 changed files with 27 additions and 107 deletions
+23 -106
View File
@@ -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 (
<section id='footer'>
<Row className='footer-container'>
<Col md={5} className='footer-section'>
<section id="footer">
<Row className="footer-container">
<Col md={5} className="footer-section">
<Row>
<Col md={12} className='mb-1'>
<p className='section-tittle'>Produced By</p>
<Col md={12} className="mb-1">
<p className="section-tittle">Produced By</p>
<a
href='https://psfoundation.cash/'
target='_blank'
rel='noopener noreferrer'
href="https://psfoundation.cash/"
target="_blank"
rel="noopener noreferrer"
>
Permissionless Software Foundation
</a>
</Col>
<Col md={12}>
<p className='section-tittle'>Source Code</p>
<FontAwesomeIcon className='' size='lg' icon={faGithub} />
<p className="section-tittle">Source Code</p>
<FontAwesomeIcon className="" size="lg" icon={faGithub} />
<a
href='https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-web-wallet'
target='_blank'
rel='noopener noreferrer'
href="https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-web-wallet"
target="_blank"
rel="noopener noreferrer"
>
Github
</a>
</Col>
</Row>
</Col>
<Col md={7} className='footer-section'>
<div className='pull-right'>
<span className='section-tittle'>
<Col md={7} className="footer-section">
<div className="pull-right">
<span className="section-tittle">
Ways to access this web-app
</span>
<ul>
<li id='web'>
<li id="web">
<span>
<b>Web</b>
</span>
<b>|</b>
<a href='https://wallet.fullstack.cash'>
<a href="https://wallet.fullstack.cash">
wallet.fullstack.cash
</a>
</li>
<li id='tor'>
<li id="tor">
<span>
<b>Tor</b>
</span>
<b>|</b>
<a href='http://puh2fyj2ly5b4p5m.onion/'>
puh2fyj2ly5b4p5m.onion
<a href="http://2egutot63q765ciwsenlcy5zdyxwxt7olzbldr5dx5i3ixsef2nvrzid.onion/">
2egutot63q765ciwsenlcy5zdyxwxt7olzbldr5dx5i3ixsef2nvrzid.onion
</a>
</li>
<li id='ipfs'>
<li id="ipfs">
<span>
<b>IPFS</b>
</span>
@@ -179,32 +122,6 @@ class Footer extends React.Component {
</div>
</Col>
</Row>
{/* <center>
<a href="https://psfoundation.cash/" target="_blank" rel="noreferrer">
Produced by the Permissionless Software Foundation
</a>
<br /><br />
<p>Ways to access this web-app:</p>
<ul>
<li>
Web: <a href="https://wallet.fullstack.cash">wallet.fullstack.cash</a>
</li>
<li>
Tor: <a href="http://puh2fyj2ly5b4p5m.onion/">puh2fyj2ly5b4p5m.onion</a>
</li>
<li>
IPFS: <a href="https://ipfs.io/ipfs/QmTMpYt66SGSjckXTHF6bPip6h1V5fXT23tEUJgy7pyTkf/">QmTMpYt66SGSjckXTHF6bPip6h1V5fXT23tEUJgy7pyTkf</a>
</li>
</ul>
<br />
<a href="https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-web-wallet" target="_blank" rel="noreferrer">
Source Code
</a>
</center> */}
</section>
)
}
+4 -1
View File
@@ -8,7 +8,10 @@ const config = {
titleShort: 'PSF',
balanceText: 'BCH Balance',
balanceIcon: 'fab-bitcoin',
memoAddr: 'bitcoincash:qr7u857krgsvq0dwe8rzlt5rcx35r6hnmu6glavtx0'
// The BCH address used in a memo.cash account. Used for tracking the IPFS
// hash of the mirror of this site.
memoAddr: 'bitcoincash:qqwdv3hkmvd5vk0uhwqrqnef54542e5ctvy3ppt0nq'
}
module.exports = config