2018-01-29 14:13:46 -05:00
|
|
|
import React, { PureComponent } from 'react';
|
2018-03-21 23:50:25 -04:00
|
|
|
import translate from 'translations';
|
2018-03-20 16:08:57 -04:00
|
|
|
import QRCode from 'qrcode.react';
|
|
|
|
import './BitcoinQR.scss';
|
2017-08-31 08:56:49 -07:00
|
|
|
|
2017-09-24 19:06:28 -07:00
|
|
|
interface Props {
|
|
|
|
paymentAddress: string | null;
|
2017-12-11 12:44:53 -05:00
|
|
|
destinationAmount: number;
|
2017-09-24 19:06:28 -07:00
|
|
|
}
|
2017-08-31 08:56:49 -07:00
|
|
|
|
2018-01-29 14:13:46 -05:00
|
|
|
export default class BitcoinQR extends PureComponent<Props, {}> {
|
2017-09-24 19:06:28 -07:00
|
|
|
public render() {
|
2017-12-11 12:44:53 -05:00
|
|
|
const { paymentAddress, destinationAmount } = this.props;
|
2017-08-31 08:56:49 -07:00
|
|
|
return (
|
2018-03-20 16:08:57 -04:00
|
|
|
<div className="BitcoinQR">
|
2017-08-31 08:56:49 -07:00
|
|
|
<section className="row block swap-address text-center">
|
2018-03-21 23:50:25 -04:00
|
|
|
<label>{translate('X_ADDRESS')}</label>
|
2018-03-20 16:08:57 -04:00
|
|
|
<div className="BitcoinQR-qr">
|
2017-12-11 12:44:53 -05:00
|
|
|
<QRCode value={`bitcoin:${paymentAddress}amount=${destinationAmount}`} />
|
2017-08-31 08:56:49 -07:00
|
|
|
</div>
|
|
|
|
<br />
|
2018-03-21 23:50:25 -04:00
|
|
|
<p className="text-danger">{translate('SWAP_TIME_LIMIT_WARNING')}</p>
|
|
|
|
{translate('SWAP_RECOMMENDED_TX_FEES', {
|
|
|
|
$link: 'https://shapeshift.io/#/btcfee'
|
|
|
|
})}
|
2017-08-31 08:56:49 -07:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|