-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')})
}
};