Merge pull request #1844 from gnosis/release/v2.19.0
Merge release v2.19.0 back to development
This commit is contained in:
commit
cbb7fb855b
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "safe-react",
|
||||
"version": "2.18.1",
|
||||
"version": "2.19.1",
|
||||
"description": "Allowing crypto users manage funds in a safer way",
|
||||
"website": "https://github.com/gnosis/safe-react#readme",
|
||||
"bugs": {
|
||||
|
|
|
@ -21,6 +21,9 @@ export const TransactionFees = ({
|
|||
txEstimationExecutionStatus,
|
||||
}: TransactionFailTextProps): React.ReactElement | null => {
|
||||
let transactionAction
|
||||
if (txEstimationExecutionStatus === EstimationStatus.LOADING) {
|
||||
return null
|
||||
}
|
||||
if (isCreation) {
|
||||
transactionAction = 'create'
|
||||
} else if (isExecution) {
|
||||
|
|
|
@ -26,7 +26,7 @@ Sentry.init({
|
|||
dsn: SENTRY_DSN,
|
||||
release: `safe-react@${process.env.REACT_APP_APP_VERSION}`,
|
||||
integrations: [new Integrations.BrowserTracing()],
|
||||
sampleRate: 0.2,
|
||||
sampleRate: 0.01,
|
||||
})
|
||||
|
||||
const root = document.getElementById('root')
|
||||
|
|
|
@ -182,15 +182,17 @@ const calculateMinimumGasForTransaction = async (
|
|||
const amountOfGasToTryTx = txGasEstimation + dataGasEstimation + additionalGas
|
||||
console.info(`Estimating transaction creation with gas amount: ${amountOfGasToTryTx}`)
|
||||
try {
|
||||
await getGasEstimationTxResponse({
|
||||
const estimation = await getGasEstimationTxResponse({
|
||||
to: safeAddress,
|
||||
from: safeAddress,
|
||||
data: estimateData,
|
||||
gasPrice: 0,
|
||||
gas: amountOfGasToTryTx,
|
||||
})
|
||||
if (estimation > 0) {
|
||||
console.info(`Gas estimation successfully finished with gas amount: ${amountOfGasToTryTx}`)
|
||||
return amountOfGasToTryTx
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`Error trying to estimate gas with amount: ${amountOfGasToTryTx}`)
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import ThresholdForm from './screens/ThresholdForm'
|
|||
const styles = createStyles({
|
||||
biggerModalWindow: {
|
||||
width: '775px',
|
||||
minHeight: '500px',
|
||||
height: 'auto',
|
||||
},
|
||||
})
|
||||
|
|
|
@ -18,7 +18,6 @@ import { TxParameters } from 'src/routes/safe/container/hooks/useTransactionPara
|
|||
const styles = createStyles({
|
||||
biggerModalWindow: {
|
||||
width: '775px',
|
||||
minHeight: '500px',
|
||||
height: 'auto',
|
||||
},
|
||||
})
|
||||
|
|
|
@ -216,6 +216,7 @@ export const ReviewRemoveOwnerModal = ({
|
|||
isTransactionExecution={isExecution}
|
||||
/>
|
||||
|
||||
{txEstimationExecutionStatus === EstimationStatus.LOADING ? null : (
|
||||
<Block className={classes.gasCostsContainer}>
|
||||
<TransactionFees
|
||||
gasCostFormatted={gasCostFormatted}
|
||||
|
@ -224,8 +225,9 @@ export const ReviewRemoveOwnerModal = ({
|
|||
isOffChainSignature={isOffChainSignature}
|
||||
txEstimationExecutionStatus={txEstimationExecutionStatus}
|
||||
/>
|
||||
</Block>
|
||||
<Hairline />
|
||||
</Block>
|
||||
)}
|
||||
<Row align="center" className={classes.buttonRow}>
|
||||
<Button minHeight={42} minWidth={140} onClick={onClickBack}>
|
||||
Back
|
||||
|
|
|
@ -21,7 +21,6 @@ import { TxParameters } from 'src/routes/safe/container/hooks/useTransactionPara
|
|||
const styles = createStyles({
|
||||
biggerModalWindow: {
|
||||
width: '775px',
|
||||
minHeight: '500px',
|
||||
height: 'auto',
|
||||
},
|
||||
})
|
||||
|
|
|
@ -120,6 +120,8 @@ const calculateSpendingLimitsTxData = (
|
|||
if (transactions.length === 0) {
|
||||
spendingLimitTxData = setSpendingLimitTx({ spendingLimitArgs, safeAddress })
|
||||
} else {
|
||||
const encodedTxForMultisend = setSpendingLimitMultiSendTx({ spendingLimitArgs, safeAddress })
|
||||
transactions.push(encodedTxForMultisend)
|
||||
spendingLimitTxData = spendingLimitMultiSendTx({ transactions, safeAddress })
|
||||
}
|
||||
|
||||
|
@ -193,7 +195,7 @@ export const ReviewSpendingLimits = ({ onBack, onClose, txToken, values }: Revie
|
|||
ethGasLimit: ethGasLimit || gasLimit,
|
||||
}
|
||||
if (safeAddress) {
|
||||
const { spendingLimitTxData, transactions, spendingLimitArgs } = calculateSpendingLimitsTxData(
|
||||
const { spendingLimitTxData } = calculateSpendingLimitsTxData(
|
||||
safeAddress,
|
||||
spendingLimits,
|
||||
existentSpendingLimit,
|
||||
|
@ -201,12 +203,7 @@ export const ReviewSpendingLimits = ({ onBack, onClose, txToken, values }: Revie
|
|||
values,
|
||||
advancedOptionsTxParameters,
|
||||
)
|
||||
// if there's no tx for enable module or adding a delegate, then we avoid using multiSend Tx
|
||||
if (transactions.length === 0) {
|
||||
dispatch(createTransaction(spendingLimitTxData))
|
||||
return
|
||||
}
|
||||
transactions.push(setSpendingLimitMultiSendTx({ spendingLimitArgs, safeAddress }))
|
||||
|
||||
dispatch(createTransaction(spendingLimitTxData))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue