diff --git a/.travis.yml b/.travis.yml index 30f2115c..5ac7cb17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - docker pull dternyak/eth-priv-to-addr:latest - + - sudo apt-get install libusb-1.0 + install: - npm install --silent diff --git a/common/Root.tsx b/common/Root.tsx index e572c223..bad06b74 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -13,8 +13,8 @@ import BroadcastTx from 'containers/Tabs/BroadcastTx'; import ErrorScreen from 'components/ErrorScreen'; import PageNotFound from 'components/PageNotFound'; import LogOutPrompt from 'components/LogOutPrompt'; -import { Aux } from 'components/ui'; import { Store } from 'redux'; +import { pollOfflineStatus } from 'actions/config'; import { AppState } from 'reducers'; interface Props { @@ -30,6 +30,10 @@ export default class Root extends Component { error: null }; + public componentDidMount() { + this.props.store.dispatch(pollOfflineStatus()); + } + public componentDidCatch(error: Error) { this.setState({ error }); } @@ -70,11 +74,11 @@ export default class Root extends Component { return ( - + {routes} - + ); diff --git a/common/actions/config/actionCreators.ts b/common/actions/config/actionCreators.ts index 4a71626c..f1cb8b2a 100644 --- a/common/actions/config/actionCreators.ts +++ b/common/actions/config/actionCreators.ts @@ -1,13 +1,6 @@ import * as interfaces from './actionTypes'; import { TypeKeys } from './constants'; -import { NodeConfig, CustomNodeConfig, CustomNetworkConfig } from 'config/data'; - -export type TForceOfflineConfig = typeof forceOfflineConfig; -export function forceOfflineConfig(): interfaces.ForceOfflineAction { - return { - type: TypeKeys.CONFIG_FORCE_OFFLINE - }; -} +import { NodeConfig, CustomNodeConfig, NetworkConfig, CustomNetworkConfig } from 'config/data'; export type TToggleOfflineConfig = typeof toggleOfflineConfig; export function toggleOfflineConfig(): interfaces.ToggleOfflineAction { @@ -16,6 +9,13 @@ export function toggleOfflineConfig(): interfaces.ToggleOfflineAction { }; } +export type TToggleAutoGasLimit = typeof toggleAutoGasLimit; +export function toggleAutoGasLimit(): interfaces.ToggleAutoGasLimitAction { + return { + type: TypeKeys.CONFIG_TOGGLE_AUTO_GAS_LIMIT + }; +} + export type TChangeLanguage = typeof changeLanguage; export function changeLanguage(sign: string): interfaces.ChangeLanguageAction { return { @@ -25,10 +25,14 @@ export function changeLanguage(sign: string): interfaces.ChangeLanguageAction { } export type TChangeNode = typeof changeNode; -export function changeNode(nodeSelection: string, node: NodeConfig): interfaces.ChangeNodeAction { +export function changeNode( + nodeSelection: string, + node: NodeConfig, + network: NetworkConfig +): interfaces.ChangeNodeAction { return { type: TypeKeys.CONFIG_NODE_CHANGE, - payload: { nodeSelection, node } + payload: { nodeSelection, node, network } }; } diff --git a/common/actions/config/actionTypes.ts b/common/actions/config/actionTypes.ts index e42d47eb..cd147b74 100644 --- a/common/actions/config/actionTypes.ts +++ b/common/actions/config/actionTypes.ts @@ -1,14 +1,13 @@ import { TypeKeys } from './constants'; -import { NodeConfig, CustomNodeConfig, CustomNetworkConfig } from 'config/data'; +import { NodeConfig, CustomNodeConfig, NetworkConfig, CustomNetworkConfig } from 'config/data'; /*** Toggle Offline ***/ export interface ToggleOfflineAction { type: TypeKeys.CONFIG_TOGGLE_OFFLINE; } -/*** Force Offline ***/ -export interface ForceOfflineAction { - type: TypeKeys.CONFIG_FORCE_OFFLINE; +export interface ToggleAutoGasLimitAction { + type: TypeKeys.CONFIG_TOGGLE_AUTO_GAS_LIMIT; } /*** Change Language ***/ @@ -24,6 +23,7 @@ export interface ChangeNodeAction { payload: { nodeSelection: string; node: NodeConfig; + network: NetworkConfig; }; } @@ -78,8 +78,8 @@ export type ConfigAction = | ChangeNodeAction | ChangeLanguageAction | ToggleOfflineAction + | ToggleAutoGasLimitAction | PollOfflineStatus - | ForceOfflineAction | ChangeNodeIntentAction | AddCustomNodeAction | RemoveCustomNodeAction diff --git a/common/actions/config/constants.ts b/common/actions/config/constants.ts index dff08434..58fa8e15 100644 --- a/common/actions/config/constants.ts +++ b/common/actions/config/constants.ts @@ -3,7 +3,7 @@ export enum TypeKeys { CONFIG_NODE_CHANGE = 'CONFIG_NODE_CHANGE', CONFIG_NODE_CHANGE_INTENT = 'CONFIG_NODE_CHANGE_INTENT', CONFIG_TOGGLE_OFFLINE = 'CONFIG_TOGGLE_OFFLINE', - CONFIG_FORCE_OFFLINE = 'CONFIG_FORCE_OFFLINE', + CONFIG_TOGGLE_AUTO_GAS_LIMIT = 'CONFIG_TOGGLE_AUTO_GAS_LIMIT', CONFIG_POLL_OFFLINE_STATUS = 'CONFIG_POLL_OFFLINE_STATUS', CONFIG_ADD_CUSTOM_NODE = 'CONFIG_ADD_CUSTOM_NODE', CONFIG_REMOVE_CUSTOM_NODE = 'CONFIG_REMOVE_CUSTOM_NODE', diff --git a/common/actions/ens/actionCreators.ts b/common/actions/ens/actionCreators.ts deleted file mode 100644 index 7bfb11c7..00000000 --- a/common/actions/ens/actionCreators.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as interfaces from './actionTypes'; -import * as constants from './constants'; - -export function resolveEnsName(name: string): interfaces.ResolveEnsNameAction { - return { - type: constants.ENS_RESOLVE, - payload: name - }; -} - -export function cacheEnsAddress( - ensName: string, - address: string -): interfaces.CacheEnsAddressAction { - return { - type: constants.ENS_CACHE, - payload: { - ensName, - address - } - }; -} diff --git a/common/actions/ens/actionCreators/index.ts b/common/actions/ens/actionCreators/index.ts new file mode 100644 index 00000000..9ea71985 --- /dev/null +++ b/common/actions/ens/actionCreators/index.ts @@ -0,0 +1 @@ +export * from './resolveDomain'; diff --git a/common/actions/ens/actionCreators/resolveDomain.ts b/common/actions/ens/actionCreators/resolveDomain.ts new file mode 100644 index 00000000..c402ed24 --- /dev/null +++ b/common/actions/ens/actionCreators/resolveDomain.ts @@ -0,0 +1,35 @@ +import * as ActionTypes from '../actionTypes'; +import { TypeKeys } from '../constants'; +import { DomainRequest } from 'libs/ens'; +import { ResolveDomainCached } from 'actions/ens'; + +export type TResolveDomainRequested = typeof resolveDomainRequested; +export const resolveDomainRequested = (domain: string): ActionTypes.ResolveDomainRequested => ({ + type: TypeKeys.ENS_RESOLVE_DOMAIN_REQUESTED, + payload: { domain } +}); + +export const resolveDomainCached = ( + payload: ResolveDomainCached['payload'] +): ResolveDomainCached => ({ + type: TypeKeys.ENS_RESOLVE_DOMAIN_CACHED, + payload +}); + +export type TResolveDomainSucceeded = typeof resolveDomainSucceeded; +export const resolveDomainSucceeded = ( + domain: string, + domainData: DomainRequest +): ActionTypes.ResolveDomainSucceeded => ({ + type: TypeKeys.ENS_RESOLVE_DOMAIN_SUCCEEDED, + payload: { domain, domainData } +}); + +export type TResolveDomainFailed = typeof resolveDomainFailed; +export const resolveDomainFailed = ( + domain: string, + error: Error +): ActionTypes.ResolveDomainFailed => ({ + type: TypeKeys.ENS_RESOLVE_DOMAIN_FAILED, + payload: { domain, error } +}); diff --git a/common/actions/ens/actionTypes.ts b/common/actions/ens/actionTypes.ts deleted file mode 100644 index d87a9445..00000000 --- a/common/actions/ens/actionTypes.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*** Resolve ENS name ***/ -export interface ResolveEnsNameAction { - type: 'ENS_RESOLVE'; - payload: string; -} - -/*** Cache ENS address ***/ -export interface CacheEnsAddressAction { - type: 'ENS_CACHE'; - payload: { - ensName: string; - address: string; - }; -} - -/*** Union Type ***/ -export type EnsAction = ResolveEnsNameAction | CacheEnsAddressAction; diff --git a/common/actions/ens/actionTypes/actionTypes.ts b/common/actions/ens/actionTypes/actionTypes.ts new file mode 100644 index 00000000..22b4ce18 --- /dev/null +++ b/common/actions/ens/actionTypes/actionTypes.ts @@ -0,0 +1,5 @@ +import { ResolveDomainAction } from './resolveDomain'; + +export * from './resolveDomain'; + +export type EnsAction = ResolveDomainAction; diff --git a/common/actions/ens/actionTypes/index.ts b/common/actions/ens/actionTypes/index.ts new file mode 100644 index 00000000..3eb256de --- /dev/null +++ b/common/actions/ens/actionTypes/index.ts @@ -0,0 +1 @@ +export * from './actionTypes'; diff --git a/common/actions/ens/actionTypes/resolveDomain.ts b/common/actions/ens/actionTypes/resolveDomain.ts new file mode 100644 index 00000000..aab2d357 --- /dev/null +++ b/common/actions/ens/actionTypes/resolveDomain.ts @@ -0,0 +1,28 @@ +import { TypeKeys } from '../constants'; +import { DomainRequest } from 'libs/ens'; + +export interface ResolveDomainRequested { + type: TypeKeys.ENS_RESOLVE_DOMAIN_REQUESTED; + payload: { domain: string }; +} + +export interface ResolveDomainSucceeded { + type: TypeKeys.ENS_RESOLVE_DOMAIN_SUCCEEDED; + payload: { domain: string; domainData: DomainRequest }; +} + +export interface ResolveDomainCached { + type: TypeKeys.ENS_RESOLVE_DOMAIN_CACHED; + payload: { domain: string }; +} + +export interface ResolveDomainFailed { + type: TypeKeys.ENS_RESOLVE_DOMAIN_FAILED; + payload: { domain: string; error: Error }; +} + +export type ResolveDomainAction = + | ResolveDomainRequested + | ResolveDomainSucceeded + | ResolveDomainFailed + | ResolveDomainCached; diff --git a/common/actions/ens/constants.ts b/common/actions/ens/constants.ts index 2948a37a..6a752c30 100644 --- a/common/actions/ens/constants.ts +++ b/common/actions/ens/constants.ts @@ -1,2 +1,6 @@ -export const ENS_RESOLVE = 'ENS_RESOLVE'; -export const ENS_CACHE = 'ENS_CACHE'; +export enum TypeKeys { + ENS_RESOLVE_DOMAIN_REQUESTED = 'ENS_RESOLVE_DOMAIN_REQUESTED', + ENS_RESOLVE_DOMAIN_SUCCEEDED = 'ENS_RESOLVE_DOMAIN_SUCCEEDED', + ENS_RESOLVE_DOMAIN_CACHED = 'ENS_RESOLVE_DOMAIN_CACHED', + ENS_RESOLVE_DOMAIN_FAILED = 'ENS_RESOLVE_DOMAIN_FAILED' +} diff --git a/common/actions/onboardStatus/actionCreators.ts b/common/actions/onboardStatus/actionCreators.ts new file mode 100644 index 00000000..fc0a40a9 --- /dev/null +++ b/common/actions/onboardStatus/actionCreators.ts @@ -0,0 +1,31 @@ +import * as interfaces from './actionTypes'; +import { TypeKeys } from './constants'; + +export type TStartOnboardSession = typeof startOnboardSession; +export function startOnboardSession(): interfaces.StartOnboardSessionAction { + return { + type: TypeKeys.START_ONBOARD_SESSION + }; +} + +export type TResumeSlide = typeof resumeSlide; +export function resumeSlide(slideNumber: number): interfaces.ResumeSlideAction { + return { + type: TypeKeys.RESUME_SLIDE, + slideNumber + }; +} + +export type TDecrementSlide = typeof decrementSlide; +export function decrementSlide(): interfaces.DecrementSlideAction { + return { + type: TypeKeys.DECREMENT_SLIDE + }; +} + +export type TIncrementSlide = typeof incrementSlide; +export function incrementSlide(): interfaces.IncrementSlideAction { + return { + type: TypeKeys.INCREMENT_SLIDE + }; +} diff --git a/common/actions/onboardStatus/actionTypes.ts b/common/actions/onboardStatus/actionTypes.ts new file mode 100644 index 00000000..a2eae24b --- /dev/null +++ b/common/actions/onboardStatus/actionTypes.ts @@ -0,0 +1,24 @@ +import { TypeKeys } from './constants'; + +export interface StartOnboardSessionAction { + type: TypeKeys.START_ONBOARD_SESSION; +} + +export interface ResumeSlideAction { + type: TypeKeys.RESUME_SLIDE; + slideNumber: number; +} + +export interface DecrementSlideAction { + type: TypeKeys.DECREMENT_SLIDE; +} + +export interface IncrementSlideAction { + type: TypeKeys.INCREMENT_SLIDE; +} + +export type OnboardStatusAction = + | StartOnboardSessionAction + | ResumeSlideAction + | DecrementSlideAction + | IncrementSlideAction; diff --git a/common/actions/onboardStatus/constants.ts b/common/actions/onboardStatus/constants.ts new file mode 100644 index 00000000..859e539a --- /dev/null +++ b/common/actions/onboardStatus/constants.ts @@ -0,0 +1,6 @@ +export enum TypeKeys { + START_ONBOARD_SESSION = 'START_ONBOARD_SESSION', + RESUME_SLIDE = 'RESUME_SLIDE', + DECREMENT_SLIDE = 'DECREMENT_SLIDE', + INCREMENT_SLIDE = 'INCREMENT_SLIDE' +} diff --git a/common/actions/onboardStatus/index.ts b/common/actions/onboardStatus/index.ts new file mode 100644 index 00000000..2608a18e --- /dev/null +++ b/common/actions/onboardStatus/index.ts @@ -0,0 +1,2 @@ +export * from './actionTypes'; +export * from './actionCreators'; diff --git a/common/actions/transaction/actionCreators/network.ts b/common/actions/transaction/actionCreators/network.ts index f6c5fd28..94aa6f25 100644 --- a/common/actions/transaction/actionCreators/network.ts +++ b/common/actions/transaction/actionCreators/network.ts @@ -1,7 +1,8 @@ import { + TypeKeys, EstimateGasFailedAction, EstimateGasRequestedAction, - TypeKeys, + EstimateGasTimeoutAction, EstimateGasSucceededAction, GetFromRequestedAction, GetFromSucceededAction, @@ -29,6 +30,11 @@ const estimateGasFailed = (): EstimateGasFailedAction => ({ type: TypeKeys.ESTIMATE_GAS_FAILED }); +type TEstimateGasTimedout = typeof estimateGasTimedout; +const estimateGasTimedout = (): EstimateGasTimeoutAction => ({ + type: TypeKeys.ESTIMATE_GAS_TIMEDOUT +}); + type TGetFromRequested = typeof getFromRequested; const getFromRequested = (): GetFromRequestedAction => ({ type: TypeKeys.GET_FROM_REQUESTED @@ -63,6 +69,7 @@ const getNonceFailed = (): GetNonceFailedAction => ({ export { estimateGasRequested, estimateGasFailed, + estimateGasTimedout, estimateGasSucceeded, getFromRequested, getFromSucceeded, @@ -73,6 +80,7 @@ export { TEstimateGasRequested, TEstimateGasFailed, TEstimateGasSucceeded, + TEstimateGasTimedout, TGetFromRequested, TGetFromSucceeded, TGetNonceRequested, diff --git a/common/actions/transaction/actionTypes/fields.ts b/common/actions/transaction/actionTypes/fields.ts index 3ca3cb1d..c390844b 100644 --- a/common/actions/transaction/actionTypes/fields.ts +++ b/common/actions/transaction/actionTypes/fields.ts @@ -52,7 +52,6 @@ interface SetToFieldAction { payload: { raw: string; value: Address | null; - error?: string | null; }; } diff --git a/common/actions/transaction/actionTypes/meta.ts b/common/actions/transaction/actionTypes/meta.ts index 3ec3f068..3550d79f 100644 --- a/common/actions/transaction/actionTypes/meta.ts +++ b/common/actions/transaction/actionTypes/meta.ts @@ -7,7 +7,6 @@ interface SetTokenToMetaAction { payload: { raw: string; value: Address | null; - error?: string | null; }; } diff --git a/common/actions/transaction/actionTypes/network.ts b/common/actions/transaction/actionTypes/network.ts index eee14f59..ac660fa2 100644 --- a/common/actions/transaction/actionTypes/network.ts +++ b/common/actions/transaction/actionTypes/network.ts @@ -11,6 +11,9 @@ interface EstimateGasSucceededAction { interface EstimateGasFailedAction { type: TypeKeys.ESTIMATE_GAS_FAILED; } +interface EstimateGasTimeoutAction { + type: TypeKeys.ESTIMATE_GAS_TIMEDOUT; +} interface GetFromRequestedAction { type: TypeKeys.GET_FROM_REQUESTED; } @@ -36,6 +39,7 @@ type NetworkAction = | EstimateGasFailedAction | EstimateGasRequestedAction | EstimateGasSucceededAction + | EstimateGasTimeoutAction | GetFromRequestedAction | GetFromSucceededAction | GetFromFailedAction @@ -47,6 +51,7 @@ export { EstimateGasRequestedAction, EstimateGasSucceededAction, EstimateGasFailedAction, + EstimateGasTimeoutAction, GetFromRequestedAction, GetFromSucceededAction, GetFromFailedAction, diff --git a/common/actions/transaction/constants.ts b/common/actions/transaction/constants.ts index 4988575c..8c8008d7 100644 --- a/common/actions/transaction/constants.ts +++ b/common/actions/transaction/constants.ts @@ -2,6 +2,7 @@ export enum TypeKeys { ESTIMATE_GAS_REQUESTED = 'ESTIMATE_GAS_REQUESTED', ESTIMATE_GAS_SUCCEEDED = 'ESTIMATE_GAS_SUCCEEDED', ESTIMATE_GAS_FAILED = 'ESTIMATE_GAS_FAILED', + ESTIMATE_GAS_TIMEDOUT = 'ESTIMATE_GAS_TIMEDOUT', GET_FROM_REQUESTED = 'GET_FROM_REQUESTED', GET_FROM_SUCCEEDED = 'GET_FROM_SUCCEEDED', diff --git a/common/actions/wallet/actionCreators.ts b/common/actions/wallet/actionCreators.ts index ce25069d..23ee04d4 100644 --- a/common/actions/wallet/actionCreators.ts +++ b/common/actions/wallet/actionCreators.ts @@ -43,12 +43,25 @@ export function setWallet(value: IWallet): types.SetWalletAction { }; } +export function setWalletPending(loadingStatus: boolean): types.SetWalletPendingAction { + return { + type: TypeKeys.WALLET_SET_PENDING, + payload: loadingStatus + }; +} + export function setBalancePending(): types.SetBalancePendingAction { return { type: TypeKeys.WALLET_SET_BALANCE_PENDING }; } +export function setPasswordPrompt(): types.SetPasswordPendingAction { + return { + type: TypeKeys.WALLET_SET_PASSWORD_PENDING + }; +} + export type TSetBalance = typeof setBalanceFullfilled; export function setBalanceFullfilled(value: Wei): types.SetBalanceFullfilledAction { return { diff --git a/common/actions/wallet/actionTypes.ts b/common/actions/wallet/actionTypes.ts index 2f02b354..f154f2e8 100644 --- a/common/actions/wallet/actionTypes.ts +++ b/common/actions/wallet/actionTypes.ts @@ -32,6 +32,11 @@ export interface ResetWalletAction { type: TypeKeys.WALLET_RESET; } +export interface SetWalletPendingAction { + type: TypeKeys.WALLET_SET_PENDING; + payload: boolean; +} + /*** Set Balance ***/ export interface SetBalancePendingAction { type: TypeKeys.WALLET_SET_BALANCE_PENDING; @@ -116,10 +121,15 @@ export interface SetWalletConfigAction { payload: WalletConfig; } +export interface SetPasswordPendingAction { + type: TypeKeys.WALLET_SET_PASSWORD_PENDING; +} + /*** Union Type ***/ export type WalletAction = | UnlockPrivateKeyAction | SetWalletAction + | SetWalletPendingAction | ResetWalletAction | SetBalancePendingAction | SetBalanceFullfilledAction @@ -132,4 +142,5 @@ export type WalletAction = | SetTokenBalanceRejectedAction | ScanWalletForTokensAction | SetWalletTokensAction - | SetWalletConfigAction; + | SetWalletConfigAction + | SetPasswordPendingAction; diff --git a/common/actions/wallet/constants.ts b/common/actions/wallet/constants.ts index bf2c547b..c1c2ff9d 100644 --- a/common/actions/wallet/constants.ts +++ b/common/actions/wallet/constants.ts @@ -10,11 +10,14 @@ export enum TypeKeys { WALLET_SET_TOKEN_BALANCES_PENDING = 'WALLET_SET_TOKEN_BALANCES_PENDING', WALLET_SET_TOKEN_BALANCES_FULFILLED = 'WALLET_SET_TOKEN_BALANCES_FULFILLED', WALLET_SET_TOKEN_BALANCES_REJECTED = 'WALLET_SET_TOKEN_BALANCES_REJECTED', + WALLET_SET_PENDING = 'WALLET_SET_PENDING', + WALLET_SET_NOT_PENDING = 'WALLET_SET_NOT_PENDING', WALLET_SET_TOKEN_BALANCE_PENDING = 'WALLET_SET_TOKEN_BALANCE_PENDING', WALLET_SET_TOKEN_BALANCE_FULFILLED = 'WALLET_SET_TOKEN_BALANCE_FULFILLED', WALLET_SET_TOKEN_BALANCE_REJECTED = 'WALLET_SET_TOKEN_BALANCE_REJECTED', WALLET_SCAN_WALLET_FOR_TOKENS = 'WALLET_SCAN_WALLET_FOR_TOKENS', WALLET_SET_WALLET_TOKENS = 'WALLET_SET_WALLET_TOKENS', WALLET_SET_CONFIG = 'WALLET_SET_CONFIG', - WALLET_RESET = 'WALLET_RESET' + WALLET_RESET = 'WALLET_RESET', + WALLET_SET_PASSWORD_PENDING = 'WALLET_SET_PASSWORD_PENDING' } diff --git a/common/api/shapeshift.ts b/common/api/shapeshift.ts index f24ccd6f..9ca6f9bf 100644 --- a/common/api/shapeshift.ts +++ b/common/api/shapeshift.ts @@ -53,7 +53,15 @@ class ShapeshiftService { headers: new Headers(this.postHeaders) }) .then(checkHttpStatus) - .then(parseJSON); + .then(parseJSON) + .catch(err => { + // CORS rejection, meaning metamask don't want us + if (err.name === 'TypeError') { + throw new Error( + 'Shapeshift has blocked this request, visit shapeshift.io for more information or contact support' + ); + } + }); } public getCoins() { diff --git a/common/assets/fonts/Lato-Bold.ttf b/common/assets/fonts/Lato-Bold.ttf deleted file mode 100755 index 29f691d5..00000000 Binary files a/common/assets/fonts/Lato-Bold.ttf and /dev/null differ diff --git a/common/assets/fonts/Lato-Bold.woff b/common/assets/fonts/Lato-Bold.woff old mode 100755 new mode 100644 diff --git a/common/assets/fonts/Lato-Bold.woff2 b/common/assets/fonts/Lato-Bold.woff2 new file mode 100644 index 00000000..e9d0b3f2 Binary files /dev/null and b/common/assets/fonts/Lato-Bold.woff2 differ diff --git a/common/assets/fonts/Lato-Light.ttf b/common/assets/fonts/Lato-Light.ttf deleted file mode 100755 index 834d1c05..00000000 Binary files a/common/assets/fonts/Lato-Light.ttf and /dev/null differ diff --git a/common/assets/fonts/Lato-Light.woff b/common/assets/fonts/Lato-Light.woff old mode 100755 new mode 100644 diff --git a/common/assets/fonts/Lato-Light.woff2 b/common/assets/fonts/Lato-Light.woff2 new file mode 100644 index 00000000..652fc098 Binary files /dev/null and b/common/assets/fonts/Lato-Light.woff2 differ diff --git a/common/assets/fonts/Lato-Regular.ttf b/common/assets/fonts/Lato-Regular.ttf deleted file mode 100755 index 74decd9e..00000000 Binary files a/common/assets/fonts/Lato-Regular.ttf and /dev/null differ diff --git a/common/assets/fonts/Lato-Regular.woff b/common/assets/fonts/Lato-Regular.woff old mode 100755 new mode 100644 diff --git a/common/assets/fonts/Lato-Regular.woff2 b/common/assets/fonts/Lato-Regular.woff2 new file mode 100644 index 00000000..597b8551 Binary files /dev/null and b/common/assets/fonts/Lato-Regular.woff2 differ diff --git a/common/assets/fonts/social-media.eot b/common/assets/fonts/social-media.eot deleted file mode 100644 index b17b3ff3..00000000 Binary files a/common/assets/fonts/social-media.eot and /dev/null differ diff --git a/common/assets/fonts/social-media.svg b/common/assets/fonts/social-media.svg deleted file mode 100644 index a903a42f..00000000 --- a/common/assets/fonts/social-media.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/common/assets/fonts/social-media.ttf b/common/assets/fonts/social-media.ttf deleted file mode 100644 index ea56ac6c..00000000 Binary files a/common/assets/fonts/social-media.ttf and /dev/null differ diff --git a/common/assets/images/onboarding_icon-01.svg b/common/assets/images/onboarding_icon-01.svg new file mode 100644 index 00000000..3a26533b --- /dev/null +++ b/common/assets/images/onboarding_icon-01.svg @@ -0,0 +1 @@ +onboarding_icon-01 \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-02.svg b/common/assets/images/onboarding_icon-02.svg new file mode 100644 index 00000000..8836f414 --- /dev/null +++ b/common/assets/images/onboarding_icon-02.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-03.svg b/common/assets/images/onboarding_icon-03.svg new file mode 100644 index 00000000..2966e1d3 --- /dev/null +++ b/common/assets/images/onboarding_icon-03.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-04.svg b/common/assets/images/onboarding_icon-04.svg new file mode 100644 index 00000000..6aaad3d8 --- /dev/null +++ b/common/assets/images/onboarding_icon-04.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-05.svg b/common/assets/images/onboarding_icon-05.svg new file mode 100644 index 00000000..2192d668 --- /dev/null +++ b/common/assets/images/onboarding_icon-05.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-06.svg b/common/assets/images/onboarding_icon-06.svg new file mode 100644 index 00000000..781c83d5 --- /dev/null +++ b/common/assets/images/onboarding_icon-06.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-07.svg b/common/assets/images/onboarding_icon-07.svg new file mode 100644 index 00000000..3505afb4 --- /dev/null +++ b/common/assets/images/onboarding_icon-07.svg @@ -0,0 +1 @@ +onboarding_icon-07 \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-08.svg b/common/assets/images/onboarding_icon-08.svg new file mode 100644 index 00000000..3e27f52a --- /dev/null +++ b/common/assets/images/onboarding_icon-08.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-09.svg b/common/assets/images/onboarding_icon-09.svg new file mode 100644 index 00000000..566a9337 --- /dev/null +++ b/common/assets/images/onboarding_icon-09.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/images/onboarding_icon-10.svg b/common/assets/images/onboarding_icon-10.svg new file mode 100644 index 00000000..11a47ca3 --- /dev/null +++ b/common/assets/images/onboarding_icon-10.svg @@ -0,0 +1 @@ +onboarding_icons \ No newline at end of file diff --git a/common/assets/styles/etherwallet-fonts.less b/common/assets/styles/etherwallet-fonts.less index dae83ee5..711faa4f 100755 --- a/common/assets/styles/etherwallet-fonts.less +++ b/common/assets/styles/etherwallet-fonts.less @@ -1,24 +1,23 @@ @font-face { font-family: 'Lato'; - src: url('../fonts/Lato-Light.woff') format('woff'), - url('../fonts/Lato-Light.ttf') format('truetype'); + src: url('../fonts/Lato-Light.woff2') format('woff2'), + url('../fonts/Lato-Light.woff') format('woff'); font-style: normal; font-weight: 300; } @font-face { font-family: 'Lato'; - src: url('../fonts/Lato-Regular.woff') format('woff'), - url('../fonts/Lato-Regular.ttf') format('truetype'); + src: url('../fonts/Lato-Regular.woff2') format('woff2'), + url('../fonts/Lato-Regular.woff') format('woff'); font-style: normal; font-weight: 400; } @font-face { font-family: 'Lato'; - src: url('../fonts/Lato-Bold.woff') format('woff'), - url('../fonts/Lato-Bold.ttf') format('truetype'); - + src: url('../fonts/Lato-Bold.woff2') format('woff2'), + url('../fonts/Lato-Bold.woff') format('woff'); font-style: normal; font-weight: 700; -} \ No newline at end of file +} diff --git a/common/components/AddressField.tsx b/common/components/AddressField.tsx index e1721703..28d97b5d 100644 --- a/common/components/AddressField.tsx +++ b/common/components/AddressField.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { AddressFieldFactory } from './AddressFieldFactory'; import { donationAddressMap } from 'config/data'; -import { Aux } from 'components/ui'; interface Props { isReadOnly?: boolean; @@ -9,8 +8,8 @@ interface Props { export const AddressField: React.SFC = ({ isReadOnly }) => ( ( - + withProps={({ currentTo, isValid, onChange, readOnly }) => ( + = ({ isReadOnly }) => ( readOnly={!!(isReadOnly || readOnly)} onChange={onChange} /> - {errorMsg && ( -
- {errorMsg} -
- )} -
+ )} /> ); diff --git a/common/components/AddressFieldFactory/AddressFieldFactory.tsx b/common/components/AddressFieldFactory/AddressFieldFactory.tsx index 698a7cfc..70dd5cee 100644 --- a/common/components/AddressFieldFactory/AddressFieldFactory.tsx +++ b/common/components/AddressFieldFactory/AddressFieldFactory.tsx @@ -18,14 +18,12 @@ export interface CallbackProps { isValid: boolean; readOnly: boolean; currentTo: ICurrentTo; - errorMsg?: string | null; onChange(ev: React.FormEvent): void; } -type Props = DispatchProps & DispatchProps & OwnProps; +type Props = DispatchProps & OwnProps; -//TODO: add ens resolving -class AddressFieldFactoryClass extends React.Component { +class AddressFieldFactoryClass extends React.Component { public componentDidMount() { // this 'to' parameter can be either token or actual field related const { to } = this.props; @@ -44,14 +42,17 @@ class AddressFieldFactoryClass extends React.Component { }; } -const AddressField = connect(null, { setCurrentTo })(AddressFieldFactoryClass); +const AddressFieldFactory = connect(null, { setCurrentTo })(AddressFieldFactoryClass); interface DefaultAddressFieldProps { withProps(props: CallbackProps): React.ReactElement | null; } const DefaultAddressField: React.SFC = ({ withProps }) => ( - } /> + } + /> ); export { DefaultAddressField as AddressFieldFactory }; diff --git a/common/components/AddressFieldFactory/AddressInputFactory.tsx b/common/components/AddressFieldFactory/AddressInputFactory.tsx index 3b868d17..bb00ddd2 100644 --- a/common/components/AddressFieldFactory/AddressInputFactory.tsx +++ b/common/components/AddressFieldFactory/AddressInputFactory.tsx @@ -1,29 +1,51 @@ import React, { Component } from 'react'; -import { Identicon } from 'components/ui'; +import { Identicon, Spinner } from 'components/ui'; import translate from 'translations'; -//import { EnsAddress } from './components'; import { Query } from 'components/renderCbs'; import { ICurrentTo, getCurrentTo, isValidCurrentTo } from 'selectors/transaction'; import { connect } from 'react-redux'; import { AppState } from 'reducers'; import { CallbackProps } from 'components/AddressFieldFactory'; +import { addHexPrefix } from 'ethereumjs-util'; +import { getResolvingDomain } from 'selectors/ens'; +import { isValidENSAddress } from 'libs/validators'; interface StateProps { currentTo: ICurrentTo; isValid: boolean; + isResolving: boolean; } + interface OwnProps { onChange(ev: React.FormEvent): void; withProps(props: CallbackProps): React.ReactElement | null; } +const ENSStatus: React.SFC<{ isLoading: boolean; ensAddress: string; rawAddress: string }> = ({ + isLoading, + ensAddress, + rawAddress +}) => { + const isENS = isValidENSAddress(ensAddress); + const text = 'Loading ENS address...'; + if (isLoading) { + return ( + <> + {text} + + ); + } else { + return isENS ? <>{`Resolved Address: ${rawAddress}`} : null; + } +}; + type Props = OwnProps & StateProps; -//TODO: ENS handling class AddressInputFactoryClass extends Component { public render() { - const { currentTo, onChange, isValid, withProps } = this.props; - const { raw } = currentTo; + const { currentTo, onChange, isValid, withProps, isResolving } = this.props; + const { value } = currentTo; + const addr = addHexPrefix(value ? value.toString('hex') : '0'); return (
@@ -35,15 +57,14 @@ class AddressInputFactoryClass extends Component { currentTo, isValid, onChange, - readOnly: !!readOnly, - errorMsg: currentTo.error + readOnly: !!readOnly || this.props.isResolving }) } /> - {/**/} +
- +
); @@ -52,5 +73,6 @@ class AddressInputFactoryClass extends Component { export const AddressInputFactory = connect((state: AppState) => ({ currentTo: getCurrentTo(state), + isResolving: getResolvingDomain(state), isValid: isValidCurrentTo(state) }))(AddressInputFactoryClass); diff --git a/common/components/AddressFieldFactory/components/EnsAddress.tsx b/common/components/AddressFieldFactory/components/EnsAddress.tsx deleted file mode 100644 index b26084e4..00000000 --- a/common/components/AddressFieldFactory/components/EnsAddress.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -/* - - public onChange = (e: React.SyntheticEvent) => { - const newValue = (e.target as HTMLInputElement).value; - const { onChange } = this.props; - if (!onChange) { - return; - } - // FIXME debounce? - if (isValidENSAddress(newValue)) { - this.props.resolveEnsName(newValue); - } - onChange(newValue); - }; -} -function mapStateToProps(state: AppState, props: PublicProps) { - return { - ensAddress: getEnsAddress(state, props.value) - }; -} -export default connect(mapStateToProps, { resolveEnsName })(AddressField); -*/ - -interface EnsAddressProps { - ensAddress: string | null; -} - -export const EnsAddress: React.SFC = ({ ensAddress }) => - (!!ensAddress && ( -

- ↳ - {ensAddress} -

- )) || - null; diff --git a/common/components/AddressFieldFactory/components/index.ts b/common/components/AddressFieldFactory/components/index.ts deleted file mode 100644 index ee054d13..00000000 --- a/common/components/AddressFieldFactory/components/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './EnsAddress'; diff --git a/common/components/AmountField.tsx b/common/components/AmountField.tsx index aaaed0b0..3a215fe3 100644 --- a/common/components/AmountField.tsx +++ b/common/components/AmountField.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { AmountFieldFactory } from './AmountFieldFactory'; -import { Aux } from 'components/ui'; import { UnitDropDown } from 'components'; import translate, { translateRaw } from 'translations'; @@ -17,7 +16,7 @@ export const AmountField: React.SFC = ({ }) => ( ( - +
= ({ /> {hasUnitDropdown && }
-
+ )} /> ); diff --git a/common/components/BalanceSidebar/AccountInfo.scss b/common/components/BalanceSidebar/AccountInfo.scss index cfc42bac..1286d6a0 100644 --- a/common/components/BalanceSidebar/AccountInfo.scss +++ b/common/components/BalanceSidebar/AccountInfo.scss @@ -1,5 +1,5 @@ -@import "common/sass/variables"; -@import "common/sass/mixins"; +@import 'common/sass/variables'; +@import 'common/sass/mixins'; .AccountInfo { &-section { @@ -22,18 +22,35 @@ &-address { @include clearfix; + &-section { + display: flex; + max-width: 100%; + flex-direction: row; + flex-wrap: nowrap; + } + + &-wrapper { + max-width: calc(100% - 44px - 24px); + } + &-icon { - float: left; width: 44px; height: 44px; margin-right: $space-md; } &-addr { - width: 100%; word-wrap: break-word; @include mono; } + + &-confirm { + display: flex; + align-items: center; + .Spinner { + margin-right: 16px; + } + } } &-list { @@ -53,10 +70,8 @@ .account-info { padding-left: 1em; margin: 0; - li { - } table { - font-weight: 200; + font-weight: 300; border-bottom: 0; min-width: 200px; td { diff --git a/common/components/BalanceSidebar/AccountInfo.tsx b/common/components/BalanceSidebar/AccountInfo.tsx index 074a2188..059d1c6f 100644 --- a/common/components/BalanceSidebar/AccountInfo.tsx +++ b/common/components/BalanceSidebar/AccountInfo.tsx @@ -1,6 +1,6 @@ import { Identicon, UnitDisplay } from 'components/ui'; import { NetworkConfig } from 'config/data'; -import { IWallet, Balance } from 'libs/wallet'; +import { IWallet, Balance, TrezorWallet, LedgerWallet } from 'libs/wallet'; import React from 'react'; import translate from 'translations'; import './AccountInfo.scss'; @@ -15,11 +15,13 @@ interface Props { interface State { showLongBalance: boolean; address: string; + confirmAddr: boolean; } export default class AccountInfo extends React.Component { public state = { showLongBalance: false, - address: '' + address: '', + confirmAddr: false }; public async setAddressFromWallet() { @@ -37,6 +39,12 @@ export default class AccountInfo extends React.Component { this.setAddressFromWallet(); } + public toggleConfirmAddr = () => { + this.setState(state => { + return { confirmAddr: !state.confirmAddr }; + }); + }; + public toggleShowLongBalance = (e: React.FormEvent) => { e.preventDefault(); this.setState(state => { @@ -48,21 +56,46 @@ export default class AccountInfo extends React.Component { public render() { const { network, balance } = this.props; + const { address, showLongBalance, confirmAddr } = this.state; const { blockExplorer, tokenExplorer } = network; - const { address, showLongBalance } = this.state; - + const wallet = this.props.wallet as LedgerWallet | TrezorWallet; return (
-
-
{translate('sidebar_AccountAddr')}
-
-
- -
+
{translate('sidebar_AccountAddr')}
+
+
+ +
+
{address}
+ {typeof wallet.displayAddress === 'function' && ( + + )} +
{translate('sidebar_AccountBal')}
    @@ -93,14 +126,22 @@ export default class AccountInfo extends React.Component {
      {!!blockExplorer && (
    • - + {`${network.name} (${blockExplorer.name})`}
    • )} {!!tokenExplorer && (
    • - + {`Tokens (${tokenExplorer.name})`}
    • diff --git a/common/components/BalanceSidebar/EquivalentValues.scss b/common/components/BalanceSidebar/EquivalentValues.scss index 095651cf..9e4256fb 100644 --- a/common/components/BalanceSidebar/EquivalentValues.scss +++ b/common/components/BalanceSidebar/EquivalentValues.scss @@ -40,4 +40,9 @@ text-align: center; } } + + &-offline { + margin-bottom: 0; + text-align: center; + } } diff --git a/common/components/BalanceSidebar/EquivalentValues.tsx b/common/components/BalanceSidebar/EquivalentValues.tsx index afd88972..ed885a91 100644 --- a/common/components/BalanceSidebar/EquivalentValues.tsx +++ b/common/components/BalanceSidebar/EquivalentValues.tsx @@ -5,6 +5,7 @@ import { State } from 'reducers/rates'; import { rateSymbols, TFetchCCRates } from 'actions/rates'; import { TokenBalance } from 'selectors/wallet'; import { Balance } from 'libs/wallet'; +import { NetworkConfig } from 'config/data'; import { ETH_DECIMAL, convertTokenBase } from 'libs/units'; import Spinner from 'components/ui/Spinner'; import UnitDisplay from 'components/ui/UnitDisplay'; @@ -18,6 +19,8 @@ interface Props { rates: State['rates']; ratesError?: State['ratesError']; fetchCCRates: TFetchCCRates; + network: NetworkConfig; + isOffline: boolean; } interface CmpState { @@ -42,24 +45,30 @@ export default class EquivalentValues extends React.Component { } public componentWillReceiveProps(nextProps: Props) { - const { balance, tokenBalances } = this.props; - if (nextProps.balance !== balance || nextProps.tokenBalances !== tokenBalances) { + const { balance, tokenBalances, isOffline } = this.props; + if ( + nextProps.balance !== balance || + nextProps.tokenBalances !== tokenBalances || + nextProps.isOffline !== isOffline + ) { this.makeBalanceLookup(nextProps); this.fetchRates(nextProps); } } public render() { - const { balance, tokenBalances, rates, ratesError } = this.props; + const { balance, tokenBalances, rates, ratesError, isOffline, network } = this.props; const { currency } = this.state; // There are a bunch of reasons why the incorrect balances might be rendered // while we have incomplete data that's being fetched. const isFetching = !balance || balance.isPending || !tokenBalances || Object.keys(rates).length === 0; + // Currency exists in rates or the all option is selected + const rateExistsOrAll = rates[currency] || currency === ALL_OPTION; let valuesEl; - if (!isFetching && (rates[currency] || currency === ALL_OPTION)) { + if (!isFetching && rateExistsOrAll && !network.isTestnet) { const values = this.getEquivalentValues(currency); valuesEl = rateSymbols.map(key => { if (!values[key] || key === currency) { @@ -80,6 +89,14 @@ export default class EquivalentValues extends React.Component { ); }); + } else if (network.isTestnet) { + valuesEl = ( +
      +
      + On test network, equivalent values will not be displayed. +
      +
      + ); } else if (ratesError) { valuesEl =
      {ratesError}
      ; } else if (tokenBalances && tokenBalances.length === 0) { @@ -118,7 +135,13 @@ export default class EquivalentValues extends React.Component { -
        {valuesEl}
      + {isOffline ? ( +
      + Equivalent values are unavailable offline +
      + ) : ( +
        {valuesEl}
      + )}
); } @@ -142,8 +165,8 @@ export default class EquivalentValues extends React.Component { } private fetchRates(props: Props) { - // Duck out if we haven't gotten balances yet - if (!props.balance || !props.tokenBalances) { + // Duck out if we haven't gotten balances yet, or we're not going to + if (!props.balance || !props.tokenBalances || props.isOffline) { return; } diff --git a/common/components/BalanceSidebar/Promos.tsx b/common/components/BalanceSidebar/Promos.tsx index 06693d12..6c4ac07c 100644 --- a/common/components/BalanceSidebar/Promos.tsx +++ b/common/components/BalanceSidebar/Promos.tsx @@ -58,6 +58,7 @@ export default class Promos extends React.Component<{}, State> { className="Promos-promo" key={promo.href} target="_blank" + rel="noopener noreferrer" href={promo.href} style={{ backgroundColor: promo.color }} > diff --git a/common/components/BalanceSidebar/TokenBalances/index.scss b/common/components/BalanceSidebar/TokenBalances/index.scss index 0405b778..435e384f 100644 --- a/common/components/BalanceSidebar/TokenBalances/index.scss +++ b/common/components/BalanceSidebar/TokenBalances/index.scss @@ -41,4 +41,9 @@ color: $gray; } } + + &-offline { + margin-bottom: 0; + text-align: center; + } } diff --git a/common/components/BalanceSidebar/TokenBalances/index.tsx b/common/components/BalanceSidebar/TokenBalances/index.tsx index fa2618de..735498f4 100644 --- a/common/components/BalanceSidebar/TokenBalances/index.tsx +++ b/common/components/BalanceSidebar/TokenBalances/index.tsx @@ -29,6 +29,7 @@ interface StateProps { tokensError: AppState['wallet']['tokensError']; isTokensLoading: AppState['wallet']['isTokensLoading']; hasSavedWalletTokens: AppState['wallet']['hasSavedWalletTokens']; + isOffline: AppState['config']['offline']; } interface ActionProps { addCustomToken: TAddCustomToken; @@ -46,13 +47,20 @@ class TokenBalances extends React.Component { tokenBalances, hasSavedWalletTokens, isTokensLoading, - tokensError + tokensError, + isOffline } = this.props; const walletTokens = walletConfig ? walletConfig.tokens : []; let content; - if (tokensError) { + if (isOffline) { + content = ( +
+ Token balances are unavailable offline +
+ ); + } else if (tokensError) { content =
{tokensError}
; } else if (isTokensLoading) { content = ( @@ -109,7 +117,8 @@ function mapStateToProps(state: AppState): StateProps { tokenBalances: getTokenBalances(state), tokensError: state.wallet.tokensError, isTokensLoading: state.wallet.isTokensLoading, - hasSavedWalletTokens: state.wallet.hasSavedWalletTokens + hasSavedWalletTokens: state.wallet.hasSavedWalletTokens, + isOffline: state.config.offline }; } diff --git a/common/components/BalanceSidebar/index.tsx b/common/components/BalanceSidebar/index.tsx index acba0611..ade5e0f9 100644 --- a/common/components/BalanceSidebar/index.tsx +++ b/common/components/BalanceSidebar/index.tsx @@ -19,6 +19,7 @@ interface Props { rates: AppState['rates']['rates']; ratesError: AppState['rates']['ratesError']; fetchCCRates: TFetchCCRates; + isOffline: AppState['config']['offline']; } interface Block { @@ -29,7 +30,7 @@ interface Block { export class BalanceSidebar extends React.Component { public render() { - const { wallet, balance, network, tokenBalances, rates, ratesError } = this.props; + const { wallet, balance, network, tokenBalances, rates, ratesError, isOffline } = this.props; if (!wallet) { return null; @@ -53,11 +54,13 @@ export class BalanceSidebar extends React.Component { name: 'Equivalent Values', content: ( ) } @@ -82,7 +85,8 @@ function mapStateToProps(state: AppState) { tokenBalances: getShownTokenBalances(state, true), network: getNetworkConfig(state), rates: state.rates.rates, - ratesError: state.rates.ratesError + ratesError: state.rates.ratesError, + isOffline: state.config.offline }; } diff --git a/common/components/ConfirmationModal/components/Amount.tsx b/common/components/ConfirmationModal/components/Amount.tsx index 44ac8c2f..a02d6e72 100644 --- a/common/components/ConfirmationModal/components/Amount.tsx +++ b/common/components/ConfirmationModal/components/Amount.tsx @@ -7,10 +7,12 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { AppState } from 'reducers'; import { getDecimal, getUnit } from 'selectors/transaction'; +import { getNetworkConfig } from 'selectors/config'; interface StateProps { unit: string; decimal: number; + network: AppState['config']['network']; } class AmountClass extends Component { @@ -20,14 +22,16 @@ class AmountClass extends Component { withSerializedTransaction={serializedTransaction => { const transactionInstance = makeTransaction(serializedTransaction); const { value, data } = getTransactionFields(transactionInstance); - const { decimal, unit } = this.props; + const { decimal, unit, network } = this.props; + const isToken = unit !== 'ether'; + const handledValue = isToken + ? TokenValue(ERC20.transfer.decodeInput(data)._value) + : Wei(value); return ( ); @@ -39,5 +43,6 @@ class AmountClass extends Component { export const Amount = connect((state: AppState) => ({ decimal: getDecimal(state), - unit: getUnit(state) + unit: getUnit(state), + network: getNetworkConfig(state) }))(AmountClass); diff --git a/common/components/ConfirmationModal/components/Details/Addresses.tsx b/common/components/ConfirmationModal/components/Details/Addresses.tsx index d5d38b22..6d5936c8 100644 --- a/common/components/ConfirmationModal/components/Details/Addresses.tsx +++ b/common/components/ConfirmationModal/components/Details/Addresses.tsx @@ -1,6 +1,5 @@ import { getTransactionFields, makeTransaction } from 'libs/transaction'; import { SerializedTransaction } from 'components/renderCbs'; -import { Aux } from 'components/ui'; import ERC20 from 'libs/erc20'; import { From } from '../From'; import React, { Component } from 'react'; @@ -21,7 +20,7 @@ class AddressesClass extends Component { const { to, data } = getTransactionFields(transactionInstance); return ( - +
  • You are sending from {from}} />
  • @@ -32,7 +31,7 @@ class AddressesClass extends Component { {this.props.unit === 'ether' ? to : ERC20.transfer.decodeInput(data)._to} -
    + ); }} /> diff --git a/common/components/DataField.tsx b/common/components/DataField.tsx index 61d3438a..c2bd4b92 100644 --- a/common/components/DataField.tsx +++ b/common/components/DataField.tsx @@ -1,32 +1,22 @@ import { DataFieldFactory } from './DataFieldFactory'; import React from 'react'; -import { Expandable, ExpandHandler } from 'components/ui'; import translate from 'translations'; import { donationAddressMap } from 'config/data'; -const expander = (expandHandler: ExpandHandler) => ( - -

    {translate('TRANS_advanced')}

    -
    -); - export const DataField: React.SFC<{}> = () => ( ( - -
    - - - -
    -
    + <> + + + )} /> ); diff --git a/common/components/ErrorScreen/index.tsx b/common/components/ErrorScreen/index.tsx index bb263c4f..643283b3 100644 --- a/common/components/ErrorScreen/index.tsx +++ b/common/components/ErrorScreen/index.tsx @@ -19,7 +19,7 @@ const ErrorScreen: React.SFC = ({ error }) => { Please contact{' '} support@myetherwallet.com diff --git a/common/components/ExtendedNotifications/TransactionSucceeded.tsx b/common/components/ExtendedNotifications/TransactionSucceeded.tsx index 8385db35..074da8d0 100644 --- a/common/components/ExtendedNotifications/TransactionSucceeded.tsx +++ b/common/components/ExtendedNotifications/TransactionSucceeded.tsx @@ -14,7 +14,12 @@ const TransactionSucceeded = ({ txHash, blockExplorer }: TransactionSucceededPro return ( diff --git a/common/components/Footer/index.scss b/common/components/Footer/index.scss index 866f031e..14907166 100644 --- a/common/components/Footer/index.scss +++ b/common/components/Footer/index.scss @@ -142,13 +142,6 @@ font-size: $font-size-small; margin: $space-sm 0; } - - @media screen and (max-width: $grid-float-breakpoint) { - .row { - margin-left: -0.5rem; - margin-right: -0.5rem; - } - } } .Modal { diff --git a/common/components/Footer/index.tsx b/common/components/Footer/index.tsx index 2bd98259..26c054b3 100644 --- a/common/components/Footer/index.tsx +++ b/common/components/Footer/index.tsx @@ -14,6 +14,7 @@ import './index.scss'; import PreFooter from './PreFooter'; import Modal, { IButton } from 'components/ui/Modal'; import { NewTabLink } from 'components/ui'; +import OnboardModal from 'containers/OnboardModal'; const AffiliateTag = ({ link, text }: Link) => { return ( @@ -125,6 +126,7 @@ export default class Footer extends React.Component { const buttons: IButton[] = [{ text: 'Okay', type: 'default', onClick: this.closeModal }]; return (
    +