mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
fix(bch-message-lib): Removed dependence on this library
This commit is contained in:
@@ -6,7 +6,7 @@ import { faGithub } from '@fortawesome/free-brands-svg-icons'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
// Get the IPFS hash from the BCH Blockchain.
|
||||
import Memo from '../../services/memo-hash'
|
||||
// import Memo from '../../services/memo-hash'
|
||||
const siteConfig = require('../site-config')
|
||||
|
||||
let _this
|
||||
@@ -21,10 +21,10 @@ class Footer extends React.Component {
|
||||
ipfsHashLink: ''
|
||||
}
|
||||
|
||||
this.memo = new Memo({
|
||||
bchWallet: props.bchWallet,
|
||||
bchAddr: siteConfig.memoAddr
|
||||
})
|
||||
// this.memo = new Memo({
|
||||
// bchWallet: props.bchWallet,
|
||||
// bchAddr: siteConfig.memoAddr
|
||||
// })
|
||||
}
|
||||
|
||||
async componentDidMount () {
|
||||
@@ -34,53 +34,53 @@ class Footer extends React.Component {
|
||||
|
||||
// This function retrieves the IPFS CID for the latest copy of this app. That
|
||||
// CID is written to the BCH blockchain.
|
||||
async handleMemoService () {
|
||||
// This is a hard-coded hash or 'checkpoint' to use in times when the
|
||||
// connection fails.
|
||||
let hash = 'QmXT85Xoi7xMRD9m7Ta4Cx8Yrsd2WSzLrq2VRo26KW4xLu'
|
||||
|
||||
// Try to retrieve the hash from the BCH blockchain.
|
||||
try {
|
||||
hash = await this.memo.findHash()
|
||||
console.log(`IPFS hash found: ${hash}`)
|
||||
|
||||
if (!hash) {
|
||||
throw new Error('Hash not found! Falling back to hard coded IPFS hash.')
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Error trying to retrieve IPFS hash for the site: ', err)
|
||||
}
|
||||
|
||||
this.setState({
|
||||
ipfsHash: hash,
|
||||
ipfsHashLink: `https://ipfs.io/ipfs/${hash}`
|
||||
})
|
||||
}
|
||||
// async handleMemoService () {
|
||||
// // This is a hard-coded hash or 'checkpoint' to use in times when the
|
||||
// // connection fails.
|
||||
// let hash = 'QmXT85Xoi7xMRD9m7Ta4Cx8Yrsd2WSzLrq2VRo26KW4xLu'
|
||||
//
|
||||
// // Try to retrieve the hash from the BCH blockchain.
|
||||
// try {
|
||||
// hash = await this.memo.findHash()
|
||||
// console.log(`IPFS hash found: ${hash}`)
|
||||
//
|
||||
// if (!hash) {
|
||||
// throw new Error('Hash not found! Falling back to hard coded IPFS hash.')
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.error('Error trying to retrieve IPFS hash for the site: ', err)
|
||||
// }
|
||||
//
|
||||
// this.setState({
|
||||
// ipfsHash: hash,
|
||||
// ipfsHashLink: `https://ipfs.io/ipfs/${hash}`
|
||||
// })
|
||||
// }
|
||||
|
||||
render () {
|
||||
return (
|
||||
<section id='footer'>
|
||||
<Row className='footer-container'>
|
||||
<Col md={12} className='footer-section'>
|
||||
<section id="footer">
|
||||
<Row className="footer-container">
|
||||
<Col md={12} 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={siteConfig.hostUrl}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{siteConfig.hostText}
|
||||
</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={siteConfig.sourceCode}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Github
|
||||
</a>
|
||||
|
||||
+13
-12
@@ -9,18 +9,18 @@ export default function HTML (props) {
|
||||
return (
|
||||
<html {...props.htmlAttributes}>
|
||||
<head>
|
||||
<meta charSet='utf-8' />
|
||||
<meta httpEquiv='x-ua-compatible' content='ie=edge' />
|
||||
<meta charSet="utf-8" />
|
||||
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
|
||||
<meta
|
||||
name='viewport'
|
||||
content='width=device-width, initial-scale=1, shrink-to-fit=no'
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
|
||||
{/* Loading animation should be loaded very first thing. */}
|
||||
<div
|
||||
className='test'
|
||||
key='loader'
|
||||
id='___loader'
|
||||
className="test"
|
||||
key="loader"
|
||||
id="___loader"
|
||||
style={{
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#F2F2F2',
|
||||
@@ -34,15 +34,16 @@ export default function HTML (props) {
|
||||
zIndex: 9000,
|
||||
flexDirection: 'column'
|
||||
}}
|
||||
><img src='https://i.imgur.com/8n8PYAi.gif' alt='' width='250' />
|
||||
>
|
||||
<img src="https://i.imgur.com/8n8PYAi.gif" alt="" width="250" />
|
||||
Loading...
|
||||
</div>
|
||||
|
||||
{/* minimal-slp-wallet */}
|
||||
<script src='https://unpkg.com/minimal-slp-wallet' />
|
||||
<script src="https://unpkg.com/minimal-slp-wallet" />
|
||||
|
||||
{/* bch-message-lib */}
|
||||
<script src='https://unpkg.com/bch-message-lib' />
|
||||
{/* <script src='https://unpkg.com/bch-message-lib' /> */}
|
||||
|
||||
{props.headComponents}
|
||||
</head>
|
||||
@@ -50,8 +51,8 @@ export default function HTML (props) {
|
||||
{props.preBodyComponents}
|
||||
<div>
|
||||
<div
|
||||
key='body'
|
||||
id='___gatsby'
|
||||
key="body"
|
||||
id="___gatsby"
|
||||
dangerouslySetInnerHTML={{ __html: props.body }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user