{"version":3,"sources":["components/MetamaskConnectButton.js","components/Header.js","config.js","components/EthereumNetworkInfo.js","components/MiningPoolHashRate.js","components/EthereumPriceComponent.js","components/WalletBalance.js","components/MiningDetail.js","App.js","reportWebVitals.js","index.js"],"names":["MetamaskConnectButton","React","useState","buttonText","setButtonText","isDisabled","setDisabled","accounts","setAccounts","onboarding","useRef","useEffect","current","MetaMaskOnboarding","isMetaMaskInstalled","length","stopOnboarding","handleNewAccounts","newAccounts","window","ethereum","request","method","then","on","off","disabled","onClick","startOnboarding","useStyles","makeStyles","theme","root","flexGrow","menuButton","marginRight","spacing","title","Header","classes","className","AppBar","position","Toolbar","IconButton","edge","color","aria-label","Typography","variant","config","url","API_URL","EthInfo","props","state","safeGasPrice","proposeGasPrice","fastGasPrice","fetch","res","text","setState","isLoaded","catch","err","proposedGasPrice","this","getSafeGasPrice","getProposeGasPrice","getFastGasPrice","error","message","Card","componentDidMount","CardContent","gutterBottom","component","Component","MiningPoolHashRate","EthereumPriceComponent","ethCurrentPrice","response","data","getEthCurrentPrice","WalletBalance","getWalletBalance","address","a","undefined","json","isConnected","balance","Math","round","result","walletAddress","MiningDetail","minerId","serverBaseUrl","miner","earnings","currentHashRate","hashrate","hr","callMinerDetail","callEstimateEarnings","earnethhour","estEarningsPerHour","erndollarhour","earnethday","estEarningsPerDay","erndollarday","earnethweek","estEarningsPerWeek","erndollarweek","earnethmonth","estEarningsPerMonth","erndollarmonth","Paper","workersOnline","workersOffline","size","App","connectionCallBack","iConnected","apirul","Grid","EthereumNetworkInfo","process","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"0RAOe,SAASA,IAAyB,IAAD,EACVC,IAAMC,SALvB,mCAI2B,mBACvCC,EADuC,KAC3BC,EAD2B,OAEZH,IAAMC,UAAS,GAFH,mBAEvCG,EAFuC,KAE3BC,EAF2B,OAGdL,IAAMC,SAAS,IAHD,mBAGvCK,EAHuC,KA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EAAapF,SAAUA,KAPnD,EAAKgD,MAAQ,CACTsE,YAAY,EACZtH,SAAU,MAJC,E,qDAcf,IACMuH,EAAS5E,EAAOC,IAAIC,QAE1B,OACI,qBAAKZ,UAAU,OAAf,SACI,sBAAKA,UAAU,WAAf,UACI,cAACF,EAAD,CAAQE,UAAU,WADtB,0BAE4B2B,KAAKZ,MAAMoC,YACnC,qBAAMnD,UAAU,gBAAhB,SACI,sBAAKA,UAAU,cAAf,UACI,sBAAKA,UAAU,gBAAf,UACI,eAACuF,EAAA,EAAD,CAAMvF,UAAU,oBAAhB,UACI,cAAC,EAAD,IACA,cAACwF,EAAD,IACA,cAACjD,EAAD,IACA,cAAC,EAAD,CAAeiB,cAbvB,kDAeI,cAACuB,EAAA,EAAD,CAAO/E,UAAU,qBAAjB,SACI,cAACmC,EAAA,EAAD,UACI,cAAC,EAAD,WAIZ,cAAC4C,EAAA,EAAD,CAAO/E,UAAU,kBAAjB,qCAKR,sBAAKA,UAAU,SAAf,UA5BAyF,aA4BA,eACsBH,c,GA5CxBhD,aCFHoD,EAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,6BAAqB7G,MAAK,YAAkD,IAA/C8G,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCDdO,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,EAAD,MAEFC,SAASC,eAAe,SAM1BZ,M","file":"static/js/main.b4282892.chunk.js","sourcesContent":["import MetaMaskOnboarding from '@metamask/onboarding';\nimport React from 'react';\n\nconst ONBOARD_TEXT = 'Click here to install MetaMask!';\nconst CONNECT_TEXT = 'Connect';\nconst CONNECTED_TEXT = 'Connected';\n\nexport default function MetamaskConnectButton() {\n const [buttonText, setButtonText] = React.useState(ONBOARD_TEXT);\n const [isDisabled, setDisabled] = React.useState(false);\n const [accounts, setAccounts] = React.useState([]);\n const onboarding = React.useRef();\n\n React.useEffect(() => {\n if (!onboarding.current) {\n onboarding.current = new MetaMaskOnboarding();\n }\n }, []);\n\n React.useEffect(() => {\n if (MetaMaskOnboarding.isMetaMaskInstalled()) {\n if (accounts.length > 0) {\n setButtonText(CONNECTED_TEXT);\n setDisabled(true);\n onboarding.current.stopOnboarding();\n } else {\n setButtonText(CONNECT_TEXT);\n setDisabled(false);\n }\n }\n }, [accounts]);\n\n React.useEffect(() => {\n function handleNewAccounts(newAccounts) {\n setAccounts(newAccounts);\n }\n if (MetaMaskOnboarding.isMetaMaskInstalled()) {\n window.ethereum\n .request({ method: 'eth_requestAccounts' })\n .then(handleNewAccounts);\n window.ethereum.on('accountsChanged', handleNewAccounts);\n return () => {\n window.ethereum.off('accountsChanged', handleNewAccounts);\n };\n }\n }, []);\n\n const onClick = () => {\n if (MetaMaskOnboarding.isMetaMaskInstalled()) {\n window.ethereum\n .request({ method: 'eth_requestAccounts' })\n .then((newAccounts) => setAccounts(newAccounts));\n } else {\n onboarding.current.startOnboarding();\n }\n };\n return (\n
\n \n {accounts}\n
\n );\n}\n","import React from 'react';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport {makeStyles } from '@material-ui/core/styles';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport MetamaskConnectButton from './MetamaskConnectButton'\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n },\n menuButton: {\n marginRight: theme.spacing(2),\n },\n title: {\n flexGrow: 1,\n },\n}));\n\nexport default function Header() {\n const classes = useStyles();\n\n return (\n
\n \n \n \n \n \n \n BubbleX\n \n \n \n \n
\n )\n ;\n}\n","const prod = {\n url : {\n API_URL: 'https://young-reef-37886.herokuapp.com'\n }\n};\nconst dev = {\n url : {\n API_URL: 'http://localhost:5000' \n }\n};\n\nconst config = process.env.NODE_ENV === 'development' ? dev : prod;\n// const config = process.env.REACT_APP_STAGE === 'developpment' ? dev : prod;\n\nexport default config ;\n\n\n// export default {\n// DEFAULT_PROP : 'baballba'\n// config;\n// }","import React, {Component} from \"react\";\nimport Card from '@material-ui/core/Card';\nimport \"../style.css\";\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\nimport config from '../config'\n\n\nclass EthInfo extends Component {\n constructor(props) {\n super(props);\n this.state = {\n title: \"Ethereum Network Gas Price (in Gwei)\",\n safeGasPrice: \"N/A\",\n proposeGasPrice: \"N/A\",\n fastGasPrice: \"N/A\"\n };\n }\n\n async getSafeGasPrice() {\n var url = `${config.url.API_URL}/eth/safegasprice` ;\n await fetch(url)\n .then(res => res.text())\n .then(res => this.setState({\n isLoaded: true,\n safeGasPrice: res\n }))\n .catch(err => err);\n }\n\n async getProposeGasPrice() {\n var url = `${config.url.API_URL}/eth/proposegasprice` ;\n await fetch(url)\n .then(res => res.text())\n .then(res => this.setState({\n isLoaded: true,\n proposedGasPrice: res\n }))\n .catch(err => err);\n }\n\n async getFastGasPrice() {\n var url = `${config.url.API_URL}/eth/fastgasprice` ;\n await fetch(url)\n .then(res => res.text())\n .then(res => this.setState({\n isLoaded: true,\n fastGasPrice: res\n }))\n .catch(err => err);\n }\n\n componentDidMount() {\n this.getSafeGasPrice();\n this.getProposeGasPrice();\n this.getFastGasPrice();\n }\n\n render() {\n const { error, isLoaded, safeGasPrice, proposedGasPrice, fastGasPrice} = this.state;\n if (error) {\n return
Component Error : {error.message}
;\n } else if (!isLoaded) {\n return
Chargement…
;\n } else \n { \n return ( \n \n this.componentDidMount()}>\n \n {this.state.title}\n Gwei : safe\n {safeGasPrice} prop\n {proposedGasPrice} fast\n {fastGasPrice} \n \n \n );\n }\n }\n}\n\nexport default EthInfo;","import React from 'react';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\n\nexport default function MiningPoolHashRate() {\n return (\n \n \n \n Etash Mining HashRate\n \n 230 MH/S\n \n \n\n );\n}","import React, {Component} from \"react\";\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\nimport \"../style.css\";\nimport config from '../config'\n\nclass EthereumPriceComponent extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ethCurrentPrice: null,\n title: \"Ethereum Price\"\n };\n }\n\n async getEthCurrentPrice() {\n var url = `${config.url.API_URL}/eth/ethcurrentprice` ;\n await fetch(url)\n .then((response) => response.text())\n .then((data) => {\n this.setState({\n isLoaded: true,\n ethCurrentPrice: data\n });\n },\n (error) => {\n this.setState({\n isLoaded: true,\n error\n });\n }\n )\n }\n\n componentDidMount() {\n this.getEthCurrentPrice();\n }\n\n render() {\n const { error, isLoaded, ethCurrentPrice} = this.state;\n if (error) {\n return ( \n \n \n \n Component Error\n \n {error.message}\n \n \n \n );\n } else if (!isLoaded) {\n return
Chargement…
;\n } else \n { \n return ( \n \n \n \n Ethereum Price\n \n ${ethCurrentPrice}\n \n \n \n );\n }\n }\n}\n \nexport default EthereumPriceComponent;","import React, {Component} from 'react';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\nimport config from '../config'\n\nclass WalletBalance extends Component {\n constructor(props) {\n super(props);\n this.state = {\n walletAddress: null,\n isConnected : false,\n balance: null,\n title: \"Wallet balance\"\n };\n }\n\n getWalletBalance = async(address) => {\n var url = `${config.url.API_URL}/wallet/${address}/balance` ;\n if (address !== undefined ) {\n await fetch(url)\n .then((response) => response.json())\n .catch(err => {throw err})\n .then(response => this.setState({\n isLoaded: true,\n isConnected : true,\n balance: Math.round(response.result/10000000000000)/100000\n }))\n .catch(err => {throw err})\n } else {\n this.setState({\n isLoaded: true,\n isConnected : false\n })\n }\n}\n\n componentDidMount() {\n this.getWalletBalance(this.props.walletAddress);\n }\n\n render() {\n const { error, isLoaded, balance} = this.state;\n if (error) {\n return ( \n \n \n \n Component Error\n \n {error.message}\n \n \n \n );\n } else if (!isLoaded) {\n return
Chargement…
;\n } else \n { \n return ( \n \n \n \n Wallet Balance \n \n Eth {balance}\n \n \n \n );\n }\n }\n}\n\nexport default WalletBalance;\n\n","import React, {Component} from \"react\";\nimport Paper from '@material-ui/core/Paper';\nimport RefreshIcon from '@material-ui/icons/Refresh';\nimport {IconButton} from '@material-ui/core';\nimport \"../style.css\"; \nimport config from '../config'\n\nclass MiningDetail extends Component {\n constructor(props) {\n super(props);\n this.state = {\n minerId : \"0x9e04689ec4F4B6A8BdEe305Bcd0A93F8B908eA0d\",\n error: null,\n isLoaded: false,\n ethCurrentPrice: null,\n serverBaseUrl: 'http://localhost:3000',\n miner: {},\n earnings: {},\n currentHashRate: null\n };\n }\n\n async callMinerDetail() {\n fetch(\"https://www.cruxpool.com/api/eth/miner/0x9e04689ec4F4B6A8BdEe305Bcd0A93F8B908eA0d\")\n .then((response) => response.json())\n .then((json) => {\n this.setState({\n isLoaded: true,\n miner: json.data,\n currentHashRate : Math.round(json.data.hashrate/10000)/100\n });\n },\n (error) => {\n this.setState({\n isLoaded: true,\n error\n });\n }\n )\n }\n async callEstimateEarnings(hr) {\n fetch(\"https://www.cruxpool.com/api/eth/estimatedEarnings/\"+hr)\n .then((response) => response.json())\n .then((json) => {\n this.setState({\n isLoaded: true,\n earnings: json.data\n });\n },\n (error) => {\n this.setState({\n isLoaded: true,\n error\n });\n }\n )\n }\n\n async getEthCurrentPrice() {\n var url = `${config.url.API_URL}/eth/ethcurrentprice` ;\n await fetch(url)\n .then((response) => response.text())\n .then((data) => {\n this.setState({\n isLoaded: true,\n ethCurrentPrice: data\n });\n },\n (error) => {\n this.setState({\n isLoaded: true,\n error\n });\n }\n )\n }\n componentDidMount() {\n this.getEthCurrentPrice(); \n this.callMinerDetail(); \n this.callEstimateEarnings(this.state.currentHashRate); \n }\n\n render() {\n const { error, isLoaded, miner, minerId, earnings, ethCurrentPrice, currentHashRate} = this.state;\n if (error) {\n return
Component Error : {error.message}
;\n } else if (!isLoaded) {\n return
Chargement…
;\n } else \n { \n const earnethhour = Math.round(earnings.estEarningsPerHour*100000)/100000 ;\n const erndollarhour = Math.round(earnethhour * ethCurrentPrice*100)/100;\n const earnethday = Math.round(earnings.estEarningsPerDay*100000)/100000;\n const erndollarday = Math.round(earnethday * ethCurrentPrice*100)/100;\n const earnethweek = Math.round(earnings.estEarningsPerWeek*10000)/10000;\n const erndollarweek = Math.round(earnethweek * ethCurrentPrice*100)/100;\n const earnethmonth = Math.round(earnings.estEarningsPerMonth*10000)/10000 ;\n const erndollarmonth = Math.round(earnethmonth * ethCurrentPrice*100)/100;\n \n return ( \n \n this.componentDidMount()}>\n\t\t\t\t
Miner {minerId}
\n
Real-Time HashRate : {currentHashRate} MH/S
\n
Active Workers : {miner.workersOnline}
\n
Inactive Workers : {miner.workersOffline}
\n
Earning Per Hour : {earnethhour} Eth / {erndollarhour} $
\n\t\t\t\t
Earning Per Day : {earnethday} Eth / {erndollarday} $
\n
Earning Per Week : {earnethweek} Eth / {erndollarweek} $
\n
Earning Per Month : {earnethmonth} Eth / {erndollarmonth} $
\n this.componentDidMount()}>\n\t\t\t
\n );\n }\n}\n}\nexport default MiningDetail;","import React, {Component} from \"react\";\nimport Header from './components/Header.js';\nimport EthereumNetworkInfo from './components/EthereumNetworkInfo.js';\nimport MiningPoolHashRate from './components/MiningPoolHashRate'\nimport EthereumPriceComponent from './components/EthereumPriceComponent'\nimport WalletBalance from './components/WalletBalance'\nimport CardContent from '@material-ui/core/CardContent';\nimport Paper from '@material-ui/core/Paper';\nimport { Grid } from \"@material-ui/core\";\nimport MiningDetail from './components/MiningDetail'\nimport config from './config'\n\nimport \"./style.css\";\n\nclass App extends Component {\n constructor(props) {\n super(props);\n this.state = {\n iConnected: false,\n accounts: null\n };\n }\n\n connectionCallBack = (isConnected, accounts) => {\n this.setState({isConnected: isConnected, accounts: accounts})\n }\n\n render() {\n\n const env = process.env.NODE_ENV;\n const apirul = config.url.API_URL;\n const tempaddress = \"0x9e04689ec4F4B6A8BdEe305Bcd0A93F8B908eA0d\";\n return (\n
\n
\n
\n iConnectedfromheader = {this.state.isConnected}\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n \n tab with detail tx\n \n
\n
\n
\n {env} server url {apirul}\n
\n
\n
\n );\n }\n}\n\nexport default App;","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './style.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}