fix: changed chequebook troubleshooting to be more in line with recommended path (#77)

* fix: changed chequebook troubleshooting to be more in line with recommended path

* chore: addressed PR reviews
This commit is contained in:
Vojtech Simetka
2021-04-23 11:35:01 +02:00
committed by GitHub
parent 54b8e3cb73
commit d77e184d6a
2 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ export default function NodeSetupWorkflow({
label: 'Deployed and Funded Chequebook', label: 'Deployed and Funded Chequebook',
condition: chequebook.isOk, condition: chequebook.isOk,
isLoading: chequebook.isLoading, isLoading: chequebook.isLoading,
component: <ChequebookDeployFund {...chequebook} />, component: <ChequebookDeployFund ethereumAddress={ethereumConnection.nodeAddresses?.ethereum} {...chequebook} />,
}, },
{ {
label: 'Connected to Node API', label: 'Connected to Node API',
@@ -1,12 +1,18 @@
import { Typography } from '@material-ui/core/' import { Typography } from '@material-ui/core/'
import EthereumAddress from '../../../components/EthereumAddress' import EthereumAddress from '../../../components/EthereumAddress'
import DepositModal from '../../../containers/DepositModal' import DepositModal from '../../../containers/DepositModal'
import CodeBlockTabs from '../../../components/CodeBlockTabs'
import type { ReactElement } from 'react' import type { ReactElement } from 'react'
type Props = StatusChequebookHook interface Props extends StatusChequebookHook {
ethereumAddress?: string
}
const ChequebookDeployFund = ({ isLoading, chequebookAddress, chequebookBalance }: Props): ReactElement | null => { const ChequebookDeployFund = ({
isLoading,
chequebookAddress,
chequebookBalance,
ethereumAddress,
}: Props): ReactElement | null => {
if (isLoading) return null if (isLoading) return null
return ( return (
@@ -15,17 +21,14 @@ const ChequebookDeployFund = ({ isLoading, chequebookAddress, chequebookBalance
{chequebookAddress?.chequebookaddress && <DepositModal />} {chequebookAddress?.chequebookaddress && <DepositModal />}
</p> </p>
<div style={{ marginBottom: '10px' }}> <div style={{ marginBottom: '10px' }}>
{!(chequebookAddress?.chequebookaddress && chequebookBalance && chequebookBalance?.totalBalance > 0) && ( {!(chequebookAddress?.chequebookaddress && chequebookBalance?.totalBalance > 0) && (
<div> <div>
<span> <span>
Your chequebook is either not deployed or funded. Run the below commands to get your address and deposit Your chequebook is either not deployed or funded. Join{' '}
ETH. Then visit the BZZaar here{' '} <a href="https://discord.gg/ykCupZMuww">our discord channel</a>, get verified and send a message{' '}
<Typography variant="button"> <pre>sprinkle {ethereumAddress || '<YOUR BEE NODE ETH ADDRESS>'}</pre> in the <pre>#faucet-request</pre>{' '}
https://bzz.ethswarm.org/?transaction=buy&amount=10&slippage=30&receiver=[ENTER_ADDRESS_HERE] channel to get Goerli ETH and Goerli BZZ token.
</Typography>{' '}
to get BZZ
</span> </span>
<CodeBlockTabs showLineNumbers linux={`bee-get-addr`} mac={`bee-get-addr`} />
</div> </div>
)} )}
</div> </div>