Commit Graph

3242 Commits

Author SHA1 Message Date
Daniel Sanchez 54ed65ca4e Disable devtools 2021-01-18 10:20:04 +01:00
Daniel Sanchez 6daaf0cb6d Enable dev tools to test electron build 2021-01-16 00:13:17 +01:00
Daniel Sanchez 2264b1cb7e Remove unused blocknative keys
Remove unused build file
2021-01-16 00:12:36 +01:00
Daniel Sanchez b7f1036a60 Disable yarn cache for electron build 2021-01-15 22:47:07 +01:00
Daniel Sanchez 6cc780c994 Upgrade build action to use node 14 2021-01-15 20:17:13 +01:00
Agustín Longoni 0fb1824f49 Fix asset value column alignment (#1778) 2021-01-15 20:12:14 +01:00
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
Daniel Sanchez 5bcad40c16 Fix electron app image
Update and fix ledger connection for desktop app
2021-01-15 12:04:43 +01: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
dependabot[bot] 09b470187f
Bump axios from 0.21.0 to 0.21.1 (#1754)
Bumps [axios](https://github.com/axios/axios) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-12 14:01:34 +01:00
dependabot[bot] 186fb34731
Bump node-notifier from 8.0.0 to 8.0.1 (#1741)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-01-12 13:02:04 +01:00
Mati Dastugue b7fb6033eb
Merge pull request #1745 from gnosis/fix/balance-table-sort
Fix - Value column not sortable in Assets list
2021-01-05 15:45:02 -03:00
Mati Dastugue 3b05df48b9 Merge branch 'development' of github.com:gnosis/safe-react into development 2020-12-29 11:40:44 -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 5008ee4ab9
Merge pull request #1738 from gnosis/fix/modal-close
Fix - Send Again modal close on its own
2020-12-22 11:16:16 -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
Daniel Sanchez f47580877b
Merge pull request #1733 from gnosis/release/v2.17.0
Backmerge release v2.17.0
2020-12-16 13:05:22 +01:00
Daniel Sanchez 94d9ee46d9
Merge branch 'development' into release/v2.17.0 2020-12-16 10:58:19 +01:00
Daniel Sanchez b3541705e5
Merge pull request #1719 from gnosis/release/v2.17.0
Release v2.17.0
2020-12-16 09:20:11 +01: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 71bdd43a80
Merge pull request #1720 from gnosis/release/v2.17.0
Fix safe-react-components
2020-12-14 18:51:55 +01:00
Daniel Sanchez cca6854320 Update tx-builder and Aave app hashes 2020-12-14 16:06:36 +01:00
Daniel Sanchez afa8903eb2 Set v2.17.0 2020-12-14 13:58:05 +01:00
Daniel Sanchez 1357801f6b
Merge branch 'master' into release/v2.17.0 2020-12-14 13:56:56 +01:00
Daniel Sanchez e34b9e74ed Use latest safe-react-components version 2020-12-14 13:53:51 +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
Daniel Sanchez f782c35e31
Clean dependencies warnings (#1716)
* Add resolution for babel version

Update @rescrips/cli to be compatible with react-scripts 4

* Upgrade packages to avoid install warnings
2020-12-11 20:42:13 +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