diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js index a9635aea..fc3403c1 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js @@ -13,6 +13,7 @@ type DecodedTxData = { customTx?: boolean, creationTx?: boolean, data: string, + upgradeTx: boolean, } const getSafeVersion = (data: string) => { diff --git a/src/routes/safe/store/models/safe.js b/src/routes/safe/store/models/safe.js index 0637d9a2..65bcf9af 100644 --- a/src/routes/safe/store/models/safe.js +++ b/src/routes/safe/store/models/safe.js @@ -14,7 +14,7 @@ export type SafeProps = { blacklistedTokens: Set, ethBalance?: string, nonce: number, - latestIncomingTxBlock: number, + latestIncomingTxBlock?: number, recurringUser?: boolean, } diff --git a/src/routes/safe/store/models/transaction.js b/src/routes/safe/store/models/transaction.js index ce612a13..38f80869 100644 --- a/src/routes/safe/store/models/transaction.js +++ b/src/routes/safe/store/models/transaction.js @@ -16,6 +16,7 @@ export type TransactionStatus = | 'cancelled' | 'awaiting_execution' | 'pending' + | 'third-party-app' export type TransactionProps = { nonce: ?number, diff --git a/src/routes/safe/store/selectors/index.js b/src/routes/safe/store/selectors/index.js index 1c97370d..ef1f390a 100644 --- a/src/routes/safe/store/selectors/index.js +++ b/src/routes/safe/store/selectors/index.js @@ -1,7 +1,7 @@ // @flow import { List, Map, Set } from 'immutable' import { type Match, matchPath } from 'react-router-dom' -import { type Selector, createSelector, createStructuredSelector } from 'reselect' +import { type OutputSelector, createSelector, createStructuredSelector } from 'reselect' import { getWeb3 } from '~/logic/wallets/getWeb3' import { SAFELIST_ADDRESS, SAFE_PARAM_ADDRESS } from '~/routes/routes' @@ -37,17 +37,17 @@ const safesStateSelector = (state: GlobalState): Map => state[SAFE_RE export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID].get('safes') -export const safesListSelector: Selector> = createSelector( +export const safesListSelector: OutputSelector> = createSelector( safesMapSelector, (safes: Map): List => safes.toList(), ) -export const safesCountSelector: Selector = createSelector( +export const safesCountSelector: OutputSelector = createSelector( safesMapSelector, (safes: Map): number => safes.size, ) -export const defaultSafeSelector: Selector = createSelector( +export const defaultSafeSelector: OutputSelector = createSelector( safesStateSelector, (safeState: Map): string => safeState.get('defaultSafe'), ) @@ -67,7 +67,7 @@ export const safeParamAddressSelector = (state: GlobalState, props: RouterProps) return urlAdd ? getWeb3().utils.toChecksumAddress(urlAdd) : '' } -type TxSelectorType = Selector> +type TxSelectorType = OutputSelector> export const safeTransactionsSelector: TxSelectorType = createSelector( transactionsSelector, @@ -117,7 +117,7 @@ export const safeParamAddressFromStateSelector = (state: GlobalState): string => return match ? match.params.safeAddress : null } -type IncomingTxSelectorType = Selector> +type IncomingTxSelectorType = OutputSelector> export const safeIncomingTransactionsSelector: IncomingTxSelectorType = createSelector( incomingTransactionsSelector, @@ -135,7 +135,7 @@ export const safeIncomingTransactionsSelector: IncomingTxSelectorType = createSe }, ) -export const confirmationsTransactionSelector: Selector = createSelector( +export const confirmationsTransactionSelector: OutputSelector = createSelector( oneTransactionSelector, (tx: Transaction) => { if (!tx) { @@ -153,7 +153,7 @@ export const confirmationsTransactionSelector: Selector = createSelector( +export const safeSelector: OutputSelector = createSelector( safesMapSelector, safeParamAddressFromStateSelector, (safes: Map, address: string) => { @@ -167,7 +167,7 @@ export const safeSelector: Selector }, ) -export const safeActiveTokensSelector: Selector> = createSelector( +export const safeActiveTokensSelector: OutputSelector> = createSelector( safeSelector, (safe: Safe) => { if (!safe) { @@ -178,7 +178,7 @@ export const safeActiveTokensSelector: Selector> = createSelector( +export const safeBlacklistedTokensSelector: OutputSelector> = createSelector( safeSelector, (safe: Safe) => { if (!safe) { @@ -195,7 +195,7 @@ export const safeActiveTokensSelectorBySafe = (safeAddress: string, safes: Map): List => safes.get(safeAddress).get('blacklistedTokens') -export const safeBalancesSelector: Selector> = createSelector( +export const safeBalancesSelector: OutputSelector> = createSelector( safeSelector, (safe: Safe) => { if (!safe) { @@ -206,7 +206,7 @@ export const safeBalancesSelector: Selector> = createSelector( +export const getActiveTokensAddressesForAllSafes: OutputSelector> = createSelector( safesListSelector, (safes: List) => { const addresses = Set().withMutations(set => { @@ -221,7 +221,7 @@ export const getActiveTokensAddressesForAllSafes: Selector> = createSelector( +export const getBlacklistedTokensAddressesForAllSafes: OutputSelector> = createSelector( safesListSelector, (safes: List) => { const addresses = Set().withMutations(set => { diff --git a/src/store/index.js b/src/store/index.js index 6be5e822..01208a4f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,6 +1,6 @@ // @flow import { connectRouter, routerMiddleware } from 'connected-react-router' -import { createBrowserHistory } from 'history' +import { createHashHistory } from 'history' import { type CombinedReducer, type Store, applyMiddleware, combineReducers, compose, createStore } from 'redux' import thunk from 'redux-thunk' @@ -35,7 +35,7 @@ import transactions, { type State as TransactionsState, } from '~/routes/safe/store/reducer/transactions' -export const history = createBrowserHistory({ basename: '/app/' }) +export const history = createHashHistory({ hashType: 'slash' }) // eslint-disable-next-line const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose