diff options
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/app/app-header/index.scss | 17 | ||||
-rw-r--r-- | ui/app/components/app/network.js | 5 | ||||
-rw-r--r-- | ui/app/components/ui/button/buttons.scss | 3 | ||||
-rw-r--r-- | ui/app/css/itcss/components/network.scss | 7 | ||||
-rw-r--r-- | ui/app/helpers/utils/transactions.util.js | 30 | ||||
-rw-r--r-- | ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js | 2 |
6 files changed, 30 insertions, 34 deletions
diff --git a/ui/app/components/app/app-header/index.scss b/ui/app/components/app/app-header/index.scss index 325844af5..d46b16f25 100644 --- a/ui/app/components/app/app-header/index.scss +++ b/ui/app/components/app/app-header/index.scss @@ -48,7 +48,6 @@ &__contents { display: flex; - justify-content: space-between; flex-flow: row nowrap; width: 100%; @@ -74,17 +73,33 @@ flex-direction: row; align-items: center; cursor: pointer; + flex: 0 0 auto; } &__account-menu-container { display: flex; flex-flow: row nowrap; align-items: center; + flex: 1 1 auto; + width: 0; + flex-flow: row nowrap; + justify-content: flex-end; } &__network-component-wrapper { display: flex; flex-direction: row; align-items: center; + flex: 1 0 auto; + width: 0; + justify-content: flex-end; + + .network-component.pointer { + max-width: 200px; + } + + .network-indicator { + width: 100%; + } } } diff --git a/ui/app/components/app/network.js b/ui/app/components/app/network.js index 783fb36df..9ee0a1e17 100644 --- a/ui/app/components/app/network.js +++ b/ui/app/components/app/network.js @@ -41,9 +41,6 @@ Network.prototype.render = function () { } else if (providerName === 'ropsten') { hoverText = context.t('ropsten') iconName = 'ropsten-test-network' - } else if (parseInt(networkNumber) === 3) { - hoverText = context.t('ropsten') - iconName = 'ropsten-test-network' } else if (providerName === 'kovan') { hoverText = context.t('kovan') iconName = 'kovan-test-network' @@ -63,7 +60,7 @@ Network.prototype.render = function () { className: classnames({ 'network-component--disabled': this.props.disabled, 'ethereum-network': providerName === 'mainnet', - 'ropsten-test-network': providerName === 'ropsten' || parseInt(networkNumber) === 3, + 'ropsten-test-network': providerName === 'ropsten', 'kovan-test-network': providerName === 'kovan', 'rinkeby-test-network': providerName === 'rinkeby', 'goerli-test-network': providerName === 'goerli', diff --git a/ui/app/components/ui/button/buttons.scss b/ui/app/components/ui/button/buttons.scss index 0fc87415b..f1366cffe 100644 --- a/ui/app/components/ui/button/buttons.scss +++ b/ui/app/components/ui/button/buttons.scss @@ -70,6 +70,7 @@ $hover-orange: #FFD3B5; .btn-secondary { color: $Blue-500; border: 2px solid $hover-secondary; + background-color: $white; &:hover { border-color: $Blue-500; @@ -90,6 +91,7 @@ $hover-orange: #FFD3B5; .btn-warning { color: $Orange-500; border: 2px solid $hover-orange; + background-color: $white; &:hover { border-color: $Orange-500; @@ -110,6 +112,7 @@ $hover-orange: #FFD3B5; .btn-danger { color: $Red-500; border: 2px solid $hover-red; + background-color: $white; &:hover { border-color: $Red-500; diff --git a/ui/app/css/itcss/components/network.scss b/ui/app/css/itcss/components/network.scss index 2c6ca2522..da90b7910 100644 --- a/ui/app/css/itcss/components/network.scss +++ b/ui/app/css/itcss/components/network.scss @@ -51,11 +51,13 @@ line-height: 15px; font-size: 12px; padding: 0 4px; + flex: 0 0 auto; } .fa-question-circle { margin: 0 4px 0 6px; font-size: 1rem; + flex: 0 0 auto; } } @@ -63,9 +65,12 @@ padding: 0 4px; font-family: Roboto; font-size: 12px; - flex: 1 0 auto; + flex: 1 1 auto; color: $tundora; font-weight: 500; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } .dropdown-menu-item .fa.delete { diff --git a/ui/app/helpers/utils/transactions.util.js b/ui/app/helpers/utils/transactions.util.js index 8d96b1487..cb6c9536c 100644 --- a/ui/app/helpers/utils/transactions.util.js +++ b/ui/app/helpers/utils/transactions.util.js @@ -30,21 +30,6 @@ export function getTokenData (data = '') { return abiDecoder.decodeMethod(data) } -async function getMethodFrom4Byte (fourBytePrefix) { - const fourByteResponse = (await fetch(`https://www.4byte.directory/api/v1/signatures/?hex_signature=${fourBytePrefix}`, { - referrerPolicy: 'no-referrer-when-downgrade', - body: null, - method: 'GET', - mode: 'cors', - })).json() - - if (fourByteResponse.count === 1) { - return fourByteResponse.results[0].text_signature - } else { - return null - } -} - const registry = new MethodRegistry({ provider: global.ethereumProvider }) /** @@ -58,16 +43,7 @@ const registry = new MethodRegistry({ provider: global.ethereumProvider }) const fourBytePrefix = prefixedData.slice(0, 10) try { - const fourByteSig = getMethodFrom4Byte(fourBytePrefix).catch((e) => { - log.error(e) - return null - }) - - let sig = await registry.lookup(fourBytePrefix) - - if (!sig) { - sig = await fourByteSig - } + const sig = await registry.lookup(fourBytePrefix) if (!sig) { return {} @@ -81,8 +57,8 @@ const registry = new MethodRegistry({ provider: global.ethereumProvider }) } } catch (error) { log.error(error) - const tokenData = getTokenData(data) - const { name } = tokenData || {} + const contractData = getTokenData(data) + const { name } = contractData || {} return { name } } diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js index be819b5f0..1cbe5951d 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -543,7 +543,7 @@ export default class ConfirmTransactionBase extends Component { toName={toName} toAddress={toAddress} showEdit={onEdit && !isTxReprice} - action={actionKey && this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')} + action={this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')} title={title} titleComponent={this.renderTitleComponent()} subtitle={subtitle} |