fix: typos and types
This commit is contained in:
parent
5a02cbfc9a
commit
92ad62800e
|
@ -151,8 +151,7 @@ const createTransaction = ({
|
||||||
|
|
||||||
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
||||||
|
|
||||||
await saveTxToHistory({ ...txArgs, txHash, origin })
|
await Promise.all([saveTxToHistory({ ...txArgs, txHash, origin }), storeTx(mockedTx, safeAddress, dispatch)])
|
||||||
await storeTx(mockedTx, safeAddress, dispatch)
|
|
||||||
dispatch(fetchTransactions(safeAddress))
|
dispatch(fetchTransactions(safeAddress))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
removeTxFromStore(mockedTx, safeAddress, dispatch)
|
removeTxFromStore(mockedTx, safeAddress, dispatch)
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default handleActions(
|
||||||
// as we assume that this is the newest tx returned by the server
|
// as we assume that this is the newest tx returned by the server
|
||||||
map.setIn(keyPath, updateTx)
|
map.setIn(keyPath, updateTx)
|
||||||
} else {
|
} else {
|
||||||
// if there's no confirmations, we assume this is a mocked tx
|
// if there are no confirmations, we assume this is a mocked tx
|
||||||
// as txs without confirmation are not being returned by the server (?has_confirmations=true)
|
// as txs without confirmation are not being returned by the server (?has_confirmations=true)
|
||||||
map.mergeDeepIn(keyPath, updateTx)
|
map.mergeDeepIn(keyPath, updateTx)
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default handleActions(
|
||||||
// as we assume that this is the newest tx returned by the server
|
// as we assume that this is the newest tx returned by the server
|
||||||
txsList.update(storedTxIndex, () => updateTx)
|
txsList.update(storedTxIndex, () => updateTx)
|
||||||
} else {
|
} else {
|
||||||
// if there's no confirmations, we assume this is a mocked tx
|
// if there are no confirmations, we assume this is a mocked tx
|
||||||
// as txs without confirmation are not being returned by the server (?has_confirmations=true)
|
// as txs without confirmation are not being returned by the server (?has_confirmations=true)
|
||||||
txsList.update(storedTxIndex, (storedTx) => storedTx.mergeDeep(updateTx))
|
txsList.update(storedTxIndex, (storedTx) => storedTx.mergeDeep(updateTx))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { List, Set } from 'immutable'
|
import { List, Map, Set } from 'immutable'
|
||||||
import { matchPath } from 'react-router-dom'
|
import { matchPath } from 'react-router-dom'
|
||||||
import { createSelector } from 'reselect'
|
import { createSelector } from 'reselect'
|
||||||
|
|
||||||
|
@ -79,14 +79,14 @@ export const safeCancellationTransactionsSelector = createSelector(
|
||||||
safeParamAddressFromStateSelector,
|
safeParamAddressFromStateSelector,
|
||||||
(cancellationTransactions, address) => {
|
(cancellationTransactions, address) => {
|
||||||
if (!cancellationTransactions) {
|
if (!cancellationTransactions) {
|
||||||
return List([])
|
return Map()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!address) {
|
if (!address) {
|
||||||
return List([])
|
return Map()
|
||||||
}
|
}
|
||||||
|
|
||||||
return cancellationTransactions.get(address) || List([])
|
return cancellationTransactions.get(address) || Map({})
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue