Commit Graph

2391 Commits

Author SHA1 Message Date
Agustín Longoni 188dc80912
Fix asset value column alignment (#1778) 2021-01-15 20:06:05 +01:00
Daniel Sanchez cdbe4dfc57 Cleanup erc20 amount calcs 2021-01-15 17:33:35 +01:00
Agustin Pane 4c45daa2e2 Fix useTxData refactor
Remove unnecessary useTxAmount
2021-01-15 12:35:09 -03:00
Agustin Pane 10f1891f8f
(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>
2021-01-14 12:36:55 +01:00
Mikhail Mikheev 1a50b59404
Bug: Use link tag instead of javascript navigation in apps list (#1770)
* Use list instead of programmable navigation

* move color style to appcard

* use color from theme

* add declaration for styled-components theme
2021-01-13 17:28:10 +04:00
Agustin Pane 8a774f2e66
(Feature) - #1048 Tx will fail warning (#1675)
* 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>
2021-01-13 11:27:07 +01:00
Daniel Sanchez 618888ed07
Upgrade dependencies (#1767)
* 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
2021-01-12 22:33:22 +01:00
Agustín Longoni 31be5b1993
Feature/#1499 add mobile start (#1750)
* add modal, img and card

* add overlay and clean css

* fix breakpoint to 992px (screenMd)

* add mobileView  library

* add link to download app button

* close button styles

* fix close button on hover

* Remove polished rgba for material-ui fade

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-12 20:26:38 +01:00
Agustin Pane f1ffb5d147
(Fix) - Remove safe fix (#1744)
* 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
2021-01-12 11:39:57 -03:00
Mati Dastugue 6369d872f8 Merge branch 'fix/balance-table-sort' of github.com:gnosis/safe-react into fix/balance-table-sort 2020-12-28 14:10:38 -03:00
Mati Dastugue a00539e8c2 Fix token price function to be more generic 2020-12-28 14:09:30 -03:00
Mati Dastugue d1cbc1ac8c
Merge branch 'development' into fix/balance-table-sort 2020-12-22 16:19:04 -03:00
Mati Dastugue 6ffb7368cd Allow sort for value column 2020-12-21 23:06:48 -03:00
Mati Dastugue 283e62efd4 Merge branch 'development' of github.com:gnosis/safe-react into development 2020-12-21 22:29:43 -03:00
Mati Dastugue 2af0fb0cb1
Update index.tsx 2020-12-18 10:44:04 -03:00
Mati Dastugue 8946ebcf32 Merge branch 'development' of github.com:gnosis/safe-react into fix/modal-close 2020-12-18 10:36:02 -03:00
Mati Dastugue 62232e6dc2 Prevent modal from closing on its own 2020-12-18 10:34:57 -03:00
Daniel Sanchez f143721c06
Fix typo in ADD_OR_UPDATE_SAFE reducer (#1735) 2020-12-16 18:32:13 -03:00
Agustin Pane f65c8b7212 (Feature) - Expanded decoded data collapses automatically (#1731)
* 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>
2020-12-15 22:27:09 +01:00
Agustin Pane 7c19205e01
(Feature) - Expanded decoded data collapses automatically (#1731)
* 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>
2020-12-15 22:23:12 +01:00
Mati Dastugue 0814eb528e Merge branch 'development' of github.com:gnosis/safe-react into development 2020-12-14 14:53:54 -03:00
Mati Dastugue 71375f9d64 Fix wrong status on txs 2020-12-14 14:53:34 -03:00
Daniel Sanchez cca6854320 Update tx-builder and Aave app hashes 2020-12-14 16:06:36 +01:00
nicolas 89c7482344
Show ETH value input for payable methods (fix for solidity v0.6x) (#1717) 2020-12-14 11:01:03 +01:00
Agustin Pane 0f592111e9
(Feature) Safe owners not loaded (#1710)
* Makes getGasEstimationTxResponse exportable

* Removes the race condition between useLoadSafe and useSafeScheduledUpdates

* Reword safeLoaded

* Improve check for setIsSafeLoaded
2020-12-12 14:39:50 +01:00
Agustín Longoni 1bb3ebce63
Welcome Screen (#1655)
* 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>
2020-12-11 22:47:07 +01:00
nicolas c9a06ec1c2
Handle console erros and warnings (#1709)
* 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.
2020-12-11 19:38:16 +01:00
Mikhail Mikheev 94175a6970
Feature #1593: Support promise-based api of Safe Apps SDK (#1594)
* use multiple versions of safe apps sdk

* use multiple versions of safe apps sdk

* Type fixes

* wip error for multiple versions

* fix multiple sdk versions

* app communicator wip

* communicator wip

* getEnvInfo handler

* update sdk

* app communicator wip

* sdk dep bump

* promisified getSafeInfo

* sendTransactions handler wip

* don't send a response if a handler doesnt return anything

* add handler for transaction sending

* wip rpc call handler

* rpc handler

* rpc handler fix

* V2 Communicator

* remove tsbuildinfo

* fix communicator

* fix error handling for rpc requests

* rpc call fixes

* Update sdk

* Adapting app to use formatters wip

* use messafe formatter from sdk

* Sdk update

* update safe apps sdk version, remove ethBalance from response for safe apps sdk v1

* bump sdk to beta version

* update yarn.lock

* update yarn.lock

* update yarn.lock

* use beta version of the sdk

* enhance validation check

* update dependecies

* Update to python3 dependencies

* Revert "Update to python3 dependencies"

This reverts commit 1332940c77cb649b53ec3e1adfdca10b88e24a87.

* fix transaction params type import

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-12-11 12:31:55 +04:00
Fernando 71f1ea7ad1
(Fix) Duplicated address validation (#1699)
* 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
2020-12-10 16:07:38 +01:00
Fernando 4079ff9abe
add missing parameters to TransferDescription (#1686) 2020-12-10 00:25:20 +01:00
nicolas 2fe1fb2794
Remove safe address tracking for GA (#1683)
* 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>
2020-12-09 20:45:06 +01:00
Agustin Pane 9175552488
(Feature) - #1656 Tx is sent to backend even if not signed (#1672)
* 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
2020-12-09 18:02:09 +01:00
Fernando f161875902
(Fix) Duplicated Owner Addresses on Safe Creation (#1666)
* 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
2020-12-09 12:55:55 +01:00
Daniel Sanchez 258790dcca
Backmerge hotfix v2.16.2 (#1702) 2020-12-04 19:28:46 -03:00
Daniel Sanchez 9a9bb3c775
Upgrade dependencies (#1691)
* 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>
2020-12-04 18:38:49 +01:00
Agustin Pane c0a8d24828
(Fix) - Shows a timeout message on app timeout (#1654)
* Shows a timeout message on api timeout

* Improves loading text

* Improves clear timeout

* Fix typo

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-12-03 08:56:34 -03:00
Daniel Sanchez 265f43e72e Disable Ledger and Trezor in Volta network 2020-11-30 19:47:08 +01:00
Daniel Sanchez d5abbd7aae Update WalletConnect app to show correct logo 2020-11-30 19:28:10 +01:00
Fernando 76ef99fa96
(Fix) Native Coin transfer not shown (#1670)
* allow to display native coin transfers in the expanded view

* fix issue with fragment being passed to material-ui menu
2020-11-30 17:10:42 +01:00
Daniel Sanchez 8d73ebd177 Lower sentry sample rate to avoid threshold overflow 2020-11-30 15:15:27 +01:00
nicosampler 5f15090df5 update safe-apps legend 2020-11-27 11:04:55 -03:00
Daniel Sanchez 7273da91fe Add Sablier, WalletConnect and TX-Builder latest versions 2020-11-27 12:22:59 +01:00
nicolas ba680f7158
SafeApps new layout (#1600)
* speed-up load time  for safe-apps

* show loading status until all the apps are loaded

* Add App route

* Add cards for each safe-app

* move logic to AppFrame

* add basic skeleton styles

* css fixes

* fix image sizes

* add transition animation to skeleton

* remove duplicated code

* Modals

* refactor skeleton

* refactor layout using flexbox

* make content clickable in cards

* cards container as css-grid

* remove fixed width for cards

* replace auto by 1fr

* remove margin for cards

* add card component and remove some css

* rename buttons

* add margin to app list

* refactor useAppList

* fix disclaimer always flashing

* fix pointer cursor for Add app icon

* add styled component keyframe

* update safe-react-components

* fix margin and card height, icon size

* fix margin in iconImg and app name

* fix margins on apps container (breadcrumb area)

* remove style comment

* fix margin on HelpCenter
/ remove overflow in sidebar

* Improve featuresEnabled for sidebar and apps page.

Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-26 18:40:29 +01:00
nicolas 0ecd70fdbc
Support Circles Safes in frontend on xDai (#1636)
* fix web3 issue

* update settings

* get masterCopy Address from backend

* fix prettier errors

* Fix Circles typo

* Change Circles detect logic

* Use sameAddress to compare mastercopy addresses

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-26 18:00:19 +01:00
Mati Dastugue e3a8b9fe2a
Remove dappId from OnboardJS connection (#1627)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-11-26 12:31:56 -03:00
Fernando fc1250d528
(Feature) Spending Limit (#1637)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-25 15:59:17 -03:00
Fernando dca9f19fd0
(Fix) remove module feature (#1646) 2020-11-25 15:35:09 -03:00
Agustin Pane 6ed1e2ea18
(Fix) Geth nodes gas estimation errors (#1635)
* 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
2020-11-20 17:56:29 +01:00
Agustin Pane 592999da3f
Uses addressbook names in the review remove owner (#1631) 2020-11-19 16:40:49 +01:00
Agustin Pane e482d3259b
(Fix) - #1605 QR Input address fix (#1612)
* 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>
2020-11-19 12:22:48 -03:00
Agustin Pane 486bb4b203
(Feature) - Replaces createProxy with createProxyWithNonce method no safe creation (#1630)
* Replaces createProxy with createProxyWithNonce method no safe creation

* Updates estimationGas method

* Moves safeCreationSalt as a parameter

* Fix default export

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-11-19 09:19:31 -03:00
Agustin Pane 8876469166
(Fix) - Adds operation call check on isTokenTransfer (#1613)
* 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>
2020-11-18 15:11:20 -03:00
Agustin Pane 3f6a8ee3f8
(Feature) - EWC/Volta ENS support on web3 patch (#1596)
* 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>
2020-11-18 14:42:00 -03:00
Daniel Sanchez 37877d7fba
Merge branch 'development' into release/v2.15.0 2020-11-18 15:51:24 +01:00
Agustin Pane 0913f2539f
Update legal text (#1624) 2020-11-18 11:23:09 -03:00
nicolas 1d3d61d812
Merge branch 'development' into release/v2.15.0 2020-11-18 10:08:53 -03:00
nicolas 996d339982
Layout refactor (#1604)
* refactor layout using flexfox

* comments

* fix sidebar css

* remove overflow y

Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
2020-11-17 15:47:17 -03:00
Agustin Pane 38751958bb
(Fix) - #1154 Add more owners on safe creation (#1583)
* Add types in getAddressValidator
Remove unused props

* Absolute import

* Adds safeOwnersAddressesSelector

* Fix uniqueAddress function

* Replaces getAddressesListFromAddressBook with addressBookAddressesListSelector

* Remove comment

* Types

* Fix tests

* Improves safeOwnersAddressesSelector

* Remove memoize from uniqueAddress

* Improves uniqueAddress validation

* Improves uniqueAddress function to check checksum values
Add tests

* Removes toArray from safeOwnersAddressesSelector
Allows uniqueAddress to use both string[] and List<string>

* Renames safeOwnersAddressesSelector to safeOwnersAddressesListSelector

* Update src/components/forms/validator.ts

Improves uniqueAddress

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

* Fix tests

* Fix uniqueAddress

* Fix types extensions

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Fernando <fernando.greco@gmail.com>
2020-11-17 09:34:01 -03:00
Agustin Pane 9f1dc37bbb
(Fix) #1587 - Ens mislabeled as eth (#1601)
* Fix fetch symbol for incoming txs

* Fix getting symbol promise from erc721

* Adda ens contract addresses for different networks
2020-11-16 11:20:07 -03:00
Daniel Sanchez 033de25cf5 Set production Sablier and WalletConnect IPFS hash 2020-11-16 12:45:35 +01:00
Fernando da1e39c2ef
(Fix) Remove the provider when the site is disconnected (#1585) 2020-11-12 11:40:28 -03:00
Fernando 914333dc54
(Fix) Support CryptoKitties NFTs (#1574)
* 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`
2020-11-11 18:31:54 -03:00
Agustin Pane 294ba47142
(Feature) - #1244 send tx again (#1582)
* 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>
2020-11-11 14:20:10 -03:00
Mati Dastugue 19e6df725a
Add tracking info to Google analytics (#1584)
Add extra information to Google Analytics (#1510 )
2020-11-11 15:44:14 +01:00
Agustin Pane ca732001bf
(Fix) - #1561 Outgoing instead of custom tx for sending collectibles (#1567)
* 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>
2020-11-10 17:09:41 -03:00
Fernando 325864cffb
(Fix) Prevent ENS check when not supported (#1570) 2020-11-10 16:16:44 -03:00
Agustin Pane 2a01470d2d
(Fix) - #1542 CopyBtn content in addressbook (#1579)
* Fix CopyBtn content

* Fix explorer url

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-10 11:51:14 -03:00
Fernando 325adda00d
(Fix) Error when using up to the max amount of decimals for token transfer (#1576) 2020-11-09 17:04:28 -03:00
Daniel Sanchez 0c67c48648
Upgrade dependencies (#1572)
* 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>
2020-11-06 17:01:40 +01:00
Daniel Sanchez 387ebe68fb
Updates bnc-notify version and adds support for GridPlus Lattice [internal] (#1569)
* 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>
2020-11-05 16:02:24 +01:00
Fernando 7a881537e5
(Fix) Executed transactions status (#1552)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-04 19:40:59 -03:00
Agustin Pane c9fb7fcc10
(Fix) - #1554 Send collectible crash on addressBook (#1559)
* 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>
2020-11-04 10:37:26 -03:00
Agustin Pane f69bffd089
(Fix) Feature/1558 Replace owner modal names (#1562)
* 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>
2020-11-04 10:18:46 -03:00
Daniel Sanchez c4ebb63f5b
Merge branch 'development' into release/v2.14.0 2020-11-03 18:01:32 +01:00
Mati Dastugue c246223c82 xDai - Disable Wallets (#1563)
* Disable not working wallets for xDai
2020-11-02 19:26:03 +01:00
Mati Dastugue aa5be55414
xDai - Disable Wallets (#1563)
* Disable not working wallets for xDai
2020-11-02 19:24:13 +01:00
Daniel Sanchez d176301328 Update EWC/Volta config to use own apps URL 2020-11-02 17:38:16 +01:00
Agustin Pane cd8dc8d486
Uses orderedNFTAssets (#1546)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-02 09:27:49 -03:00
nicolas df42b36194
Add Sentry config and ErrorBoundary Component (#1528)
* 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>
2020-10-30 20:55:40 +01:00
nicolas 9fea501e4e
Remove request app from rinkeby (#1545) 2020-10-30 20:40:03 +01:00
Agustin Pane 503b99973e
(Feature) - #1531 EWC estimate fee on modal (#1543)
* Add fixed price in gas to ewc configuration
2020-10-30 20:30:40 +01:00
Agustin Pane 3fa0b74137
(Feature) - #1541 etherscan on ewc (#1544)
* Replaces old EtherscanBtn with ExplorerButton from safe components

* Remove default exports
Fix typo un etherscanLink name import

* Replaces EtherscanBtn with ExplorerButton

* Remove etherscanButton component
2020-10-30 16:25:04 -03:00
Mati Dastugue c798f1e03e
EWC/Volta - Disable not working wallets (#1549)
* Disable wallets for Volta and EWC networks
2020-10-30 20:22:35 +01:00
Daniel Sanchez ec96edb16f Set production pin to Aave safe-app 2020-10-29 12:37:16 +01:00
Agustin Pane 551db136f3
(Feature) #1515 Gas estimation for NON-GETH nodes (#1523)
* 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>
2020-10-28 17:03:14 +01:00
nicolas 0278722645
Add config for EWC and Volta (#1513)
* 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>
2020-10-28 13:10:40 +01:00
Daniel Sanchez 02ba83cef2
Bump dependencies (#1529)
* Upgrade Typescript to v4.0.3

* Upgrade dependencies with minor changes

* Cleanup yarn.lock file

* Upgrade types dependencies

* Fix inconsistency with @typescript/eslint caused by react-scripts

* Fix eslint issues

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-10-28 12:48:31 +01:00
Daniel Sanchez 27fbb38ccf
Update Sablier app (#1525) 2020-10-27 16:52:32 +01:00
Mati Dastugue cb051b1955
Collectibles List - Manage list when no collectibles (#1419)
* Bump new onboard.js version

* Remove component

* Fix travis rollback bug

* Fix Typos + Updated logic

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-10-27 11:53:03 -03:00
Fernando aa181fb9a1
(Fix) Modules not shown in Advanced Settings (#1516) 2020-10-27 11:04:44 -03:00
Agustin Pane 4ce8917f34
(Bug) - #1503 Fix collectibles groups is not removed when the last item from it is sent (#1511)
* Remove default export with const

* Filter collectibles group with user's available nftAsset

* Improves filter

* Fix duplicated assets
2020-10-26 10:58:01 -03:00
Agustin Pane 058fec3dbc
(Feature) - Send erc721 collectible with proxy contact (#1508)
* 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>
2020-10-26 10:11:52 -03:00
Daniel Sanchez 95d102d337
Fix show token balances after sending out all tokens (#1521) 2020-10-26 11:34:53 +01:00
Mikhail Mikheev 1c53167a9a
Feature #1480: Handle rpc calls from apps SDK (#1519)
* 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

* update sdk version

* add handler for rpc calls

* use send method

* update sdk version

* dep bump

* wip

* update sdk

* remove unused interface and console.log

* remove async, tweak check for send func

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-10-26 13:53:01 +04:00
Daniel Sanchez 5f3a9ef1a9
Update calculateGasPrice to fetch from config (#1517)
* Update calculateGasPrice to fetch from config

* Remove unused gas estimation function

* Remove unused gasCost estimate function

* Add gasParameter to gasPriceOracle
2020-10-23 17:18:09 +02:00
Mati Dastugue c9e9fe8ca6
Enable/Disable wallets by configuration flag (#1504)
* Add disableWallets key to config

* Fix merge issues
2020-10-23 13:30:09 +02:00
nicolas 8aeb5a1c01
Add coin by network (#1505)
* Add coin by network

* Join tests in same file

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-23 12:58:46 +02:00
Mikhail Mikheev 56430b5966
Feature #1440: Handle transactions with set safeTxGas from Safe Apps (#1442)
* 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>
2020-10-22 17:43:59 +04:00
Daniel Sanchez 24c917d821 Set warn level to batch request catch 2020-10-20 17:46:09 +02:00
Daniel Sanchez b4faa3b617
Merge branch 'development' into release/v2.13.0 2020-10-19 18:11:46 +02:00