Small UI fixes (#3966)

* Load dapp visibility from localStorage

* Align MethodDecoding address svg properly

* Consolidate svg & img classes overrides

* improve isNullAddress check

* readOnly for null display

* disabled || readOnly
This commit is contained in:
Jaco Greeff
2016-12-27 12:40:33 +01:00
committed by GitHub
parent ce8d9252e7
commit 19c8e55aa9
7 changed files with 27 additions and 11 deletions

View File

@@ -19,8 +19,11 @@ const DEFAULT_GASPRICE = '20000000000';
const MAX_GAS_ESTIMATION = '50000000';
const NULL_ADDRESS = '0000000000000000000000000000000000000000';
export {
DEFAULT_GAS,
DEFAULT_GASPRICE,
MAX_GAS_ESTIMATION
MAX_GAS_ESTIMATION,
NULL_ADDRESS
};

View File

@@ -18,6 +18,8 @@ import BigNumber from 'bignumber.js';
import util from '~/api/util';
import { NULL_ADDRESS } from './constants';
export const ERRORS = {
invalidAddress: 'address is an invalid network address',
invalidAmount: 'the supplied amount should be a valid positive number',
@@ -174,3 +176,11 @@ export function validateUint (value) {
valueError
};
}
export function isNullAddress (address) {
if (address && address.substr(0, 2) === '0x') {
return isNullAddress(address.substr(2));
}
return address === NULL_ADDRESS;
}