Commit Graph

3310 Commits

Author SHA1 Message Date
Daniel Sanchez 8c50cda0ad
Update balancer pool safe app (#1869) 2021-02-10 15:56:32 +01:00
Germán Martínez aba414ab79
Adapt cookie banner for GDPR (#1814)
* Update cookie banner action and reducer

* Add cookie banner new assets

* Update cookie banner

* Update cookie banner migration

* Disable cookie banner and intercom in desktop app

* Use google analytics hook in Open Safe component

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-10 11:51:20 +01:00
Agustin Pane 7caec9c29c
(Fix) - Safe tx gas capped (#1860)
* Enables validation of safeTxGas < gasLimit and enable change of the gasLimit

* - Let the user use a custom safeTxGas for checking if the transaction will fail

* Updates the gas success estimation when the user changes the safeTxGas manually on:
- Approve safeApp transaction

* Send manual parameters (safeTxGas and safeNonce) to safe apps

* Add missing variable to estimateGasForTransactionCreation

* Improve network naming usage for validation
2021-02-10 11:04:32 +01:00
Mikhail Mikheev d17da5489b
Bug: if we don't use multisend, ethereum value is not passed (#1857)
* calculate eth value from array of txs

* use 0 incase of multisend

Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-08 17:44:59 +01:00
Agustín Longoni 63cd88d845
Gas calculation info UI fixes (#1861)
* upgrade SRC

* add styles to GasInfo container

* reject modal

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-05 18:58:08 +01:00
Agustin Pane 0ea73c4eda
(Fix) - #1798 broken safe creation deeplink (#1840)
* Add types for SafeProps
Adds getSafePropsValuesFromQueryParams implementation
Replaces window.location with useLocation hook

* Replaces SafeProps with import in Layout.tsx
Adds downlevelIteration to tsconfig.json to allow array.entries()

* Type createSafe()

* SafeDeployment Types

* Type Paragraph and refactor to functional component

* Fix validateQueryParams and types

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-05 09:17:25 +01:00
Mikhail Mikheev d47bd1fe98
Merge pull request #1856 from gnosis/hotfix/v2.19.2
Mergeback hotfix v2.19.2
2021-02-04 17:55:43 +04:00
Daniel Sanchez 1ac338e12c Merge branch 'development' into hotfix/v2.19.2 2021-02-04 12:51:29 +01:00
Daniel Sanchez 9af8622c52
Merge pull request #1855 from gnosis/hotfix/v2.19.2
Hotfix v2.19.2
2021-02-04 10:55:16 +01:00
Daniel Sanchez f0f17e6083 Set v2.19.2 2021-02-04 10:05:06 +01:00
Daniel Sanchez 0e54c8fa72 Remove safeTxLimitation to be lower than gasLimit 2021-02-04 10:04:36 +01:00
Daniel Sanchez 633e5403a1 Return all Safe App interactions to be multisend transactions 2021-02-04 10:04:00 +01:00
Daniel Sanchez 038b51e398
Bump dependencies (#1850)
* Upgrade dependencies without breaking changes
2021-02-03 14:15:44 +01:00
Daniel Sanchez cbb7fb855b
Merge pull request #1844 from gnosis/release/v2.19.0
Merge release v2.19.0 back to development
2021-02-03 08:49:13 +01:00
Daniel Sanchez 7921a8d9f3 Set v2.19.1 2021-02-03 00:08:03 +01:00
Agustin Pane 306ea4a14b Check that the estimation of the node is bigger than 0 before returning 2021-02-03 00:08:03 +01:00
Daniel Sanchez a1acfc206a
Merge pull request #1845 from gnosis/hotfix/xdai-gas-estimation-low
(Hotix) - xDAI Gas estimation fix
2021-02-02 23:24:49 +01:00
Daniel Sanchez 92d0f7fc4b Set v2.19.1 2021-02-02 22:16:38 +01:00
Agustin Pane c1b48f9508 Check that the estimation of the node is bigger than 0 before returning 2021-02-02 12:39:54 -03:00
Daniel Sanchez 78c64f520c
Merge branch 'development' into release/v2.19.0 2021-02-02 15:46:58 +01:00
lukasschor f0223958d4
Update copy during onboarding (#1830)
* Update copy during onboarding

Quite a few users have pointed out that it was not clear that owners can be changed after the Safe is created. E.g. "- Once I’ve created a wallet, it seems it’s possible to revoke and change a signer, but it wasn’t immediately clear if I can change the threshold."

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-02 15:42:23 +01:00
Daniel Sanchez 2f6113d117
Merge pull request #1828 from gnosis/release/v2.19.0
Release v2.19.0
2021-02-02 12:26:59 +01:00
Daniel Sanchez 29559859d2 Fix multisend enconding when adding a new spender to allowance module 2021-02-02 11:40:53 +01:00
Agustín Longoni 42821c11d2 Avoids changing the transaction fee message while loading the estimation 2021-02-01 19:20:15 -03:00
Agustín Longoni 4bf1a74b33 fix 'Advanced options' presentation in modal 2021-02-01 16:02:14 -03:00
Daniel Sanchez 2bd73c3443 Set v2.19.0 2021-02-01 12:32:08 +01:00
nicolas 2ea67b5137
Set transaction parameters manually - Advanced options (#1760)
* Makes getGasEstimationTxResponse exportable

* Add check for failing txs on approveTxModal

* Adds styles for reviewTx

* Adds useTxSuccessCheck hook

* Remove hook

* Adds checkIfTxWillFail function

* Uses checkIfTxWillFailAsync on reviewTx modal

* Improves approveTx modal

* Add check for failing transaction in contract interaction modal

* Add check for reviewCollectible

* Fix check on sendFunds reviewTx

* Adds styling for contractInteraction modal

* Fix gas calculation for native token transfers

* Remove logs

* Rename estimateDataGasCosts to parseRequiredTxGasResponse
Adds getPreValidatedSignatures
Refactor estimateTxGasCosts
Refactor checkIfExecTxWillFail

* Refactor checkIfExecTxWill usage

* Refactor checkIfTxWillFailAsync in ReviewTx

* Use getPreValidatedSignatures in createTransaction()

* Refactor estimateTxGasCosts
Rename estimateSafeTxGas to estimateExecTransactionGas

* Refactor ReviewTx: extract useEffects to hooks

* Remove unnecessary gas transfer amount

* Refactor estimateTxGasCosts: extract checkIfTxIsExecution and estimateTxGas

* Fix tx amount
Remove console log

* Moves useCheckIfTransactionWillFail to logic/hooks folder

* Replaces useEffect usage with useCheckIfTransactionWillFail hook
Also fix how some modals fetch the safeAddress

* Improves modal's wording

* Remove comment

* Fix error parsing the cancel transaction error message from GETH nodes

* Remove useCheckIfTransactionWillFail
Adds useEstimateTransactionGas
Renames estimateTxGas to estimateTransactionGas
Removes estimateTxGasCosts
Removes checkIfExecTxWillFail

* Replace useCheckIfTransactionWillFail from modals with useEstimateTransactionGas

* Replace estimateGasCosts from every review tx modal with useEstimateTransactionGas

* Replace estimateGasCosts from every review tx modal with useEstimateTransactionGas

* Extract isExecution calculation to useEstimateTransactionGas

* Creates TransactionFailText

* Uses TransactionFailText in the review modals

* Remove unnecessary styles

* Fix imports

* Remove css

* Fix missing style

* Remove duplicated function

* Fix modal height

* Fix wrong selector usage

* Fix missing null check on cancel tx confirmations

* Add guard for CLOSE_SNACKBAR action when tx was already dismissed

* Improves useEstimateTransactionGas in review custom tx and contract interaction review

* Fix hook dependency

* Add active screen types in send modal

* SafeInfo: replace AddressInfo by EthHashInfo

* Fix review replace/remove/add owner modals styling

* AdvancedOptions without funcionality

* change button text

* fix margins and texts

* fix close button margin

* rename ReviewTx by ReviewSendFundsTx

* safe params: partial implementation

* make use of useTransactionParameters hook

* Refactor response of useEstimateTransactionGas

* Remove safeAddress as param to the useEstimateTransactionGas

* Improves how threshold is obtained in useEstimateTransactionGas.tsx

* Rename gasCostHumanReadable to gasCostFormatted

* Add operation to useEstimateTransactionGas

* Refactor ConfirmTransactionModal to use useEstimateTransactionGas

* Refactor proccessTransaction to use getPreValidatedSignatures method

* Fix default export of ApproveTxModal

* Rename estimateExecTransactionGas to estimateGasForTransactionCreation
Remove estimateTransactionGas from gas.ts

* form, accordion, validations

* Make estimateGasForTransactionCreation throw error instead of 0 gas

* Adds estimateGasForTransactionExecution and estimateGasForTransactionApproval to gas.ts

* Move estimateTransactionGas to useEstimateTransactionGas
Refactors useEstimateTransactionGas to return isCreation and isOffChainSignature

* Add in contractInteraction

* review custom TX

* review collectible

* Type and refactor generateSignaturesFromTxConfirmations
Moves getPreValidatedSignatures to safeTxSigner.ts

* Uses confirmations to estimateGasForTransactionExecution

* Adds TransactionFeesText component
Uses TransactionFeesText on ApproveTxModal

* Update text

* Update text

* Remove unnecessary condition

* Pass more parameters to estimateGasForTransactionExecution

* Removes unnecessary parameter in getNewTxNonce

* Moves checkIfOffChainSignatureIsPossible to safeTxSigner.ts

* rename AdvancedOptions and add parameters in add owner

* replace owner - remove owner

* Fix check for null confirmations

* Uses checkIfOffChainSignatureIsPossible on createTransaction.ts

* Policies

* Move TransactionFailText inside TransactionFees component

* spending limit

* fix textfields gap and margins

* fix margins, text size and textfields disposition

* Remove unnecessary awaits

* Update Accordion comp

* Pass safeTxGas to useEstimateTransactionGas.tsx
Improves how we use default params

* Fix gas iteration on estimateGasForTransactionExecution

* Fix estimateGasForTransactionExecution calculation

* Fix generateSignaturesFromTxConfirmations calculation

* Remove unnecessary Promise and await

* Fix estimateGasForTransactionExecution for preApproving owner case

* Improve logging

* Remove log

* Fix typo

* merge fixes

* Uses operation in useEstimateTransactionGas

* Uses operation in useEstimateTransactionGas

* add txParameters in ApproveTx

* useEstimateTransactionGas add gasPriceFormatted

* reviewSendFundsTx gasFormatted

* add gasLimit to useEstimateTransactionGas

* Files movement - EditParameters refactor

* tx parameters in creation

* set correct gasPrice

* createTx from contractInteraction

* Fix gas estimation for transaction creation

* disable button while calculating gas

* Add owner - reactor and creation options

* Add owner: remove unused code

* Threshold settings

* fix modal ui bug (tx)

* fix modal ui bug (settings)

* fix modal ui bug (Settings: Policies )

* fix ui bug modal (Spending Limit)

* (Fix) - Calculates gas for SpendingLimit transactions (#1773)

* Bug: Use link tag instead of javascript navigation in apps list (#1770)

* Use list instead of programmable navigation

* add declaration for styled-components theme

* (Fix) - Calculates gas for SpendingLimit transactions (#1773)

* Calculates gas for spendingLimit transactions

* Adds TransactionFees component inside UpdateSafeModal

* Fix send collectible gas calculation

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>

* speding limits

* Remove default exports for spendingLimits

* Fix warning in TxParametersDetail

* Extracts calculateSpendingLimitsTxData logic and add types

* Remove txParameters from setSpendingLimitMultiSendTx/spendingLimitMultiSendTx
Adds log for transaction creation success

* Refactor handleSubmit, now uses calculateSpendingLimitsTxData to calculate the spendingLimit transaction data before submitting
Also calculateSpendingLimitsTxData is used to estimate the amount of gas that the transaction will cost

* disable parameters when needed

* fix parametersStatus condition

* Some fixes

* more fixes

* send directly when tx nonce == safeNonce

* fix tests

* parameters in replace owner and remove owner

* Fix gas estimation issues for Metamask

* FIx Edit transaction parameters src route

* Remove default exports RemoveModuleModal

* Adds advanced parameters in RemoveModuleModal

* Fix css styling of UpdateSafeModal

* Adds EditableTxParameters within UpdateSafeModal

* Fix warning in <Accordion> for compact parameter

* Add advanced settings for RemoveLimitModal.tsx

* Fix txNonce usage in RemoveModuleModal.tsx

* Remove logs

* Fix txNonce param in RemoveLimitModal.tsx

* Remove TODOS for refactoring default case of getParametersStatus in EditableTxParameters

* Add advanced parameters to Safe apps modal

* Force gasPrice and safeTxGas 0 for cancelling transaction

* Invert validation of safeTxGas > ethGasLimit, safeTxGas should be < than ethGasLimit

* Add missing validation for approveTxModal submit button

* Fix checkIfTxIsApproveAndExecution  method
Add tests

* Remove duplication of gas value for calculateGasOf

* Fix gas estimation for execution & approval

* Adds EXTRA_NODE_GAS for the gasLimit calculation

* Revert duplicate of web3.eth.estimateGas

* Revert fix of execution & approval

* Adds closeEditModalCallback in EditableTxParameters

* Accept manual gas price in useEstimateTransactionGas.tsx

* Use manualPrice in sendFunds gas estimation

* Add safeTxGas estimation to Editable TX Parameters

* Set safeTx gasPrice to 0 on tx creation

* Refactor useTransactionParameters with initialValues support

* Refactor EditableTxParameters.tsx, fixs changing gasLimit or gasPrice

* Fix safeTxGas

* Add naming to minimum gas required for a transaction

* Remove log

* Fix nonce calculation for cancel transaction

* Update gas estimation to be more precise and avoid reverts

* Check that only the creator of the transaction or the executor could modify the advanced parameters

* Add validation to submit buttons on modals when the gas estimation is loading

* Fix advanced parameters display in change threshold

* Fix wrong commit

Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2021-01-29 21:21:42 +01:00
Mikhail Mikheev 3415b73ef0
Update WalletConnect app url (#1822)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-29 17:24:00 +01:00
Daniel Sanchez 012b41a3f7
Feature - Add .crypto domain resolution (#1764)
* (Feature) - Support for .crypto resolution

* Fix EthereumAddress validator error msg

* Extract unstoppable domains logic to an util

* Add singleton to UnstoppableDomains instance

* Shorten address or domain validation error message

Co-authored-by: sudoryan <rleinbox@gmail.com>
2021-01-29 13:07:47 +01:00
Daniel Sanchez 6b4b156daf
Update balancer exchange app (#1823) 2021-01-28 15:22:48 +01:00
Agustin Pane 758fc3c0c0
(Fix) Estimate gas for wallet connect (#1806)
* Guard for empty result

* Type TextField

* Fix warning of InputAdornment in SendFunds modal

* Re-enable gas estimation for wallet connect

* Replace web3.call on parseRequiredTxGasResponse with axios post to infura

* Adds estimateGasWithInfura and estimateGasWithWeb3Provider for changing the estimation method if we are in a non-infura-supported network

* Revert calculateMinimumGasForTransaction change to leave the change for the already-open pr

* Renames estimateGasWithInfura with estimateGasWithRPCCall
Replaces web3 with web3ReadOnly in estimateGasWithRPCCall

Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-28 09:12:02 +01:00
Agustin Pane 3d43db039b
(Fix) Contract interaction tuples (#1787)
* Adds isTupleParameter validation to the extractMethodArgs

* Improves tuples parsing

* Show examples for txs inputs

* Remove MethodsInputExamples

Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
2021-01-27 23:44:02 +01:00
Daniel Sanchez e3adb24825
Update balancer pool management app with new keys (#1819) 2021-01-27 20:19:32 +01:00
Daniel Sanchez 621401bc82
Add dHedge safe app (#1821)
* Add dHedge safe app

* Disable volta build for all PRs and leave only for release branch and master
2021-01-27 19:15:17 +01:00
Mikhail Mikheev d6343a9bb1
Feature: Single tx safe apps interactions should not use multisend (#1792)
* Don't use multisend if txs.length = 1

* calc txData inside useMemo

* fix sending txs from apps, use correct operation/recipient

Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-27 17:35:14 +01:00
Daniel Sanchez 57f7acd26e
Update IDLE Safe app (#1813) 2021-01-27 16:30:39 +01:00
Daniel Sanchez fef88b0bb9
Update 1 Inch app to v1.2.3 (#1816) 2021-01-27 15:30:29 +01:00
Agustin Pane a020e8e0dc
(Fix) - Gas estimation for transaction creation (#1772)
* Fix gas estimation for transaction creation

* Adds missing logs

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-26 18:06:39 -03:00
Agustin Pane 19be231d53
(Fix) - #1804 Tx gas estimation fail for threshold >= 3 (#1808)
* Fix checkIfTxIsExecution method implementation

* Add tests for checkIfTxIsExecution/checkIfTxIsCreation/checkIfTxIsApproveAndExecution/

* Minimice number of ifs with same result

Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-26 19:29:28 +01:00
Mati Dastugue c7c9facfcc Merge branch 'development' of github.com:gnosis/safe-react into development 2021-01-26 13:21:56 -03:00
Daniel Sanchez 5e5736827f
Merge pull request #1807 from gnosis/hotfix/refund-displayed-as-rejection
Mergeback hotfix v2.18.1 to development
2021-01-25 16:43:58 +01:00
Daniel Sanchez 3748245a79
Merge branch 'development' into hotfix/refund-displayed-as-rejection 2021-01-22 19:49:50 +01:00
Daniel Sanchez 173054a1b6
Merge pull request #1805 from gnosis/hotix/refund-displayed-as-rejection-desktop-app
Add commit for desktop app v2.17.2
2021-01-22 19:47:38 +01:00
Daniel Sanchez a84577cebb Merge branch 'master' into hotix/refund-displayed-as-rejection-desktop-app 2021-01-22 12:57:28 +01:00
Daniel Sanchez 5bfc4bb15b
Merge pull request #1803 from gnosis/hotfix/refund-displayed-as-rejection
(Hotfix) Refund displayed as transaction rejection
2021-01-22 10:00:08 +01:00
Daniel Sanchez 93f5e8134e Set v2.18.1 2021-01-22 09:04:21 +01:00
Daniel Sanchez f47bc7f175 Set v2.17.2 2021-01-22 09:03:01 +01:00
Agustin Pane a604da1b6c Fix prettier 2021-01-22 08:59:06 +01:00
Agustin Pane b6577f8e6f Updates isCancelTransaction logic and tests 2021-01-22 08:59:06 +01:00
Agustin Pane 67af60ef71 Adds isEmptyAddress method 2021-01-22 08:59:06 +01:00