mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
Switched from free-bch to bchn.fullstack.cash
This commit is contained in:
@@ -4,10 +4,7 @@ import { Row, Col, Box, Button } from 'adminlte-2-react'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
// import BchWallet from 'minimal-slp-wallet'
|
||||
|
||||
const BchWallet =
|
||||
typeof window !== 'undefined'
|
||||
? window.SlpWallet
|
||||
: null
|
||||
const BchWallet = typeof window !== 'undefined' ? window.SlpWallet : null
|
||||
|
||||
let _this
|
||||
class NewWallet extends React.Component {
|
||||
@@ -29,31 +26,31 @@ class NewWallet extends React.Component {
|
||||
<Col sm={2} />
|
||||
<Col sm={8}>
|
||||
<Box
|
||||
className='hover-shadow border-none mt-2'
|
||||
className="hover-shadow border-none mt-2"
|
||||
loaded={!_this.state.inFetch}
|
||||
>
|
||||
<Row>
|
||||
<Col sm={12} className='text-center'>
|
||||
<Col sm={12} className="text-center">
|
||||
<h1>
|
||||
<FontAwesomeIcon
|
||||
className='title-icon'
|
||||
size='xs'
|
||||
icon='plus'
|
||||
className="title-icon"
|
||||
size="xs"
|
||||
icon="plus"
|
||||
/>
|
||||
<span>New Wallet</span>
|
||||
</h1>
|
||||
</Col>
|
||||
<Col sm={12} className='text-center mt-2 mb-2'>
|
||||
<Col sm={12} className="text-center mt-2 mb-2">
|
||||
<Button
|
||||
text='Create Wallet'
|
||||
type='primary'
|
||||
className='btn-lg'
|
||||
text="Create Wallet"
|
||||
type="primary"
|
||||
className="btn-lg"
|
||||
onClick={_this.handleCreateWallet}
|
||||
/>
|
||||
</Col>
|
||||
<Col sm={12} className='text-center '>
|
||||
<Col sm={12} className="text-center ">
|
||||
{_this.state.errMsg && (
|
||||
<p className='error-color mt-2'>{_this.state.errMsg}</p>
|
||||
<p className="error-color mt-2">{_this.state.errMsg}</p>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -103,7 +100,7 @@ class NewWallet extends React.Component {
|
||||
let currentRate
|
||||
|
||||
if (bchjs.restURL.includes('abc.fullstack')) {
|
||||
currentRate = await bchjs.Price.getBchaUsd() * 100
|
||||
currentRate = (await bchjs.Price.getBchaUsd()) * 100
|
||||
} else {
|
||||
// BCHN price.
|
||||
currentRate = (await bchjs.Price.getUsd()) * 100
|
||||
@@ -132,7 +129,7 @@ class NewWallet extends React.Component {
|
||||
currentWallet.interface = _this.props.interface
|
||||
}
|
||||
|
||||
const _interface = currentWallet.interface || 'consumer-api'
|
||||
const _interface = currentWallet.interface || 'rest-api'
|
||||
|
||||
const jwtToken = currentWallet.JWT
|
||||
const restURL = currentWallet.selectedServer
|
||||
@@ -174,9 +171,9 @@ class NewWallet extends React.Component {
|
||||
Rate limits exceeded, increase rate limits with a JWT token from
|
||||
<a
|
||||
style={{ marginLeft: '5px' }}
|
||||
target='_blank'
|
||||
href='https://fullstack.cash'
|
||||
rel='noopener noreferrer'
|
||||
target="_blank"
|
||||
href="https://fullstack.cash"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
FullStack.cash
|
||||
</a>
|
||||
|
||||
@@ -26,51 +26,51 @@ class ImportWallet extends React.Component {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<Row className=''>
|
||||
<Row className="">
|
||||
<Col sm={2} />
|
||||
<Col sm={8}>
|
||||
<Box
|
||||
className='hover-shadow border-none mt-2'
|
||||
className="hover-shadow border-none mt-2"
|
||||
loaded={!_this.state.inFetch}
|
||||
>
|
||||
<Row>
|
||||
<Col sm={12} className='text-center'>
|
||||
<Col sm={12} className="text-center">
|
||||
<h1>
|
||||
<FontAwesomeIcon
|
||||
className='title-icon'
|
||||
size='xs'
|
||||
icon='file-import'
|
||||
className="title-icon"
|
||||
size="xs"
|
||||
icon="file-import"
|
||||
/>
|
||||
<span>Import Wallet</span>
|
||||
</h1>
|
||||
</Col>
|
||||
<Col sm={12} className='text-center mt-2 mb-2'>
|
||||
<Row className='flex justify-content-center'>
|
||||
<Col sm={12} className="text-center mt-2 mb-2">
|
||||
<Row className="flex justify-content-center">
|
||||
<Col sm={8}>
|
||||
<form autoComplete='off'>
|
||||
<form autoComplete="off">
|
||||
<Text
|
||||
id='import-mnemonic'
|
||||
name='mnemonic'
|
||||
placeholder='12 word mnemonic'
|
||||
label='12 word mnemonic'
|
||||
labelPosition='above'
|
||||
id="import-mnemonic"
|
||||
name="mnemonic"
|
||||
placeholder="12 word mnemonic"
|
||||
label="12 word mnemonic"
|
||||
labelPosition="above"
|
||||
onChange={_this.handleUpdate}
|
||||
/>
|
||||
</form>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col sm={12} className='text-center mb-2'>
|
||||
<Col sm={12} className="text-center mb-2">
|
||||
<Button
|
||||
text='Import'
|
||||
type='primary'
|
||||
className='btn-lg'
|
||||
text="Import"
|
||||
type="primary"
|
||||
className="btn-lg"
|
||||
onClick={_this.handleImportWallet}
|
||||
/>
|
||||
</Col>
|
||||
<Col sm={12} className='text-center'>
|
||||
<Col sm={12} className="text-center">
|
||||
{_this.state.errMsg && (
|
||||
<p className='error-color'>{_this.state.errMsg}</p>
|
||||
<p className="error-color">{_this.state.errMsg}</p>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -170,7 +170,7 @@ class ImportWallet extends React.Component {
|
||||
currentWallet.interface = _this.props.interface
|
||||
}
|
||||
|
||||
const _interface = currentWallet.interface || 'consumer-api'
|
||||
const _interface = currentWallet.interface || 'rest-api'
|
||||
|
||||
const jwtToken = currentWallet.JWT
|
||||
const restURL = currentWallet.selectedServer
|
||||
@@ -237,9 +237,9 @@ class ImportWallet extends React.Component {
|
||||
Rate limits exceeded, increase rate limits with a JWT token from
|
||||
<a
|
||||
style={{ marginLeft: '5px' }}
|
||||
target='_blank'
|
||||
href='https://fullstack.cash'
|
||||
rel='noopener noreferrer'
|
||||
target="_blank"
|
||||
href="https://fullstack.cash"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
FullStack.cash
|
||||
</a>
|
||||
|
||||
@@ -92,7 +92,7 @@ const instanceWallet = () => {
|
||||
|
||||
const getBchjsOptions = () => {
|
||||
try {
|
||||
const _interface = localStorageInfo.interface || 'consumer-api'
|
||||
const _interface = localStorageInfo.interface || 'rest-api'
|
||||
|
||||
const jwtToken = localStorageInfo.JWT
|
||||
const restURL = localStorageInfo.selectedServer
|
||||
|
||||
Reference in New Issue
Block a user