Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): do not show qr code for keysend payments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Mar 24, 2020
1 parent 954b77c commit 2e11bc5
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions renderer/components/Request/RequestSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,33 @@ const RequestSummary = ({ invoice = {}, payReq, intl, showNotification, ...rest

<Bar variant="light" />

<DataRow
left={
<>
<FormattedMessage {...messages.payment_request} />
<Text
className="hint--bottom-left"
css="word-wrap: break-word;"
data-hint={payReq}
fontSize="xs"
fontWeight="light"
mb={2}
>
<Truncate maxlen={40} text={payReq} />
{payReq && (
<DataRow
left={
<>
<FormattedMessage {...messages.payment_request} />
<Text
className="hint--bottom-left"
css="word-wrap: break-word;"
data-hint={payReq}
fontSize="xs"
fontWeight="light"
mb={2}
>
<Truncate maxlen={40} text={payReq} />
</Text>
<Button onClick={() => copyToClipboard(payReq)} size="small" type="button">
<FormattedMessage {...messages.copy_button_text} />
</Button>
</>
}
right={
<Text>
<QRCode value={payReq} />
</Text>
<Button onClick={() => copyToClipboard(payReq)} size="small" type="button">
<FormattedMessage {...messages.copy_button_text} />
</Button>
</>
}
right={
<Text>
<QRCode value={payReq} />
</Text>
}
/>
}
/>
)}

<Bar variant="light" />

Expand Down Expand Up @@ -162,8 +164,8 @@ const RequestSummary = ({ invoice = {}, payReq, intl, showNotification, ...rest

RequestSummary.propTypes = {
intl: intlShape.isRequired,
invoice: PropTypes.object,
payReq: PropTypes.string.isRequired,
invoice: PropTypes.object.isRequired,
payReq: PropTypes.string,
showNotification: PropTypes.func.isRequired,
}

Expand Down

0 comments on commit 2e11bc5

Please sign in to comment.