Merge pull request #1844 from gnosis/release/v2.19.0

Merge release v2.19.0 back to development
This commit is contained in:
Daniel Sanchez 2021-02-03 08:49:13 +01:00 committed by GitHub
commit cbb7fb855b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 25 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "safe-react", "name": "safe-react",
"version": "2.18.1", "version": "2.19.1",
"description": "Allowing crypto users manage funds in a safer way", "description": "Allowing crypto users manage funds in a safer way",
"website": "https://github.com/gnosis/safe-react#readme", "website": "https://github.com/gnosis/safe-react#readme",
"bugs": { "bugs": {

View File

@ -21,6 +21,9 @@ export const TransactionFees = ({
txEstimationExecutionStatus, txEstimationExecutionStatus,
}: TransactionFailTextProps): React.ReactElement | null => { }: TransactionFailTextProps): React.ReactElement | null => {
let transactionAction let transactionAction
if (txEstimationExecutionStatus === EstimationStatus.LOADING) {
return null
}
if (isCreation) { if (isCreation) {
transactionAction = 'create' transactionAction = 'create'
} else if (isExecution) { } else if (isExecution) {

View File

@ -26,7 +26,7 @@ Sentry.init({
dsn: SENTRY_DSN, dsn: SENTRY_DSN,
release: `safe-react@${process.env.REACT_APP_APP_VERSION}`, release: `safe-react@${process.env.REACT_APP_APP_VERSION}`,
integrations: [new Integrations.BrowserTracing()], integrations: [new Integrations.BrowserTracing()],
sampleRate: 0.2, sampleRate: 0.01,
}) })
const root = document.getElementById('root') const root = document.getElementById('root')

View File

@ -182,15 +182,17 @@ const calculateMinimumGasForTransaction = async (
const amountOfGasToTryTx = txGasEstimation + dataGasEstimation + additionalGas const amountOfGasToTryTx = txGasEstimation + dataGasEstimation + additionalGas
console.info(`Estimating transaction creation with gas amount: ${amountOfGasToTryTx}`) console.info(`Estimating transaction creation with gas amount: ${amountOfGasToTryTx}`)
try { try {
await getGasEstimationTxResponse({ const estimation = await getGasEstimationTxResponse({
to: safeAddress, to: safeAddress,
from: safeAddress, from: safeAddress,
data: estimateData, data: estimateData,
gasPrice: 0, gasPrice: 0,
gas: amountOfGasToTryTx, gas: amountOfGasToTryTx,
}) })
console.info(`Gas estimation successfully finished with gas amount: ${amountOfGasToTryTx}`) if (estimation > 0) {
return amountOfGasToTryTx console.info(`Gas estimation successfully finished with gas amount: ${amountOfGasToTryTx}`)
return amountOfGasToTryTx
}
} catch (error) { } catch (error) {
console.log(`Error trying to estimate gas with amount: ${amountOfGasToTryTx}`) console.log(`Error trying to estimate gas with amount: ${amountOfGasToTryTx}`)
} }

View File

@ -21,7 +21,6 @@ import ThresholdForm from './screens/ThresholdForm'
const styles = createStyles({ const styles = createStyles({
biggerModalWindow: { biggerModalWindow: {
width: '775px', width: '775px',
minHeight: '500px',
height: 'auto', height: 'auto',
}, },
}) })

View File

@ -18,7 +18,6 @@ import { TxParameters } from 'src/routes/safe/container/hooks/useTransactionPara
const styles = createStyles({ const styles = createStyles({
biggerModalWindow: { biggerModalWindow: {
width: '775px', width: '775px',
minHeight: '500px',
height: 'auto', height: 'auto',
}, },
}) })

View File

@ -216,16 +216,18 @@ export const ReviewRemoveOwnerModal = ({
isTransactionExecution={isExecution} isTransactionExecution={isExecution}
/> />
<Block className={classes.gasCostsContainer}> {txEstimationExecutionStatus === EstimationStatus.LOADING ? null : (
<TransactionFees <Block className={classes.gasCostsContainer}>
gasCostFormatted={gasCostFormatted} <TransactionFees
isExecution={isExecution} gasCostFormatted={gasCostFormatted}
isCreation={isCreation} isExecution={isExecution}
isOffChainSignature={isOffChainSignature} isCreation={isCreation}
txEstimationExecutionStatus={txEstimationExecutionStatus} isOffChainSignature={isOffChainSignature}
/> txEstimationExecutionStatus={txEstimationExecutionStatus}
</Block> />
<Hairline /> <Hairline />
</Block>
)}
<Row align="center" className={classes.buttonRow}> <Row align="center" className={classes.buttonRow}>
<Button minHeight={42} minWidth={140} onClick={onClickBack}> <Button minHeight={42} minWidth={140} onClick={onClickBack}>
Back Back

View File

@ -21,7 +21,6 @@ import { TxParameters } from 'src/routes/safe/container/hooks/useTransactionPara
const styles = createStyles({ const styles = createStyles({
biggerModalWindow: { biggerModalWindow: {
width: '775px', width: '775px',
minHeight: '500px',
height: 'auto', height: 'auto',
}, },
}) })

View File

@ -120,6 +120,8 @@ const calculateSpendingLimitsTxData = (
if (transactions.length === 0) { if (transactions.length === 0) {
spendingLimitTxData = setSpendingLimitTx({ spendingLimitArgs, safeAddress }) spendingLimitTxData = setSpendingLimitTx({ spendingLimitArgs, safeAddress })
} else { } else {
const encodedTxForMultisend = setSpendingLimitMultiSendTx({ spendingLimitArgs, safeAddress })
transactions.push(encodedTxForMultisend)
spendingLimitTxData = spendingLimitMultiSendTx({ transactions, safeAddress }) spendingLimitTxData = spendingLimitMultiSendTx({ transactions, safeAddress })
} }
@ -193,7 +195,7 @@ export const ReviewSpendingLimits = ({ onBack, onClose, txToken, values }: Revie
ethGasLimit: ethGasLimit || gasLimit, ethGasLimit: ethGasLimit || gasLimit,
} }
if (safeAddress) { if (safeAddress) {
const { spendingLimitTxData, transactions, spendingLimitArgs } = calculateSpendingLimitsTxData( const { spendingLimitTxData } = calculateSpendingLimitsTxData(
safeAddress, safeAddress,
spendingLimits, spendingLimits,
existentSpendingLimit, existentSpendingLimit,
@ -201,12 +203,7 @@ export const ReviewSpendingLimits = ({ onBack, onClose, txToken, values }: Revie
values, values,
advancedOptionsTxParameters, 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)) dispatch(createTransaction(spendingLimitTxData))
} }
} }