2017-06-06 23:19:12 +02:00
import React from "react" ;
import Link from "component/link" ;
import { Address } from "component/common" ;
2017-05-11 02:59:47 +02:00
class WalletAddress extends React . Component {
componentWillMount ( ) {
2017-06-06 23:19:12 +02:00
this . props . checkAddressIsMine ( this . props . receiveAddress ) ;
2017-05-11 02:59:47 +02:00
}
render ( ) {
2017-06-06 23:19:12 +02:00
const { receiveAddress , getNewAddress , gettingNewAddress } = this . props ;
2017-05-11 02:59:47 +02:00
return (
< section className = "card" >
< div className = "card__title-primary" >
2017-05-26 22:26:06 +02:00
< h3 > { _ _ ( "Wallet Address" ) } < / h3 >
2017-05-11 02:59:47 +02:00
< / div >
< div className = "card__content" >
< Address address = { receiveAddress } / >
< / div >
< div className = "card__actions" >
2017-06-06 23:19:12 +02:00
< Link
label = { _ _ ( "Get New Address" ) }
button = "primary"
icon = "icon-refresh"
onClick = { getNewAddress }
disabled = { gettingNewAddress }
/ >
2017-05-11 02:59:47 +02:00
< / div >
< div className = "card__content" >
< div className = "help" >
2017-06-06 23:19:12 +02:00
< p >
{ _ _ (
'Other LBRY users may send credits to you by entering this address on the "Send" page.'
) }
< / p >
< p >
{ _ _ (
"You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources."
) }
< / p >
2017-05-11 02:59:47 +02:00
< / div >
< / div >
< / section >
) ;
}
}
2017-06-06 06:21:55 +02:00
export default WalletAddress ;