From 530d93e86ec1cb70d167f2f15993f2d5a1b07505 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Wed, 31 Oct 2018 11:09:09 +0100 Subject: [PATCH 1/2] frontend/receive: fix qrcode prefix --- frontends/web/src/routes/account/receive/receive.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontends/web/src/routes/account/receive/receive.jsx b/frontends/web/src/routes/account/receive/receive.jsx index 72e23bb38b..6add96efb3 100644 --- a/frontends/web/src/routes/account/receive/receive.jsx +++ b/frontends/web/src/routes/account/receive/receive.jsx @@ -120,7 +120,6 @@ export default class Receive extends Component { render({ t, - coinCode, code, }, { verifying, @@ -129,8 +128,10 @@ export default class Receive extends Component { paired, }) { let uriPrefix = 'bitcoin:'; - if (coinCode === 'ltc' || coinCode === 'tltc') { + if (code.startsWith('ltc') || code.startsWith('tltc')) { uriPrefix = 'litecoin:'; + } else if (code.startsWith('eth') || code.startsWith('teth')) { + uriPrefix = ''; } const content = receiveAddresses ? (
From 296905945ef652c3bb17973d6f1fa71355d757de Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Wed, 31 Oct 2018 11:15:52 +0100 Subject: [PATCH 2/2] frontend/receive: adapt UI for single-address accounts Don't show previous, next, index. Hide irrelevant guide entries. --- .../src/routes/account/receive/receive.jsx | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/frontends/web/src/routes/account/receive/receive.jsx b/frontends/web/src/routes/account/receive/receive.jsx index 6add96efb3..57ace3287b 100644 --- a/frontends/web/src/routes/account/receive/receive.jsx +++ b/frontends/web/src/routes/account/receive/receive.jsx @@ -138,22 +138,30 @@ export default class Receive extends Component {
- -

{`${t('receive.label')} (${activeIndex + 1}/${receiveAddresses.length})`}

- + { + receiveAddresses.length > 1 && ( + + ) + } +

{t('receive.label')} { receiveAddresses.length > 1 ? `(${activeIndex + 1}/${receiveAddresses.length})` : ''}

+ { + receiveAddresses.length > 1 && ( + + ) + }
{ code === 'ltc-p2wpkh-p2sh' && ( @@ -203,10 +211,10 @@ export default class Receive extends Component {
- + { receiveAddresses && receiveAddresses.length > 1 && } - + { receiveAddresses && receiveAddresses.length > 1 && } );