From a3c02dbf8a063fd69f4b4c1b4ff058a35710d0bc Mon Sep 17 00:00:00 2001 From: Vojtech Simetka Date: Tue, 28 Jun 2022 16:29:05 +0200 Subject: [PATCH] fix: use xDAI and xBZZ on Gnosis chain (#454) * fix: use xDAI on Gnosis chain * fix: rename BZZ to xBZZ when on Gnosis chain * fix: replace MINIMUM_xDAI with MINIMUM_XDAI * fix: update xdai links to correct gnosis chain urls --- src/components/CashoutModal.tsx | 2 +- src/components/WithdrawDepositModal.tsx | 2 +- src/containers/DepositModal.tsx | 2 +- src/containers/WithdrawModal.tsx | 2 +- .../account/chequebook/AccountChequebook.tsx | 8 +++---- src/pages/account/wallet/AccountWallet.tsx | 4 ++-- src/pages/accounting/PeerBalances.tsx | 14 ++++++------ src/pages/gift-code/index.tsx | 12 +++++----- src/pages/stamps/PostageStampCreation.tsx | 2 +- .../SetupSteps/ChequebookDeployFund.tsx | 22 +++++++++---------- src/pages/top-up/CryptoTopUpIndex.tsx | 4 ++-- src/pages/top-up/GiftCardFund.tsx | 8 +++---- src/pages/top-up/Swap.tsx | 20 ++++++++--------- src/pages/top-up/TopUpProgressIndicator.tsx | 2 +- 14 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/components/CashoutModal.tsx b/src/components/CashoutModal.tsx index f6ddc91..4df8130 100644 --- a/src/components/CashoutModal.tsx +++ b/src/components/CashoutModal.tsx @@ -79,7 +79,7 @@ export default function CheckoutModal({ peerId, uncashedAmount }: Props): ReactE )} {!loadingCashout && ( - Are you sure you want to cashout {uncashedAmount} BZZ from Peer{' '} + Are you sure you want to cashout {uncashedAmount} xBZZ from Peer{' '} {peerId}? )} diff --git a/src/components/WithdrawDepositModal.tsx b/src/components/WithdrawDepositModal.tsx index e0c1e62..6824460 100644 --- a/src/components/WithdrawDepositModal.tsx +++ b/src/components/WithdrawDepositModal.tsx @@ -96,7 +96,7 @@ export default function WithdrawDepositModal({ /> {amountError && ( - Please provide valid BZZ amount (max 16 decimals). Error: {amountError.message} + Please provide valid xBZZ amount (max 16 decimals). Error: {amountError.message} )} diff --git a/src/containers/DepositModal.tsx b/src/containers/DepositModal.tsx index a328af2..41cefdd 100644 --- a/src/containers/DepositModal.tsx +++ b/src/containers/DepositModal.tsx @@ -12,7 +12,7 @@ export default function DepositModal(): ReactElement { } min={new BigNumber(0)} diff --git a/src/containers/WithdrawModal.tsx b/src/containers/WithdrawModal.tsx index 0cf8fc1..351e578 100644 --- a/src/containers/WithdrawModal.tsx +++ b/src/containers/WithdrawModal.tsx @@ -11,7 +11,7 @@ export default function WithdrawModal(): ReactElement { } min={new BigNumber(0)} diff --git a/src/pages/account/chequebook/AccountChequebook.tsx b/src/pages/account/chequebook/AccountChequebook.tsx index 275a381..bc50e68 100644 --- a/src/pages/account/chequebook/AccountChequebook.tsx +++ b/src/pages/account/chequebook/AccountChequebook.tsx @@ -33,19 +33,19 @@ export function AccountChequebook(): ReactElement { diff --git a/src/pages/account/wallet/AccountWallet.tsx b/src/pages/account/wallet/AccountWallet.tsx index 44b13ae..a0c2555 100644 --- a/src/pages/account/wallet/AccountWallet.tsx +++ b/src/pages/account/wallet/AccountWallet.tsx @@ -50,10 +50,10 @@ export function AccountWallet(): ReactElement { - + - + ) : ( diff --git a/src/pages/accounting/PeerBalances.tsx b/src/pages/accounting/PeerBalances.tsx index 48016d4..e5d25f7 100644 --- a/src/pages/accounting/PeerBalances.tsx +++ b/src/pages/accounting/PeerBalances.tsx @@ -17,26 +17,26 @@ export default function PeerBalances({ accounting, isLoadingUncashed, totalUncas return ( - + {accounting?.map(({ peer, balance, received, sent, uncashedAmount, total }) => ( - + - + {uncashedAmount.toBigNumber.isGreaterThan('0') && ( diff --git a/src/pages/gift-code/index.tsx b/src/pages/gift-code/index.tsx index 3449517..58f1195 100644 --- a/src/pages/gift-code/index.tsx +++ b/src/pages/gift-code/index.tsx @@ -76,23 +76,23 @@ export default function Index(): ReactElement { Generate and share a gift wallet that anyone can use to set-up their light node with Swarm Desktop. This will - use {GIFT_WALLET_FUND_DAI_AMOUNT.toSignificantDigits(2)} XDAI and{' '} - {GIFT_WALLET_FUND_BZZ_AMOUNT.toSignificantDigits(2)} BZZ from your node wallet. + use {GIFT_WALLET_FUND_DAI_AMOUNT.toSignificantDigits(2)} xDAI and{' '} + {GIFT_WALLET_FUND_BZZ_AMOUNT.toSignificantDigits(2)} xBZZ from your node wallet. - + - + {balances.map((x, i) => ( - - + + ))} diff --git a/src/pages/stamps/PostageStampCreation.tsx b/src/pages/stamps/PostageStampCreation.tsx index ca927c3..9caf2de 100644 --- a/src/pages/stamps/PostageStampCreation.tsx +++ b/src/pages/stamps/PostageStampCreation.tsx @@ -66,7 +66,7 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement { const price = calculateStampPrice(depth, amount) - return `${price.toSignificantDigits()} BZZ` + return `${price.toSignificantDigits()} xBZZ` } return ( diff --git a/src/pages/status/SetupSteps/ChequebookDeployFund.tsx b/src/pages/status/SetupSteps/ChequebookDeployFund.tsx index c3572b8..927f845 100644 --- a/src/pages/status/SetupSteps/ChequebookDeployFund.tsx +++ b/src/pages/status/SetupSteps/ChequebookDeployFund.tsx @@ -24,23 +24,23 @@ const ChequebookDeployFund = (): ReactElement | null => { 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 xDai network through the{' '} - omni bridge. To pay the transaction fees, you will also need - xDAI token. You can purchase DAI on the network and bridge it to xDai network through the{' '} - xDai Bridge. See the{' '} - official xDai website for more information. + (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. ) break default: text = ( <> - Your chequebook is either not deployed nor funded. To run the node you will need xDAI and xBZZ on the xDai - network. You may need to aquire BZZ (e.g. bzz.exchange) and bridge it to - the xDai network through the omni bridge. To pay the - transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai - network through the xDai Bridge. See the{' '} - official xDai website for more information. + Your chequebook is either not deployed nor funded. To run the node you will need xDAI and xBZZ on the Gnosis + chain network. 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 official Gnosis Chain website for more information. ) } diff --git a/src/pages/top-up/CryptoTopUpIndex.tsx b/src/pages/top-up/CryptoTopUpIndex.tsx index 07cfbcd..d93cee1 100644 --- a/src/pages/top-up/CryptoTopUpIndex.tsx +++ b/src/pages/top-up/CryptoTopUpIndex.tsx @@ -11,8 +11,8 @@ export function CryptoTopUpIndex(): ReactElement { p={ For security reasons it is recommended to send maximum 5 to 10 xDAI. To get xDAI from DAI you may use{' '} - - https://bridge.xdaichain.com/ + + https://bridge.gnosischain.com . diff --git a/src/pages/top-up/GiftCardFund.tsx b/src/pages/top-up/GiftCardFund.tsx index ae1248e..d95bf49 100644 --- a/src/pages/top-up/GiftCardFund.tsx +++ b/src/pages/top-up/GiftCardFund.tsx @@ -83,10 +83,10 @@ export function GiftCardFund(): ReactElement { - + - + @@ -95,10 +95,10 @@ export function GiftCardFund(): ReactElement { - + - + Send all funds to your node diff --git a/src/pages/top-up/Swap.tsx b/src/pages/top-up/Swap.tsx index c09037f..b24ec7d 100644 --- a/src/pages/top-up/Swap.tsx +++ b/src/pages/top-up/Swap.tsx @@ -95,26 +95,26 @@ export function Swap({ header }: Props): ReactElement { - Swap some xDAI to BZZ + Swap some xDAI to xBZZ - You need to swap xDAI to BZZ in order to use Swarm. Make sure to keep at least {MINIMUM_XDAI} xDAI in order to - pay for transaction costs on the network. + You need to swap xDAI to xBZZ in order to use Swarm. Make sure to keep at least {MINIMUM_XDAI} xDAI in order + to pay for transaction costs on the network. Your current balance is {balance.dai.toSignificantDigits(4)} xDAI and {balance.bzz.toSignificantDigits(4)}{' '} - BZZ. + xBZZ. setUserInputSwap(event.target.value)} /> @@ -133,14 +133,14 @@ export function Swap({ header }: Props): ReactElement { diff --git a/src/pages/top-up/TopUpProgressIndicator.tsx b/src/pages/top-up/TopUpProgressIndicator.tsx index 0de6465..72ce43f 100644 --- a/src/pages/top-up/TopUpProgressIndicator.tsx +++ b/src/pages/top-up/TopUpProgressIndicator.tsx @@ -6,5 +6,5 @@ interface Props { } export function TopUpProgressIndicator({ index }: Props): ReactElement { - return + return }