From 40ce81ff603228b33b91f2cbd91d0b1170cdd6e9 Mon Sep 17 00:00:00 2001 From: Onuwa Nnachi Isaac Date: Wed, 7 Aug 2019 11:23:59 +0100 Subject: [PATCH] Update changes --- src/components/Bity.js | 12 ++---- src/components/BurnWallet.js | 56 ++++++++++++--------------- src/components/Exchange.js | 4 +- src/components/MainCard.js | 2 +- src/components/SendToAddress.js | 11 +++--- src/components/WithdrawFromPrivate.js | 4 +- 6 files changed, 39 insertions(+), 50 deletions(-) diff --git a/src/components/Bity.js b/src/components/Bity.js index 840623c69..2fc798310 100644 --- a/src/components/Bity.js +++ b/src/components/Bity.js @@ -370,15 +370,9 @@ class Bity extends Component { Transfer your ether directly to your bank account with just one click using{" "} - - bity.com - - , the secure swiss crypto gateway. No KYC is required within - bity.com's 5000 CHF (~4500 EUR) annual limit. + bity.com + , the secure swiss crypto gateway. No KYC is required within bity.com's + 5000 CHF (~4500 EUR) annual limit.

diff --git a/src/components/BurnWallet.js b/src/components/BurnWallet.js index b6f334101..30550ccd3 100644 --- a/src/components/BurnWallet.js +++ b/src/components/BurnWallet.js @@ -1,39 +1,33 @@ import React from 'react'; -import { Translation } from 'react-i18next'; +import { withTranslation } from 'react-i18next'; import Ruler from "./Ruler"; +const BurnWallet = ({ mainStyle, burnWallet, goBack, t }) => ( + <> +
+ {t('burn_wallet.burn_private_key_question')} +
+
+ {t('burn_wallet.disclaimer')} +
+
+ +
-export default ({ mainStyle, burnWallet, goBack }) => { - return ( - - {(t) => ( - <> -
- {t('burn_wallet.burn_private_key_question')} -
-
- {t('burn_wallet.disclaimer')} -
-
- -
- -
- -
+
+ +
-
- -
+
+
- - )} +
+ +); -
- ) -} +export default withTranslation()(BurnWallet); \ No newline at end of file diff --git a/src/components/Exchange.js b/src/components/Exchange.js index caf9fbc61..ec3478f92 100644 --- a/src/components/Exchange.js +++ b/src/components/Exchange.js @@ -74,13 +74,13 @@ class Exchange extends React.Component { xdaiMetaAccount: xdaiMetaAccount, daiToXdaiMode: false, ethToDaiMode: false, - loaderBarStatusText: this.props.t('loading'), + loaderBarStatusText: props.t('loading'), loaderBarStartTime:Date.now(), loaderBarPercent: 2, loaderBarColor: "#aaaaaa", gwei: 5, maxWithdrawlAmount: 0.00, - withdrawalExplanation: this.props.t('exchange.withdrawal_explanation'), + withdrawalExplanation: props.t('exchange.withdrawal_explanation'), gettingGas:false, } diff --git a/src/components/MainCard.js b/src/components/MainCard.js index 98d513781..16d78dada 100644 --- a/src/components/MainCard.js +++ b/src/components/MainCard.js @@ -1,6 +1,6 @@ import React from "react"; import { Flex, Icon, Box } from "rimble-ui"; -import { withTranslation} from 'react-i18next'; +import { withTranslation } from 'react-i18next'; import { PrimaryButton } from "./Buttons"; const MainCard = ({ diff --git a/src/components/SendToAddress.js b/src/components/SendToAddress.js index 140663155..f7953d082 100644 --- a/src/components/SendToAddress.js +++ b/src/components/SendToAddress.js @@ -31,7 +31,8 @@ class SendToAddress extends React.Component { }, convertCurrency, changeAlert, - address, + address, + t } = props; @@ -54,7 +55,7 @@ class SendToAddress extends React.Component { // NOTE: In this case, we scan the RequestFunds QR code and if "currency" // is missing, we display a warning. } else if (((toAddress && amount) || message) && !currency) { - changeAlert({type: "warning", message: this.props.t("send_to_address.currency_error")}); + changeAlert({type: "warning", message: t("send_to_address.currency_error")}); // NOTE: We're setting currency equal to displayCurrency here to not // trigger the next condition, as that would set currencyWarning to // true again. @@ -160,7 +161,7 @@ class SendToAddress extends React.Component { send = async () => { let { toAddress, amount } = this.state; - let { address, convertCurrency, currencyDisplay } = this.props + let { address, convertCurrency, currencyDisplay, t } = this.props const displayCurrency = getStoredValue("currency", address); amount = convertCurrency(amount, `USD/${displayCurrency}`); @@ -237,11 +238,11 @@ class SendToAddress extends React.Component { }) } }else{ - this.props.changeAlert({type: 'warning', message: this.props.t('send_to_address.error')}) + this.props.changeAlert({type: 'warning', message: t('send_to_address.error')}) } }; - onKeyDown = e => { + onKeyDown(e) { // backspace, delete, tab, escape, enter, comma and period const keyCodeArray = [46, 8, 9, 27, 13, 110, 188, 190]; if (keyCodeArray.indexOf(e.keyCode) !== -1) { diff --git a/src/components/WithdrawFromPrivate.js b/src/components/WithdrawFromPrivate.js index 350ed6a6a..f1030d8fd 100644 --- a/src/components/WithdrawFromPrivate.js +++ b/src/components/WithdrawFromPrivate.js @@ -71,7 +71,7 @@ class WithdrawFromPrivate extends React.Component { withdraw = async () => { let { fromAddress, amount, metaAccount } = this.state - const { tokenSendV2, address, web3, xdaiweb3, daiTokenAddr} = this.props + const { tokenSendV2, address, web3, xdaiweb3, daiTokenAddr, t } = this.props if(this.state.canWithdraw){ console.log("SWITCH TO LOADER VIEW...") @@ -110,7 +110,7 @@ class WithdrawFromPrivate extends React.Component { message: 'Withdrawn!' }); }else{ - this.props.changeAlert({type: 'warning', message: this.props.t('withdraw_from_private.error')}) + this.props.changeAlert({type: 'warning', message: t('withdraw_from_private.error')}) } };