From 42b7f080b00a94f068d2fad4779d02ddcf58e27d Mon Sep 17 00:00:00 2001
From: Cafe137 <77121044+Cafe137@users.noreply.github.com>
Date: Wed, 21 Dec 2022 14:36:24 +0100
Subject: [PATCH] fix: do not require chequebook funding (#599)
* fix: do not require chequebook funding
* chore: revert import sorting
---
.../status/SetupSteps/ChequebookDeployFund.tsx | 13 +++++--------
src/providers/Bee.tsx | 9 ++-------
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/pages/status/SetupSteps/ChequebookDeployFund.tsx b/src/pages/status/SetupSteps/ChequebookDeployFund.tsx
index 012f3a9..cc3ff1c 100644
--- a/src/pages/status/SetupSteps/ChequebookDeployFund.tsx
+++ b/src/pages/status/SetupSteps/ChequebookDeployFund.tsx
@@ -19,16 +19,13 @@ const ChequebookDeployFund = (): ReactElement | null => {
switch (checkState) {
case CheckState.OK:
- text = 'Your chequebook is deployed and funded'
- break
- case CheckState.WARNING:
text = (
<>
- Your chequebook is not funded. Please deposit some xBZZ to your chequebook address. You may need to aquire BZZ
- (e.g. bzz.exchange) and bridge it to the Gnosis Chain network through the{' '}
- omni bridge. To pay the transaction fees, you will also need
- xDAI token. You can purchase DAI on the Ethereum mainnet network and bridge it to Gnosis Chain network through
- the xDai Bridge. See the{' '}
+ Your chequebook is deployed. You may deposit some xBZZ to your chequebook to afford more traffic. You can
+ acquire BZZ (e.g. bzz.exchange) and bridge it to the Gnosis Chain network
+ through the omni bridge. To pay the transaction fees, you
+ will also need xDAI token. You can purchase DAI on the Ethereum mainnet network and bridge it to Gnosis Chain
+ network through the xDai Bridge. See the{' '}
official Gnosis Chain website for more information.
>
)
diff --git a/src/providers/Bee.tsx b/src/providers/Bee.tsx
index 3d60152..fe62abb 100644
--- a/src/providers/Bee.tsx
+++ b/src/providers/Bee.tsx
@@ -163,14 +163,9 @@ function getStatus(
if (error || (nodeInfo && [BeeModes.FULL, BeeModes.LIGHT].includes(nodeInfo.beeMode))) {
status.chequebook.isEnabled = true
- if (
- chequebookAddress?.chequebookAddress &&
- chequebookBalance !== null &&
- chequebookBalance?.totalBalance.toBigNumber.isGreaterThan(0)
- ) {
+ if (chequebookAddress?.chequebookAddress && chequebookBalance !== null) {
status.chequebook.checkState = CheckState.OK
- } else if (chequebookAddress?.chequebookAddress) status.chequebook.checkState = CheckState.WARNING
- else status.chequebook.checkState = CheckState.OK
+ } else status.chequebook.checkState = CheckState.OK
}
status.all = determineOverallStatus(debugApiHealth, debugApiReadiness, status)