Fix tx-insight accreditation styling (#13009)

* Fix tx-insight accreditation styling

- Ensure "Etherscan" appears capitalized
- Ensure messages are separated by newline
- Handle case where server returns `fetchedVia` that frontend doesn't
  support

* Revert "Fix tx-insight accreditation styling"

This reverts commit f7121d23cf9e5cf37e18444793933c36b66d9028.

* New Fix tx-insight accreditation styling

Co-authored-by: Dan Miller <danjm.com@gmail.com>
feature/default_network_editable
g. nicholas d'andrea 3 years ago committed by Dan Miller
parent 7c4e3061f8
commit e7b11bec68
  1. 2
      app/_locales/en/messages.json
  2. 8
      ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js
  3. 3
      ui/components/app/transaction-decoding/components/ui/accreditation/index.scss

@ -3026,7 +3026,7 @@
"message": "Decoded by Truffle" "message": "Decoded by Truffle"
}, },
"transactionDecodingAccreditationVerified": { "transactionDecodingAccreditationVerified": {
"message": "Verified contract on" "message": "Verified contract on $1"
}, },
"transactionDecodingUnsupportedNetworkError": { "transactionDecodingUnsupportedNetworkError": {
"message": "Transaction decoding is not available for chainId $1" "message": "Transaction decoding is not available for chainId $1"

@ -27,8 +27,7 @@ const Accreditation = ({ fetchVia, address }) => {
className="accreditation__prefix" className="accreditation__prefix"
boxProps={{ margin: 0 }} boxProps={{ margin: 0 }}
> >
{t('transactionDecodingAccreditationVerified')} {t('transactionDecodingAccreditationVerified', [
</Typography>
<Button <Button
type="link" type="link"
className="accreditation__link" className="accreditation__link"
@ -40,9 +39,12 @@ const Accreditation = ({ fetchVia, address }) => {
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
title={t('etherscanView')} title={t('etherscanView')}
key="accreditation-link-button"
> >
{fetchVia} {fetchVia}
</Button> </Button>,
])}
</Typography>
<Typography variant={TYPOGRAPHY.H7} boxProps={{ margin: 0 }}> <Typography variant={TYPOGRAPHY.H7} boxProps={{ margin: 0 }}>
{t('transactionDecodingAccreditationDecoded')} {t('transactionDecodingAccreditationDecoded')}
</Typography> </Typography>

@ -10,14 +10,15 @@
&__info { &__info {
color: $ui-black; color: $ui-black;
display: flex; display: flex;
flex-flow: column;
flex-wrap: wrap; flex-wrap: wrap;
} }
&__link.btn-link { &__link.btn-link {
@include H7; @include H7;
display: inherit;
padding: 0 4px; padding: 0 4px;
width: auto;
} }
} }

Loading…
Cancel
Save