* 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>
* Makes getGasEstimationTxResponse exportable
* Add check for failing txs on approveTxModal
* Adds styles for reviewTx
* Adds useTxSuccessCheck 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
* 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
* 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
* 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 review replace/remove/add owner modals styling
* 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
* 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
* Type and refactor generateSignaturesFromTxConfirmations
Moves getPreValidatedSignatures to safeTxSigner.ts
* Uses confirmations to estimateGasForTransactionExecution
* Adds TransactionFeesText component
Uses TransactionFeesText on ApproveTxModal
* Pass more parameters to estimateGasForTransactionExecution
* Removes unnecessary parameter in getNewTxNonce
* Moves checkIfOffChainSignatureIsPossible to safeTxSigner.ts
* Fix check for null confirmations
* Uses checkIfOffChainSignatureIsPossible on createTransaction.ts
* Move TransactionFailText inside TransactionFees component
* 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
* Uses operation in useEstimateTransactionGas
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Fernando <fernando.greco@gmail.com>
* Deduplicate dependencies
* Upgrade @truffle/contract to latest v4.3.0
* Upgrade dependencies with minor changes
* Upgrade electron-builder configuration
* Upgrade typescript to latest version
* Upgrade safe-apps-sdk to latest version
Remove autoprefixer dependency
* Avoid displaying notification for non updated owner
* Remove old selector usage on welcome page
* Remove provider props on WelcomeLayout
Fix removing safe behaviour
* Fix missing undefined property check on cancelThresholdReached
* Removes the default safe when removing the safe marked as default
* Remove index
* Change react import
* Fix relative path for relocate url
* Adds removeLocalSafe action
Uses removeLocalSafe on onRemoveSafeHandler also removes default safe
* Refactor SafeListSidebar uses redux-hooks approach
* Disabled save button when the owner name input is pristine
* Adds shouldSafeBeUpdated to avoid updating unnecessary the safe
* Fix css typing
* Moves equalArrays to utils function
Improves how updateSafe is dispatched within checkAndUpdateSafe to avoid unnecessary re renders
* Revert some default cases fixes
* Adds equalArrays tests
* Add test to arrays.test.ts
* Improves shouldSafeStoreBeUpdated order and renames it
* Adds shouldSafeStoreBeUpdated.test.ts
* Uses shouldSafeStoreBeUpdated within safe reducer
* Replaces equalArrays with isEqual from lodash
* Simplify shouldSafeStoreBeUpdated using isEqual from lodash
* Remove lodash to compare Immutable objects correctly
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Adds shouldSafeBeUpdated to avoid updating unnecessary the safe
* Fix css typing
* Moves equalArrays to utils function
Improves how updateSafe is dispatched within checkAndUpdateSafe to avoid unnecessary re renders
* Revert some default cases fixes
* Adds equalArrays tests
* Add test to arrays.test.ts
* Improves shouldSafeStoreBeUpdated order and renames it
* Adds shouldSafeStoreBeUpdated.test.ts
* Uses shouldSafeStoreBeUpdated within safe reducer
* Replaces equalArrays with isEqual from lodash
* Simplify shouldSafeStoreBeUpdated using isEqual from lodash
* Remove lodash to compare Immutable objects correctly
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Makes getGasEstimationTxResponse exportable
* Removes the race condition between useLoadSafe and useSafeScheduledUpdates
* Reword safeLoaded
* Improve check for setIsSafeLoaded
* add cards and styles on texts
* add styles and content
* align card content
* fix text about Safe Multisig
* add new components from SRC
* update SRC
* changes to welcome page
* fix margins
* update SRC
* fix icon size
* update SRC hash
* Dot: replace number by check when wallet is connected
* fix card width
* add url to help to connect wallet.
* remove underline on button as a link (Load Safe).
* Fix buttons
* disable connect wallet button when there is a connected wallet
* fix padding in New Transaction button
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Remove Warning: React.createFactory() is deprecated
* make TS recognize Window definition by adding an empty export
* Silent MM warning ethereum.autoRefreshOnNetworkChange
* remove warning when requesting data from contract with null address.
* use createStyles/makeStyles
* simplify `addressBookQueryParamsSelector`
* avoid using `createSelector`
as memoization in this scenario is not working as expected and list is not refreshed
* refactor `uniqueAddress` curried function and strategy to validate
- `selectedEntry` being `null` made the code harder to follow
* fix `uniqueAddress` validator tests
* use arrow function
* reactGA bump
* remove address from GA
* remove unneeded option
* Disable travis cache
* Set travis to use latest linux build image
* Update to use python3 dependencies
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Fix black notification
* Fix executing tx even if the user rejected it
* Fix hidden metamask error code
* Fix proccessTransaction notifications and metamask sign reject handling
* add form level validation for OwnersForm
- also fixed `calculateValuesAfterRemoving` function that removed an owner's row by clicking on the trash icon
* add tests for `calculateValuesAfterRemoving` function
* reformat with prettier
* Upgrade dependencies without breaking changes
* Upgrade react-scripts to v4
* Use import instead of require in icons
* Update styles dependencies
* Remove react-app-rewired as is deprecated and not needed anymore
* Update prettier and testing-library/react dependencies
* Upgrade @ledger for desktop app
* Fix types in fetchSafeTokens test
* Use rescripts to remove ESLint plugin from react-scripts webpack
* Disable travis cache
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
* Shows a timeout message on api timeout
* Improves loading text
* Improves clear timeout
* Fix typo
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Replaces getNonGETHErrorDataResult with getDataFromNodeErrorMessage
Updates the extraction of data from the error message to include new GETH nodes version
* Add tests for new GETH nodes
* Add types
* Fix missing address in input field
* Fix reopening file upload modal once closed
* Error first callback onFileUploadHandlerClose
* Adds error text for qrs that can't be read
Fixes popping up again for wrong qr codes
* Fix opening modal
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
* Adds operation call check on isTokenTransfer
* Add comment in unclear if
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Adds patch-package and postinstall
* Creates a patch to add EWC and Volta in web3-eth and web3-eth-ens
* Adds support for ewc in isValidEnsName
* Update web3 ewc patch
* Enables ens lookup for ewc and volta
* Fix eslint
* Update patch
Fix patch-package script in package.json
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* create `logic/collectibles/utils` file and move all the
NFT-related helper functions into it
`generateERC721TransferTxData` will decide whether the method
to transfer an NFT will be `transfer` or `safeTransferFrom`,
based on preset conditions where CryptoKitties tokens is taken
as an exception.
Also, `transfer` was used instead of `transferFrom`
because `transferFrom` is not implemented in the
rinkeby version, and was the method used as a
fallback before.
- moved `SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH` const
- moved `isSendERC721Transaction` function
- moved `getERC721Symbol` function
- moved `isERC721Contract` function
- created `getTransferMethodByContractAddress` along with `CK_ADDRESS` const
- created `generateERC721TransferTxData` function
- refactored `ReviewCollectible` component to use `generateERC721TransferTxData`
- updated tests
* remove `ENS_ADDRESS` constant as it's not used
* add unmock of collectibles/utils
* add tests for `getTransferMethodByContractAddress`
* Types
* Adds tokenAddress to getTxData for tokenTransfer transactions
* Adds sendModalOpenHandler to EllipsisTransactionDetails
* Adds getRawTxAmount util
* Add isTokenTransfer fix for ether in getTxData
* Uses sendFund modal for retry outgoing transfer transactions
* Adds ether address in getTxData result for outgoig transfers
* Uses nativeCoin
* Remove fragmnet
* Fix decimals for native coin
* Fix decimals usage in tx transfer amount
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Refactor getTxData
* Add SAFE_TRANSFER_FROM in SAFE_METHODS_NAMES
* Adds check on isSendERC721Transaction for erc721 send
* Adds TOKEN_TRANSFER_METHODS_NAMES types
* Replace type SAFE_TRANSFER_FROM
* Fix import
* Adds nftAssetsListAddressSelector
* Remove txCode and knownTokens from isSendERC721Transaction
Now it directly checks agains the list of nftAssets on the store
* Refactor ENS_TOKEN_CONTRACT usage check
* Add TODO
* Add return for ENS symbol
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Fernando <fernando.greco@gmail.com>
* Upgrade web3 to v1.3.0
* Remove polished direct dependency
* Upgrade types dependencies
* Upgrade ledger and electron related dependencies
* Update gnosis-safe-components to latest version
* Upgrade sentry dependencies to latest version
* Upgrade truffle-contract and axios
* Upgrade electron dependencies
* Use fade instead rgba with hex value
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
* Adds support for GridPlus Lattice and bumps `bnc-onboard` version.
For more information on the GridPlus Lattice, see https://gridplus.io/lattice
* Disable Lattice wallet from incompatible chains
Co-authored-by: Alex Miller <asmiller1989@gmail.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
* Type TokenSelectField
* Type collectibleSelectField
Remove anys in SendCollectibleTxInfo
Fix cast in SendModal
* Replace cast to toString
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Types
* Uses addressBook when displaying the replace owner modal
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Add Sentry config and ErrorBoundary Component
* Update travis file to upload sentry sourcemaps
* Add design implementation for ErrorBoundary
* Add Sentry DSN configuration for all networks
* Push sourcemaps to sentry only on staging/production build
* move isProdction to constants file
* change Button for Link
* fix redirect when safeAddress is provided but not a subpath for it.
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Replaces old EtherscanBtn with ExplorerButton from safe components
* Remove default exports
Fix typo un etherscanLink name import
* Replaces EtherscanBtn with ExplorerButton
* Remove etherscanButton component
* Remove unnecesary await
* Implement gas calculation for NON-GETH nodes
* Add tests
* Refactor estimateSafeTxGas: now getGasEstimationTxResponse calculates gas or throws errors based on the current node
* Refactor getOpenEthereumErrorDataResult to make it works with Nethermind
Updates tests
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Add config for EWC and Volta
* Join tests in same file
* change price oracle in volta
* add travis config for volta and ewc
* Update travis to build xDai only in master or version release
* Add PR environment by network
* simplify some constants assignments
* Add PUBLIC_URL overwrite for PRs
* Change PULL_REQUEST condition test
* Use absolute path for PUBLIC_URL
* Fix missing https://
* Adapt EWC/Volta config to use new gasPriceOracle format
* disable openZeppeling in volta and EWC
* Deploy EWC to staging
* Fix Portis, Fortmatic and Blocknative key refactor
* Set EWC deployment to release/2.14.0
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Removed containsMethodByHash condition check, now we always expect that safeTransferFrom is defined on the erc721 contract
* Types
* More types
* Add try catch on estimateGas
* Add try catch on submit transaction
* More types
* More types
* More types
* ReviewTx modal props
* Fix SendCollectible modal types
* Add guard for safeAddress
* Move some imports
* Fix DispatchReturn types
* Fix import of Dispatch
* Remove console log
* Adds logs
* Fix import
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Update calculateGasPrice to fetch from config
* Remove unused gas estimation function
* Remove unused gasCost estimate function
* Add gasParameter to gasPriceOracle
* sdk version update
* point sdk to a newer commit
* Update iframe message handler
* ConfirmTransactionModal tweaks to support params
* handle sendTransactionsWithParams, display safeTxGas in app tx modal
* new sdk version
* yarn lock update
* install libudev in travis
* update sdk version
* Estimating safeTxGas for Safe Apps Txs WIP
* safetxgas estimation warning wip
* gas estimation in confirm transaction modal
* yarn lock update
* review fixes
* Change estimation loading msg, use imported vars to index payload type
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>