commit
9af8622c52
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "safe-react",
|
||||
"version": "2.19.1",
|
||||
"version": "2.19.2",
|
||||
"description": "Allowing crypto users manage funds in a safer way",
|
||||
"website": "https://github.com/gnosis/safe-react#readme",
|
||||
"bugs": {
|
||||
|
|
|
@ -18,7 +18,7 @@ import { SafeApp } from 'src/routes/safe/components/Apps/types.d'
|
|||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import createTransaction from 'src/logic/safe/store/actions/createTransaction'
|
||||
import { MULTI_SEND_ADDRESS } from 'src/logic/contracts/safeContracts'
|
||||
import { CALL, DELEGATE_CALL, TX_NOTIFICATION_TYPES } from 'src/logic/safe/transactions'
|
||||
import { DELEGATE_CALL, TX_NOTIFICATION_TYPES } from 'src/logic/safe/transactions'
|
||||
import { encodeMultiSendCall } from 'src/logic/safe/transactions/multisend'
|
||||
|
||||
import GasEstimationInfo from './GasEstimationInfo'
|
||||
|
@ -114,9 +114,14 @@ export const ConfirmTransactionModal = ({
|
|||
}: OwnProps): React.ReactElement | null => {
|
||||
const [estimatedSafeTxGas, setEstimatedSafeTxGas] = useState(0)
|
||||
const threshold = useSelector(safeThresholdSelector) || 1
|
||||
const txRecipient: string | undefined = useMemo(() => (txs.length > 1 ? MULTI_SEND_ADDRESS : txs[0]?.to), [txs])
|
||||
const txData: string | undefined = useMemo(() => (txs.length > 1 ? encodeMultiSendCall(txs) : txs[0]?.data), [txs])
|
||||
const operation = useMemo(() => (txs.length > 1 ? DELEGATE_CALL : CALL), [txs])
|
||||
// FIXME #issue-1848 check why this generates bugs with WalletConnect Safe app and some interactions
|
||||
// const txRecipient: string | undefined = useMemo(() => (txs.length > 1 ? MULTI_SEND_ADDRESS : txs[0]?.to), [txs])
|
||||
// const txData: string | undefined = useMemo(() => (txs.length > 1 ? encodeMultiSendCall(txs) : txs[0]?.data), [txs])
|
||||
// const operation = useMemo(() => (txs.length > 1 ? DELEGATE_CALL : CALL), [txs])
|
||||
// #issue-1848 Remove this when non multisend transactions are checked
|
||||
const txRecipient: string | undefined = MULTI_SEND_ADDRESS
|
||||
const txData: string | undefined = useMemo(() => encodeMultiSendCall(txs), [txs])
|
||||
const operation = DELEGATE_CALL
|
||||
|
||||
const {
|
||||
gasLimit,
|
||||
|
|
|
@ -13,7 +13,7 @@ import Row from 'src/components/layout/Row'
|
|||
import { styles } from './style'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
import { TxParameters } from 'src/routes/safe/container/hooks/useTransactionParameters'
|
||||
import { composeValidators, minValue } from 'src/components/forms/validator'
|
||||
import { minValue } from 'src/components/forms/validator'
|
||||
|
||||
import { ParametersStatus, areSafeParamsEnabled, areEthereumParamsEnabled } from '../utils'
|
||||
|
||||
|
@ -75,15 +75,7 @@ const formValidation = (values) => {
|
|||
|
||||
const safeNonceValidation = minValue(0, true)(safeNonce)
|
||||
|
||||
const safeTxGasValidation = composeValidators(minValue(0, true), (value: string) => {
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
|
||||
if (Number(value) > Number(ethGasLimit)) {
|
||||
return 'Bigger than Ethereum gas limit.'
|
||||
}
|
||||
})(safeTxGas)
|
||||
const safeTxGasValidation = minValue(0, true)(safeTxGas)
|
||||
|
||||
return {
|
||||
ethGasLimit: ethGasLimitValidation,
|
||||
|
|
Loading…
Reference in New Issue