Commit Graph

345 Commits

Author SHA1 Message Date
Fernando ae8175aae2
(Fix) Transctions infinite scroll (#1931)
* install `react-intersection-observer` dependency

- also, remove `react-infinite-scroll-component`

* refactor `InfiniteScroll` to be used with `react-intersection-observer`

* build an infinite scroll wrapper for transactions based on `InfiniteScroll`

* recover `TxsInfiniteScrollContext` information to identify the last item in a list

- a new component was created for History transactions: `HistoryTransactions` as a wrapper

* refactor lists to use `TxsInfiniteScrollContext` and identify the last item in the list

* allow to pass config to the InfiniteScroll component

 - also changed default bottom margin so the txs loading starts a bit earlier

* fix memory consumption issue based on nft retrieval/update data

* delay `lastItemId` set to next tick, to prevent multiple updates during the same render phase

* Set triggerOnce to infinitescroll

Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-02-26 22:46:31 +01:00
Mati Dastugue de4c29e474 Line break to modal text 2021-02-23 19:17:29 -03:00
nicolas c8daf7d006
Use tooltip from SRC (#1888)
* Upgrade safe-react-components to latest version

* fix New Transaction button

* Increase the date/time tooltip size

Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
2021-02-23 22:24:07 +01:00
Mati Dastugue ccc6939ef4 Added link to docs for custom app modal 2021-02-22 12:09:13 -03:00
Mati Dastugue 45b24e98fd
Removed deprecated wallets (#1922)
* Remove deprecated wallets

* Bump new onboardjs version
2021-02-22 10:01:51 +01:00
Fernando 47d20aa645
Transaction List v2 (#1781)
* Add types for redux actions (#1737)

* solve errors after rebase

- added `isStoredTransaction` to differentiate tx provided to `isCancelTransaction`

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* Add types + loadGateway transactions cosumer

* add client-gateway endpoints to networks configs

* add client-gateway getters

* WIP: consume gateway-client endpoint

- added the history transactions to the store
- updated types to `/queued` and `/history` endpoints

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* add queued transactions to the store

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* add queued transactions selectors

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* WIP: display history transactions

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* WIP: arrange lists queue/history

* prevent loading data from txs-service

* cherry-pick TokenTransferAmount component

* extract queue transactions logic into a hook `useQueueTransactions`

* Add TxType and TokenTransferAmount components

Co-authored-by: fernandomg <fernando.greco@altoros.com>

* wip: history transactions

* wip: use grid to display list content

* wip: use Accordion

* wip: tx history

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: tx details

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: TxInfo

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: TxSummary

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: TxSettingsInfo

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* Wip: style owners list

Co-authored-by: fernandomg <fernando.greco@altoros.com>

* wip: Owners List

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: TxInfoCreation

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: stop using backOff for client-gateway requests

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* refactor

reorganize files and components

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* refactor

- Accordion implementation
- extract summaryContent to a reusable component

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* Fix prettier issue in src/config/index

* add methods names and descriptions to collapsed row

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* wip: split components to render tx-data depending on the tx type

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* add multiSend tx details

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* refactor TxData

- separate into specified components `HexEncodedData`, `MethodDetails` & `MultiSendDetails`

* remove unused imported type

* wip: infinite-scroll

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* refactor `ADD_HISTORY_TRANSACTIONS` reducer

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* implement infinite scroll pagination

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* avoid defining `page_url` param

* refactor InfiniteScroll implementation

- created a wrapper component to simplify interface
- rearranged code

* add `missingSigners` key to `ExecutionInfo` type

* add `lodash.get`

* update `useTransactionStatus` hook to support queued transactions

* use `lodash.get` to access queued objects

* add votes info to TxCollapsed

* add TxQueueCollapsed

- also update the usage of `useTransactionStatus` hook

* split `TxRow` into `TxHistoryRow` and `TxQueueRow`

* use `txLocation` instead of `title` for `QueueTxList` component

* make `TxDetails` generic

* fix queue list elements arrangement

* export `useTransactionDetails` return type

[skip ci]

* wip: group txs by nonce

[skip ci]

* request tx details on demand

[skip ci]

* display cancelling message in queued transactions only

[skip ci]

* wip: implement tree view for grouped transactions

* styled components

- reorganized
- added comments where necessary
- refactored

* refactor QueueTxList

[skip ci]

* update styled-component

[skip ci]

* refactor

- Accordion implementation
- extract summaryContent to a reusable component

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* update safe-react-components

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* update styled-component

[skip ci]

* fix most-recent list of history transactions update

* make queued transactions list scrollable

* make scrollableTarget a const

* styles fixes

- queued grouped transactions styles
- add styles to scrollbar in scrollable areas

* add safe apps info to tx lists

* wip: add action buttons to tx details

* fix column distribution for transactions rows

* display action count for multiSend transactions

* TxExpandedActions

* add action buttons

- also did a slight refactor around grouped vs. not-grouped transactions

* fix txDetails selector

* adapt button to current SRC specs

* wip: action buttons "action"

- TODO: handle the store update -> screen refresh

* fix execution/confirmation conditions

- fixed modals conditions for execution when last confirmation is able to execute

* fix tree view (no <p> as descendant of <p>)

* wip: handle transactions actions through a context provider

* provide txLocation through context

* fix `react-hooks/exhaustive-deps` warnings

* Sort history list

* Add objects utils

* add `lodash.merge` as a dependency

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* update `ADD_QUEUED_TRANSACTIONS` reducer

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* implement pagination for `queued` transactions

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* prevent rendering action modal if `txDetails` is not available

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* pending status for tx execution

* small style-based behavior fixes

* allow to identify txs to be replaced

* redirect to `gatewayTransaction`

* adjust behavior for grouped vs individual transactions

* add help links

* display execute action only when threshold is reached

* make `setActiveHover` required

* prevent `<p />` as child of `<p />`

* fix cards background colors

* revert staging config

* fix linting errors

* prevent using `no-owner` class in history list

* add `PENDING` status to confirmation transactions

This will mark as _pending_ a transaction by its id, the rest of the txs that share same nonce will remain untouched

* unify action buttons status

- created `useActionButtonsHandler` hook
- extracted `CollapsedActions` into `TxCollapsedActions` component

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* fix wording

* fix pending status

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* fix close Action modal

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* extract `addressInList` as a util function

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* fix action buttons' "disabled" status condition

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* provide proper `to` and `value` for `processTransaction` based on Transfer Type (ERC20, ERC721 or ETHER)

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* update queued transactions pointers if we reached the last page

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* use `as string` for `next` pointer

- also fixed typo

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* add JSDocs

* explicitly discard unused client-gateway headers

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* add loading status to the queue transactions list

* fix tx actions after rebase of v2.19.1

* fix issue with safe data update

* fix types issues

* skip `isCancelTransaction` tests

* fix loading status for queue transactions

* Update notifications for tx-list v2 (#1839)

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* use `sameString` to verify `method` value

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* TxDetails refactor cancelTxDetails condition

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* remove unused TxType component

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* remove unused `isReadyToExecute` function

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* Fix eslint

* Update txs details after `PENDING` status update

* remove log

* Fix send transaction because of removed notification message

* Cleanup pending unwanted notifications

* wip: ellipsis actions

* wip: ellipsis actions - fix tokenAmount

* Refactor to txInfoDetails

* refactor `TxInfoDetails`

* remove old `utils.tsx` file

* support SpendingLimit transactions

* fix `isSpendingLimitMethod`

* Fix styles for tx list v2 (#1859)

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>

* wip: performance enhancement

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* wip: extract data calculation to a hook

* refactor huge ternaries

* fix columns styles for small screens

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* add extra information for `Cancel` transaction identification

* undo custom selector

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>

* undo custom selector

* Pass `action` by prop to TxDetails

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* Unify `processTransaction` / `createTransaction` actions

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* Disable send again when the user is offline

* set pending status for the executed tx only (not the group by nonce)

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* Use gatewayTransactions as default transaction list

* fix styles for TxDetails row

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* Remove old transactions list legacy code
Move gatewayTransactions within transactions folder

* Remove allTransactions legacy code

* Types

* Fix redirect after createTransaction

* fix performance issue for `ApproveTxModal`

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>

* fix asset icon size

* fix status wording

* add time tooltip

* add _breadcrumb_

* properly identify non existing nonce

* fix open cookie banner types after merge

* add isCancellation flag support

* fix expanded tx styles

Co-authored-by: Mati Dastugue <matiasdastugue@gmail.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
2021-02-10 17:43:23 +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
Daniel Sanchez 038b51e398
Bump dependencies (#1850)
* Upgrade dependencies without breaking changes
2021-02-03 14:15:44 +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
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 c0441e97fa Merge branch 'master' into release/v2.17.1 2021-01-19 16:14:55 +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
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
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
Daniel Sanchez e34b9e74ed Use latest safe-react-components version 2020-12-14 13:53:51 +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
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
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
Daniel Sanchez a7cf0ffbf2 Rollback bnc-onboard dependency 2020-11-30 09:49:51 +01:00
Daniel Sanchez cb11099304 Upgrade sentry deps to latest version
Upgrade electron to v9.3.5 to avoid v9.3.4 language bug
2020-11-27 13:17:00 +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
Daniel Sanchez 9fdf4e298f
Bump dependencies without breaking changes (#1632) 2020-11-20 09:26:08 +01: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 fb3ad8c0df Merge branch 'master' into release/v2.14.1 2020-11-17 17:56:56 +01:00
Daniel Sanchez 456d28c37d Change hw-transport-node-hid for hw-transport-node-hid-singleton 2020-11-17 15:37:59 +01:00
Daniel Sanchez 9d7fec573d Merge branch 'master' into release/v2.15.0 2020-11-16 12:52:21 +01:00
Daniel Sanchez 3bab94e70d Rollback node-sass to latest v4 version 2020-11-13 15:08:32 +01:00
Daniel Sanchez 710a2a99ed Upgrade @truffle/contract to a version that uses web3@1.2.9
Fix scrypt issue building in windows
2020-11-13 13:32:14 +01:00
Daniel Sanchez 26231ef54b Update node-gyp and node-sass to latest version
This is intended to avoid memory leak in windows machines
2020-11-13 12:45:12 +01:00
Daniel Sanchez 3c795462b7
Rollback web3 to v1.2.11 to avoid issues with walletconnect (#1599) 2020-11-12 20:20:54 +01: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
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
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
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
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
Fernando 9ca9007105
(Feature) - xDai Compatibility (#1476)
* feat: Support for Volta and EWC

* chore: Store network ID in the ETHEREUM_NETWORK enum itself

* chore: forward tx and address to non-etherscan explorers

* fix test, avoid assigning enum to const

* (Feature) [xDai] - Create network-based configurations (#1420)

Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>

* (Feature) [xDai] Use generic config (#1422)

Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>

* fix function name after merge development

* (Feature) [xDai] - Contract interaction abi lookup (#1429)

* Filter Apps by network (#1433)

* Filter apps by network

* (Feature) [xDai] - Parametrize ethscan values (#1424)

* (Feature) [xDai] - Use parametrized network values (#1437)

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Use tx service for loading token info (#1435)

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Visually differentiate networks (#1431)

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>

* (Feature) [xDai] - Cosmetic fixes (#1449)

* Add staging configuration for deployment using xDai (#1459)

* Add staging xDai deployment to travis

* Add safe apps production url for xdai

* Add travis rule to build xDai on master or integration branch

* (Bugfix) Set min height to ListContentLayout wrapper #1447 (#1451)

* fix min-height app container and margin to info text at
bottom

* change css unit from % to vh

Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* disable OpenZepplin in xDai (#1465)

* remove any in config/index.ts (#1462)

* [xDai] Parametrize Native Coin (#1444)

* fix `generateBatchRequest` calls

* Fix some ETH harcoded values + Add tests

* Fix null or undefined value

* Move nativeCoin outside component + fix toTokenInput function

* Remove native coin from useEffect

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Disable safe sections based on network config (#1468)

* Adds FEATURES enum
Renames features to disabledFeatures

* Uses FEATURES enum instead of hard-coded contract features

* Refactor enabledFeatures function, now checks that there are not disabled features by config before return the enabledFeatures result

* Adds SAFE_APPS and CONTRACT_INTERACTION to FEATURES enum

* Remove SAFE_APPS from sidebar if disabled

* Redirect user from /apps if safe apps are disabled

* Disables contract interaction from config

* Remove !remoteOwners

* Move settings to a constant

* Deploy from xDai integration branch only to xDai staging

* Fix .travis.yml warnings

* Update branch and condition for staging deployment

* Update xDai depoy condition

* (Feature) [xDai] - Fetch collectibles from Gnosis services (#1460)

* Add https to safe-xdai apps link

* make getExplorerInfo return values per network (#1470)

* (Fix) "Approve transaction" modal closes (#1477)

* add equality function to prevent re-renders

- I left the inline equalityFn, as an ad-hoc solution.
First, because we're going to remove this when https://github.com/gnosis/safe-react/issues/1479 is done
Second, because this way it infers the types defined in the useSelector generics

* (Fix) xDai feature issues (#1484)

Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* RPC interactions errors (#1475)

* Add options to httpProvider

* Add log when generateatchRequest fails

* add types to generateBarchRequest

* fix types in `generateBatchRequests`

* add `.d` for imports of definition files

* add `undefined` alternative value for `generateBatchRequests` ReturnValues

- also, fixed typing errors in related functions

* fix return values for `generateBatchRequests` in tests

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) xDai configs (#1489)

* (Feature) - Replaces ETH with network native coin (#1491)

* Remove networkInfo from the components

* Replaces humanReadableValue to fromTokenUnit

Co-authored-by: JosephBagaric <bagaricjos@gmail.com>
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-10-18 21:48:22 +02:00
Daniel Sanchez eab0e73ac6
Bump dependencies (#1478)
* Upgrade dependencies without breaking changes

* Update electron and gnosis dependencies with minor changes

* Upgrade dependencies with minor changes and remove unnecessary electron dependency

* Upgrade truffle-contract to latest @truffle/contract
2020-10-15 17:01:12 +02:00
dependabot[bot] 032b93c603
Bump electron from 9.3.0 to 9.3.1
Bumps [electron](https://github.com/electron/electron) from 9.3.0 to 9.3.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v9.3.0...v9.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-06 18:15:48 +00:00
Daniel Sanchez 171b6d9ddc
Update travis script to execute tests (#1382)
* Update travis script to execute tests

* Update ReviewInformation components to remove type error

* Fix tests and import types without .d

* Upgrade dependencies with minor changes
2020-09-24 16:04:35 +02:00
Mati Dastugue dc632be4e2
Not able to connect with Opera Touch (#1378)
* Bump new onboard.js version

* Fix opera touch
2020-09-21 10:41:22 +02:00
Mikhail Mikheev 8a6633db92
Apps/Feature #37: add onUserReject event handler (#1354)
* add onUserReject event handler

* fix invoking possibly undefined func

* update sdk version

* yarn lock update

* fix network passing
2020-09-15 20:21:03 +04:00
Daniel Sanchez 8efafc1aaa
1265 Restore strict null checks (#1336)
* dep bump, enable strictNullChecks ts compiler option

* remove unused imports

* nullchecks errors wip

* fix clipboard func type errors

* fix send funds validation

* Update style load in ThresholdSettings

* Fix isValidAddress default state for SendCollectible

* fix OwnersColumn return type

* fix extractUsefulMethods typing

* Bug: incoming transactions do not load if it fails to fetch gas for a transaction (#1321)

* check if gas returned values are valid when loading token info for incoming tx

* Fix generateBatchRequests

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
(cherry picked from commit 372d27f5a6)

* Revert "Revert "Tech debt 1265: Enable strictNullChecks TS compiler option (#1301)" (#1335)"

This reverts commit 43bc4984b8.

* Fix safe clean load

Fix transaction nonce get

* Fix issue adding owners again after reloading the page

* Add viewedSafes correctly to current session

* Add typing and reduce dependency with immutable

* Rename SerializedSessionState to CurrentSessionState

* Remove immutable from currentSession

* Use Dispatch type defined using ThunkDispatch

* Remove if as parameter should always be defined

* Fix test typo issues

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-09-15 09:50:51 +02:00
Daniel Sanchez 141b6464ae
Add manual trigger to desktop app build (#1356)
* Set desktop app build on workflow_dispatch

* Update workflow_dispatch

* Add yarn cache to build desktop app

Upgrade electron to latest compatible version

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-09-14 23:06:10 +04:00