Skip to content

Commit

Permalink
Fix props issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iamonuwa committed Jul 19, 2019
1 parent ac9a74b commit 2b2a682
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"react-dom": "^16.6.0",
"react-emoji-render": "^0.5.0",
"react-file-reader-input": "^2.0.0",
"react-i18next": "^10.1.2",
"react-i18next": "^10.11.4",
"react-linkify": "^0.2.2",
"react-native-webview-messaging": "^1.2.3",
"react-qr-reader": "^2.1.1",
Expand Down
5 changes: 0 additions & 5 deletions src/components/Advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,8 @@ class Advanced extends React.Component {
}

render(){
<<<<<<< HEAD
let {isVendor, balance, privateKey, changeAlert, changeView, setPossibleNewPrivateKey} = this.props
let { currency, expertMode } = this.state
=======
let {isVendor, balance, privateKey, changeAlert, changeView, setPossibleNewPrivateKey, t} = this.props
let { currency } = this.state
>>>>>>> Fix Use react-i18next instead of i18n #173

let url = window.location.protocol+"//"+window.location.hostname
if(window.location.port&&window.location.port!==80&&window.location.port!==443){
Expand Down
2 changes: 1 addition & 1 deletion src/components/Bity.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class Bity extends Component {

render() {
const { fields } = this.state;
let { t } = this.props;
let { t, currencyDisplay } = this.props;
return (
<div>
<Box mb={4}>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ class Exchange extends React.Component {
// NOTE: Technically we're not "depositing" but that was the
// only way I was able to make the loading bar show up...
daiToXdaiMode:"depositing",
loaderBarStatusText: i18n.t('exchange.fast_exit_swap'),
loaderBarStatusText: t('exchange.fast_exit_swap'),
loaderBarColor:"#3efff8",
loaderBarPercent:30,
loaderBarStartTime: Date.now(),
Expand Down Expand Up @@ -929,7 +929,7 @@ class Exchange extends React.Component {
console.log(rsp);
this.updatePendingExits(this.state.daiAddress, this.state.xdaiweb3);
this.setState({
loaderBarStatusText: i18n.t('exchange.fast_exit_patience'),
loaderBarStatusText: t('exchange.fast_exit_patience'),
loaderBarPercent:75,
loaderBarStartTime: Date.now(),
loaderBarClick:()=>{
Expand All @@ -939,7 +939,7 @@ class Exchange extends React.Component {
this.setState({ daiToXdaiAmount: "", daiToXdaiMode: false });
this.props.changeAlert({
type: "success",
message: i18n.t("exchange.fast_exit_patience")
message: t("exchange.fast_exit_patience")
});
}).catch(err => {
console.log(err);
Expand All @@ -966,7 +966,7 @@ class Exchange extends React.Component {
this.updatePendingExits(this.state.daiAddress, this.state.xdaiweb3);
this.props.changeAlert({
type: "success",
message: i18n.t("exchange.fast_exit_patience")
message: t("exchange.fast_exit_patience")
});
this.setState({
daiToXdaiAmount: "",
Expand Down
1 change: 1 addition & 0 deletions src/components/MoreButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { withTranslation } from "react-i18next";
function MoreButtons ({
isVendor,
changeView,
expertMode,
t
}) {
let exchangeButton;
Expand Down
3 changes: 2 additions & 1 deletion src/components/SendToAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SendToAddress extends React.Component {
convertCurrency,
changeAlert,
address,
t
} = props;


Expand All @@ -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: i18n.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.
Expand Down

0 comments on commit 2b2a682

Please sign in to comment.