From 0073566077b08c349ab90e5088b01982ce73447c Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Thu, 1 Oct 2020 20:16:52 -0400 Subject: [PATCH] feat(demo): Added balance lookup to demo component --- src/demo-component/index.js | 120 +++++++++++++++++- .../components/menu-components.js | 2 +- 2 files changed, 117 insertions(+), 5 deletions(-) diff --git a/src/demo-component/index.js b/src/demo-component/index.js index 0011b52..e47d359 100644 --- a/src/demo-component/index.js +++ b/src/demo-component/index.js @@ -8,9 +8,37 @@ import React from 'react' import { Row, Col, Content, Box, Button } from 'adminlte-2-react' +import { getWalletInfo } from 'gatsby-ipfs-web-wallet/src/components/localWallet' +const BchWallet = + typeof window !== 'undefined' + ? window.SlpWallet + : null + +let _this class DemoComponent extends React.Component { + constructor (props) { + super(props) + _this = this + this.state = { + unconfirmedBalance: 0, + confirmedBalance: 0, + totalBalance: 0, + inFetch: false, + bchWallet: '', + isChecked: '' + + } + } + render () { + const { + unconfirmedBalance, + confirmedBalance, + totalBalance, + inFetch, + isChecked + } = _this.state return ( } + loaded={!inFetch} + footer={ +