|
|
@ -4,7 +4,7 @@ import getBuyEthUrl from '../../../app/scripts/lib/buy-eth-url' |
|
|
|
import { checksumAddress } from '../helpers/utils/util' |
|
|
|
import { checksumAddress } from '../helpers/utils/util' |
|
|
|
import { calcTokenBalance, estimateGas } from '../pages/send/send.utils' |
|
|
|
import { calcTokenBalance, estimateGas } from '../pages/send/send.utils' |
|
|
|
import ethUtil from 'ethereumjs-util' |
|
|
|
import ethUtil from 'ethereumjs-util' |
|
|
|
import { fetchLocale } from '../helpers/utils/i18n-helper' |
|
|
|
import { fetchLocale, loadRelativeTimeFormatLocaleData } from '../helpers/utils/i18n-helper' |
|
|
|
import { getMethodDataAsync } from '../helpers/utils/transactions.util' |
|
|
|
import { getMethodDataAsync } from '../helpers/utils/transactions.util' |
|
|
|
import { fetchSymbolAndDecimals } from '../helpers/utils/token-util' |
|
|
|
import { fetchSymbolAndDecimals } from '../helpers/utils/token-util' |
|
|
|
import switchDirection from '../helpers/utils/switch-direction' |
|
|
|
import switchDirection from '../helpers/utils/switch-direction' |
|
|
@ -1191,8 +1191,8 @@ export function showAccountDetail (address) { |
|
|
|
const activeTabOrigin = state.activeTab.origin |
|
|
|
const activeTabOrigin = state.activeTab.origin |
|
|
|
const selectedAddress = getSelectedAddress(state) |
|
|
|
const selectedAddress = getSelectedAddress(state) |
|
|
|
const permittedAccountsForCurrentTab = getPermittedAccountsForCurrentTab(state) |
|
|
|
const permittedAccountsForCurrentTab = getPermittedAccountsForCurrentTab(state) |
|
|
|
const currentTabIsConnectedToPreviousAddress = permittedAccountsForCurrentTab.includes(selectedAddress) |
|
|
|
const currentTabIsConnectedToPreviousAddress = Boolean(activeTabOrigin) && permittedAccountsForCurrentTab.includes(selectedAddress) |
|
|
|
const currentTabIsConnectedToNextAddress = permittedAccountsForCurrentTab.includes(address) |
|
|
|
const currentTabIsConnectedToNextAddress = Boolean(activeTabOrigin) && permittedAccountsForCurrentTab.includes(address) |
|
|
|
const switchingToUnconnectedAddress = currentTabIsConnectedToPreviousAddress && !currentTabIsConnectedToNextAddress |
|
|
|
const switchingToUnconnectedAddress = currentTabIsConnectedToPreviousAddress && !currentTabIsConnectedToNextAddress |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
@ -2012,8 +2012,9 @@ export function setIpfsGateway (val) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function updateCurrentLocale (key) { |
|
|
|
export function updateCurrentLocale (key) { |
|
|
|
return (dispatch) => { |
|
|
|
return async (dispatch) => { |
|
|
|
dispatch(showLoadingIndication()) |
|
|
|
dispatch(showLoadingIndication()) |
|
|
|
|
|
|
|
await loadRelativeTimeFormatLocaleData(key) |
|
|
|
return fetchLocale(key) |
|
|
|
return fetchLocale(key) |
|
|
|
.then((localeMessages) => { |
|
|
|
.then((localeMessages) => { |
|
|
|
log.debug(`background.setCurrentLocale`) |
|
|
|
log.debug(`background.setCurrentLocale`) |
|
|
|