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',
condition: chequebook.isOk,
isLoading: chequebook.isLoading,
component: <ChequebookDeployFund {...chequebook} />,
component: <ChequebookDeployFund ethereumAddress={ethereumConnection.nodeAddresses?.ethereum} {...chequebook} />,
},
{
label: 'Connected to Node API',
@@ -1,12 +1,18 @@
import { Typography } from '@material-ui/core/'
import EthereumAddress from '../../../components/EthereumAddress'
import DepositModal from '../../../containers/DepositModal'
import CodeBlockTabs from '../../../components/CodeBlockTabs'
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
return (
@@ -15,17 +21,14 @@ const ChequebookDeployFund = ({ isLoading, chequebookAddress, chequebookBalance
{chequebookAddress?.chequebookaddress && <DepositModal />}
</p>
<div style={{ marginBottom: '10px' }}>
{!(chequebookAddress?.chequebookaddress && chequebookBalance && chequebookBalance?.totalBalance > 0) && (
{!(chequebookAddress?.chequebookaddress && chequebookBalance?.totalBalance > 0) && (
<div>
<span>
Your chequebook is either not deployed or funded. Run the below commands to get your address and deposit
ETH. Then visit the BZZaar here{' '}
<Typography variant="button">
https://bzz.ethswarm.org/?transaction=buy&amount=10&slippage=30&receiver=[ENTER_ADDRESS_HERE]
</Typography>{' '}
to get BZZ
Your chequebook is either not deployed or funded. Join{' '}
<a href="https://discord.gg/ykCupZMuww">our discord channel</a>, get verified and send a message{' '}
<pre>sprinkle {ethereumAddress || '<YOUR BEE NODE ETH ADDRESS>'}</pre> in the <pre>#faucet-request</pre>{' '}
channel to get Goerli ETH and Goerli BZZ token.
</span>
<CodeBlockTabs showLineNumbers linux={`bee-get-addr`} mac={`bee-get-addr`} />
</div>
)}
</div>