mirror of
https://github.com/fullstack-cash/explorer.fullstack.cash.git
synced 2026-09-21 16:52:05 -07:00
Fixing merge conflicts
This commit is contained in:
Generated
+33735
-9491
File diff suppressed because it is too large
Load Diff
+35
-35
@@ -1,51 +1,51 @@
|
|||||||
import React from 'react'
|
import React from "react"
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from "prop-types"
|
||||||
import { Row, Col, Box, Button } from 'adminlte-2-react'
|
import { Row, Col, Box, Button } from "adminlte-2-react"
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||||
import JSONPretty from 'react-json-pretty'
|
import JSONPretty from "react-json-pretty"
|
||||||
|
|
||||||
const HASH_EXPLORER = 'https://p2wdb.fullstack.cash/entry/hash/' // PSF p2wdb hash explorer
|
const HASH_EXPLORER = "https://p2wdb.fullstack.cash/entry/hash/" // PSF p2wdb hash explorer
|
||||||
const TX_EXPLORER = 'https://simpleledger.info/tx/' // BCH Transaction Explorer
|
const TX_EXPLORER = "https://simpleledger.info/tx/" // BCH Transaction Explorer
|
||||||
|
|
||||||
let _this
|
let _this
|
||||||
class Details extends React.Component {
|
class Details extends React.Component {
|
||||||
constructor (props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
entry: {},
|
entry: {},
|
||||||
entryData: {}
|
entryData: {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render() {
|
||||||
const { entry, entryData } = _this.state
|
const { entry, entryData } = _this.state
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Row>
|
<Row>
|
||||||
<Col sm={12}>
|
<Col sm={12}>
|
||||||
<Box className=' border-none mt-2' loaded={!this.state.inFetch}>
|
<Box className=" border-none mt-2" loaded={!this.state.inFetch}>
|
||||||
<Row className='text-center'>
|
<Row className="text-center">
|
||||||
<Col sm={12}>
|
<Col sm={12}>
|
||||||
<h1 id='SendTokens'>
|
<h1 id="SendTokens">
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
className='title-icon'
|
className="title-icon"
|
||||||
size='xs'
|
size="xs"
|
||||||
icon='info-circle'
|
icon="info-circle"
|
||||||
/>
|
/>
|
||||||
<span>Details</span>
|
<span>Details</span>
|
||||||
</h1>
|
</h1>
|
||||||
{entry._id && (
|
{entry._id && (
|
||||||
<Box className='border-none details-data-content'>
|
<Box className="border-none details-data-content">
|
||||||
<p>
|
<p>
|
||||||
<b>IS VALID: </b>
|
<b>IS VALID: </b>
|
||||||
{entry.isValid}
|
{entry.isValid}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>APP ID: </b>
|
<b>APP ID: </b>
|
||||||
{entry.appId || 'none'}
|
{entry.appId || "none"}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>CREATE AT: </b>
|
<b>CREATE AT: </b>
|
||||||
@@ -59,8 +59,8 @@ class Details extends React.Component {
|
|||||||
<b>HASH: </b>
|
<b>HASH: </b>
|
||||||
<a
|
<a
|
||||||
href={`${HASH_EXPLORER}${entry.hash}`}
|
href={`${HASH_EXPLORER}${entry.hash}`}
|
||||||
target='_blank'
|
target="_blank"
|
||||||
rel='noreferrer'
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
{entry.hash}
|
{entry.hash}
|
||||||
</a>
|
</a>
|
||||||
@@ -69,8 +69,8 @@ class Details extends React.Component {
|
|||||||
<b>TRANSACTION ID : </b>
|
<b>TRANSACTION ID : </b>
|
||||||
<a
|
<a
|
||||||
href={`${TX_EXPLORER}${entry.key}`}
|
href={`${TX_EXPLORER}${entry.key}`}
|
||||||
target='_blank'
|
target="_blank"
|
||||||
rel='noreferrer'
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
{entry.key}
|
{entry.key}
|
||||||
</a>
|
</a>
|
||||||
@@ -95,7 +95,7 @@ class Details extends React.Component {
|
|||||||
<>
|
<>
|
||||||
- <b>Data :</b>
|
- <b>Data :</b>
|
||||||
<JSONPretty
|
<JSONPretty
|
||||||
id='json-pretty'
|
id="json-pretty"
|
||||||
data={entryData.data}
|
data={entryData.data}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -107,11 +107,11 @@ class Details extends React.Component {
|
|||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col sm={12}>
|
<Col sm={12}>
|
||||||
<div className='btn-wrapper'>
|
<div className="btn-wrapper">
|
||||||
<Button
|
<Button
|
||||||
text='Close'
|
text="Close"
|
||||||
type='primary'
|
type="primary"
|
||||||
className='btn-lg btn-close-entry mr-1 ml-1 mt-1'
|
className="btn-lg btn-close-entry mr-1 ml-1 mt-1"
|
||||||
onClick={_this.handleClose}
|
onClick={_this.handleClose}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,34 +124,34 @@ class Details extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount() {
|
||||||
_this.handleData()
|
_this.handleData()
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate () {
|
componentDidUpdate() {
|
||||||
if (_this.props.entry._id !== _this.state.entry._id) {
|
if (_this.props.entry._id !== _this.state.entry._id) {
|
||||||
_this.handleData()
|
_this.handleData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleData () {
|
handleData() {
|
||||||
try {
|
try {
|
||||||
const { entry } = _this.props
|
const { entry } = _this.props
|
||||||
_this.setState({
|
_this.setState({
|
||||||
entry,
|
entry,
|
||||||
entryData: entry.value
|
entryData: entry.value,
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn('Error in handleData()', err)
|
console.warn("Error in handleData()", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClose () {
|
handleClose() {
|
||||||
_this.props.onClose()
|
_this.props.onClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detects if the input is a string and converts to json object
|
// Detects if the input is a string and converts to json object
|
||||||
isJson (data) {
|
isJson(data) {
|
||||||
try {
|
try {
|
||||||
JSON.parse(data)
|
JSON.parse(data)
|
||||||
return true
|
return true
|
||||||
@@ -162,6 +162,6 @@ class Details extends React.Component {
|
|||||||
}
|
}
|
||||||
Details.propTypes = {
|
Details.propTypes = {
|
||||||
entry: PropTypes.object,
|
entry: PropTypes.object,
|
||||||
onClose: PropTypes.func
|
onClose: PropTypes.func,
|
||||||
}
|
}
|
||||||
export default Details
|
export default Details
|
||||||
|
|||||||
Reference in New Issue
Block a user