Skip to content

Commit

Permalink
Update changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamonuwa committed Aug 7, 2019
1 parent 5c28617 commit 40ce81f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 50 deletions.
12 changes: 3 additions & 9 deletions src/components/Bity.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,9 @@ class Bity extends Component {
<Trans i18nKey="offramp.heading">
Transfer your ether directly to your bank account with just one
click using{" "}
<a
href="https://bity.com/"
target="_blank"
rel="noopener noreferrer"
>
bity.com
</a>
, the secure swiss crypto gateway. No KYC is required within
bity.com's 5000 CHF (~4500 EUR) annual limit.
<a href="https://bity.com/" target="_blank" rel="noopener noreferrer">bity.com</a>
, the secure swiss crypto gateway. No KYC is required within bity.com's
5000 CHF (~4500 EUR) annual limit.
</Trans>
</P>
<Field mb={3} label={t("offramp.form.owner")}>
Expand Down
56 changes: 25 additions & 31 deletions src/components/BurnWallet.js
Original file line number Diff line number Diff line change
@@ -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 }) => (
<>
<div style={{textAlign:"center",width:"100%",fontWeight:'bold',fontSize:30}}>
{t('burn_wallet.burn_private_key_question')}
</div>
<div style={{textAlign:"center",marginTop:20,width:"100%",fontWeight:'bold',fontSize:20}}>
{t('burn_wallet.disclaimer')}
</div>
<div>
<Ruler/>
<div className="content ops row">

export default ({ mainStyle, burnWallet, goBack }) => {
return (
<Translation>
{(t) => (
<>
<div style={{textAlign:"center",width:"100%",fontWeight:'bold',fontSize:30}}>
{t('burn_wallet.burn_private_key_question')}
</div>
<div style={{textAlign:"center",marginTop:20,width:"100%",fontWeight:'bold',fontSize:20}}>
{t('burn_wallet.disclaimer')}
</div>
<div>
<Ruler/>
<div className="content ops row">

<div className="col-6 p-1">
<button className="btn btn-large w-100" style={{backgroundColor:mainStyle.mainColor}} onClick={goBack} >
<i className="fas fa-arrow-left" /> {t('burn_wallet.cancel')}
</button>
</div>
<div className="col-6 p-1">
<button className="btn btn-large w-100" style={{backgroundColor:mainStyle.mainColor}} onClick={goBack} >
<i className="fas fa-arrow-left" /> {t('burn_wallet.cancel')}
</button>
</div>

<div className="col-6 p-1">
<button className="btn btn-large w-100" style={{backgroundColor:"#c53838"}} onClick={burnWallet}>
<i className="fas fa-fire"/> {t('burn_wallet.burn')}
</button>
</div>
<div className="col-6 p-1">
<button className="btn btn-large w-100" style={{backgroundColor:"#c53838"}} onClick={burnWallet}>
<i className="fas fa-fire"/> {t('burn_wallet.burn')}
</button>
</div>
</div>
</>
)}
</div>
</>
);

</Translation>
)
}
export default withTranslation()(BurnWallet);
4 changes: 2 additions & 2 deletions src/components/Exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/MainCard.js
Original file line number Diff line number Diff line change
@@ -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 = ({
Expand Down
11 changes: 6 additions & 5 deletions src/components/SendToAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class SendToAddress extends React.Component {
},
convertCurrency,
changeAlert,
address,
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: 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.
Expand Down Expand Up @@ -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}`);
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/WithdrawFromPrivate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down Expand Up @@ -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')})
}
};

Expand Down

0 comments on commit 40ce81f

Please sign in to comment.