Skip to content

Commit

Permalink
add pax tooltips to receive
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed May 1, 2019
1 parent ac2ea52 commit c84a898
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,34 @@ class Tooltips extends React.PureComponent {
defaultMessage='Share this address with others, and they can send you BTC directly to your wallet. Your address changes with every payment. You can also create a request by attaching an amount below.'
/>
</Tooltip>
<Tooltip id='reqEthShare'>
<Tooltip id='requesteth.shareaddress'>
<FormattedMessage
id='modals.requestether.sharetooltip'
id='modals.requesteth.shareaddress'
defaultMessage='Share this address with others, and they can send you ETH directly to your wallet. Your request address will not change.'
/>
</Tooltip>
<Tooltip id='requestpax.shareaddress'>
<FormattedMessage
id='modals.requesteth.erc20.shareaddress'
defaultMessage='Share this address with others, and they can send you PAX directly to your wallet. Your request address will not change.'
/>
</Tooltip>
<Tooltip id='reqXlmShare'>
<FormattedMessage
id='modals.requestxlm.sharetooltip'
defaultMessage='Share this address with others, and they can send you XLM directly to your wallet. Your request address will not change.'
/>
</Tooltip>
<Tooltip id='reqEthScan'>
<Tooltip id='requesteth.qrcode'>
<FormattedMessage
id='modals.requesteth.qrcode'
defaultMessage='Ask the sender to scan this QR code with their ETH wallet'
/>
</Tooltip>
<Tooltip id='requestpax.qrcode'>
<FormattedMessage
id='modals.requestether.scan_tooltip'
defaultMessage='Ask the sender to scan this QR code with their ether wallet'
id='modals.requesteth.erc20.qrcode'
defaultMessage='Ask the sender to scan this QR code with their PAX wallet'
/>
</Tooltip>
<Tooltip id='reqXlmScan'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ class RequestEthContainer extends React.PureComponent {
} else if (coin === 'PAX' && prevProps.coin !== coin) {
this.props.modalActions.closeAllModals()
this.props.modalActions.showModal('@MODAL.REQUEST.ETH', {
coin,
coin: 'PAX',
lockboxIndex: this.props.lockboxIndex
})
} else if (coin === 'ETH' && prevProps.coin !== coin) {
this.props.modalActions.closeAllModals()
this.props.modalActions.showModal('@MODAL.REQUEST.ETH', {
coin: 'ETH',
lockboxIndex: this.props.lockboxIndex
})
} else if (this.props.initialValues.coin !== prevProps.initialValues.coin) {
Expand Down Expand Up @@ -76,29 +77,17 @@ class RequestEthContainer extends React.PureComponent {
}

render () {
const {
coin,
coins,
closeAll,
data,
position,
total,
selection,
supportedCoins
} = this.props
const { coin, closeAll, data, position, total, supportedCoins } = this.props
const content = data.cata({
Success: val => (
<Success
{...this.props}
type={val.type}
coin={coin}
coins={coins}
closeAll={closeAll}
selection={selection}
address={val.address}
onSubmit={this.onSubmit}
handleOpenLockbox={this.handleOpenLockbox}
coin={coin}
excludeLockbox={val.excludeLockbox}
handleOpenLockbox={this.handleOpenLockbox}
isErc20={supportedCoins[coin].contractAddress}
onSubmit={this.onSubmit}
type={val.type}
/>
),
NotAsked: () => <DataError onClick={this.handleRefresh} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ const BannerContainer = styled.div`

const RequestEth = props => {
const {
address,
coin,
excludeLockbox,
handleSubmit,
handleOpenLockbox,
address,
type,
excludeLockbox
isErc20,
type
} = props
const isLockboxAcct = type === 'LOCKBOX'
const warnLockboxReceive = !(
Expand Down Expand Up @@ -108,9 +109,15 @@ const RequestEth = props => {
id='modals.requesteth.share'
defaultMessage='Copy & Share Address:'
/>
<TooltipHost id='reqEthShare'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
{isErc20 ? (
<TooltipHost id='requestpax.shareaddress'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
) : (
<TooltipHost id='requesteth.shareaddress'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
)}
</FormLabel>
</FormItem>
<AddressContainer>
Expand Down Expand Up @@ -166,9 +173,15 @@ const RequestEth = props => {
id='modals.requesteth.scan'
defaultMessage='Scan QR Code:'
/>
<TooltipHost id='reqEthScan'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
{isErc20 ? (
<TooltipHost id='requestpax.qrcode'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
) : (
<TooltipHost id='requesteth.qrcode'>
<TooltipIcon name='question-in-circle' />
</TooltipHost>
)}
</Text>
</ScanMessage>
<QRCodeWrapper
Expand Down

0 comments on commit c84a898

Please sign in to comment.