Commit Graph

2184 Commits

Author SHA1 Message Date
nicosampler e31ef44d76 run prettier for files faining in CI 2020-07-30 15:32:03 -03:00
nicosampler b84db710e8 Merge branch 'development' into issue-1144 2020-07-30 12:08:00 -03:00
nicolas 251da319a5
Fix: debounce fetch apps (#1021)
* Fix: debounce fetch apps

* refactor: fix AddAppForm name and add missing types

* add `use-lodash-debounce` hook to test debounce functionality

I'm planning to remove this dependency, as it requires to also install `lodash.debounce`. I prefer to implement it ad-hoc.

* refactor AddAppForm to use the observable pattern

* memoize `getAppInfoFromUrl` to prevent requesting the same information over and over

* prevent requesting data if url is not valid

* remove logging

* prevent validating form before visiting the fields

* refactor AddAppForm

reorganize code

* fix: change `any` to `unknown`

* fix: `uitls.ts` types and imports

* refactor: rename `isSubmitDisabled` to `onSubmitButtonStatusChange` prop

* refactor: rename `agreement` to `agreementAccepted`

also, moved `initialValues` to a constant `INITIAL_VALUES` outside the component

* refactor: reimplement `useDebounce` hook in-app

* refactor: extract app manifest verification to a helper function

also fixed types

* fix: prevent accessing `contentWindow` if `iframe` is `null`

* fix: `getAppInfoFromOrigin` return type

also, removed the expected type for the `getAppInfoFromOrigin` calls as it is inferred

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-30 18:28:30 +04:00
nicosampler 5cc29d518d Add network 2020-07-29 16:33:04 -03:00
nicosampler a295747cb6 Wallet details 2020-07-29 16:16:29 -03:00
nicosampler 184c1cb08e Transaction List 2020-07-29 15:28:14 -03:00
nicosampler 8bc7d3efcc Connected wallet 2020-07-29 14:40:51 -03:00
Daniel Sanchez 89c17180de
Trim spaces from AddressInput (#1142)
* Remove spaces

* Change naming convention to make clear that only edge whitespaces are removed

Fix function documentation in string util

* Add trim spaces from address input in AddToken and AddAsset

* Use validator type

* Trim spaces on Safe App links

Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-29 17:28:43 +04:00
nicosampler 3a04b077b2 Safes list 2020-07-28 19:23:42 -03:00
nicosampler 617863fb54 fix TS error 2020-07-28 19:09:29 -03:00
Agustin Pane bbfa7d8166
(Feature) Balances enhancements (#1122)
* Fix ts error
Add type return on fetchCurrencyValues

* Add skeleton for loading balance value

* Fix texts in uppercase

* Adds ETH Icon in currencyValues dropdown

* Adds getExchangeRatesUrlFallback
Adds support for ETH as currency

* Alphabetically sort currencies

* Add types

* Type formatAmount

* Adds formatAmountInUsFormat util function

* Add types
Uses formatAmountInUsFormat for BALANCE_TABLE_BALANCE_ID

* Updates max and min fraction digits on formatAmountInUsFormat
Add tests

* Updates max and min fraction digits on formatAmountInUsFormat
Add tests

* Add types

* Fix currencyValues types

* Adds safeFiatBalancesTotalSelector

* Adds total balance to safe header

* Fix types

* Adds currentCurrency on header

* Adds types to getTokenPriceInCurrency

* Fix balance currency rate conversion

* Add guards for modules

* Add guards for modules

* Uses console error for api

* Remove anys

* Redefine CurrencyRateValue types into CurrencyRateValueRecord

* Redefine test texts

* Use absolute imports

* Add types to dispatch

* Add guard for no balance value

* Fix ESLINT warning

* Add types

* Fix no balance case

* Use optional chaining

* Absolute paths

* Adds return types
Uses BigNumber in safeFiatBalancesTotalSelector

* Remove number as type for formatAmountInUsFormat

* Uses createStyles to remove any types

* Improve total balances display

* Fix balances value column

* formatAmountInUsFormat feedback

* Force boolean evaluation

* Fix totalBalance heading styles

* Add types

* Add types to fetchTokenCurrenciesBalances endpoint

* Replaces coinbase dependency by backend for ETH price in USD

* Absolute paths

* Replaces RecordOf<TokenProps> with Token

* Feedback

* Trigger buid

* Types

* Fix tests order

* Renames numberFormat to usNumberFormatter

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-28 19:29:26 +04:00
Mati Dastugue 8a6b219781
Fix - Owners list error (#1127)
* Add validation for addressBooj

* Fix types

* Update default value

* Update src/logic/addressBook/utils/index.ts

Co-authored-by: Fernando <fernando.greco@gmail.com>

Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
2020-07-28 15:25:26 +04:00
Mati Dastugue 91a85ae9ea
Fix Wrong Wallet Network Label (#1163)
* Fix network label

* rename component

* use interfaceNetwork as a default parameter

Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Mikhail <mmvsha73@gmail.com>
2020-07-28 11:54:19 +04:00
Mikhail Mikheev f62bbffdd3
Tech Debt: Validator Type definitions (#1108)
* type validators

* safeSelector types

* history 5.0.0 breaking changes adaptation

* replace simpleMemoize with memoize from lodash because of typing issues

* add type definitions for history and react-router-dom

* type fixes

* yarn lock update

* fix router state

* more type improvements

* validator tests wip

* add tests for validators, remove duplicated validators

* add error messages to tests

* fix minValue error message for inclusive param

* Replace jsx.element with react.reactelement

* Fix uniqueAddress validator argument type

* remove comment in AddCustomToken validator

* use absolute import for saferecord in safe paage container
2020-07-27 14:31:13 +04:00
Agustín Longoni 93448b550a
fix modal position at top (#1160)
Co-authored-by: Fernando <fernando.greco@gmail.com>
2020-07-27 13:55:53 +04:00
Fernando fc20ce5775
(Fix) Prevent accessing `contentWindow` if `iframe` is `null` (#1161) 2020-07-24 17:46:11 -03:00
nicolas 0b25094b95
Set timeout to Safe-Apps fetch (#1158)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-24 18:36:41 +04:00
Germán Martínez 253639d009
Safe apps can request the Safe info (#1138)
* Request Safe info from Safe apps

* Update dependencies

* Update yarn.lock file

* remove usecallback

* Rename initialization messageId from safe-apps-sdk

* Fix openOnFocus on AddressBookInput

* Fix yarn.lock file

* Rollback @material-ui/lab to avoid type errors

* dep bump

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-24 17:56:24 +04:00
Daniel Sanchez e22a80c152 Update Synthetix app IPFS link 2020-07-24 10:06:47 +02:00
Mikhail Mikheev 9807a06629
v2.7.1 Update synthetix app, dependencies bump (#1145)
* Dep bump

* 2.7.1

* update synthetix app url & enable it

* Revert "Dep bump"

This reverts commit 25750e41fa198f6bed8c47b94082a515645fdc7c.
2020-07-23 17:10:43 +04:00
nicosampler c1c5488d53 Fix: [SafeApps] add app input 2020-07-22 12:54:14 -03:00
Daniel Sanchez acc558ff42 Merge remote-tracking branch 'origin/development' into release-changes-from-master-to-development 2020-07-22 13:06:45 +02:00
Daniel Sanchez 715988ff27 Disable synthetix app for mainnet deployment 2020-07-22 10:54:30 +02:00
nicolas 240b2068ef
replace links and legal text (#1132) 2020-07-21 17:33:13 +04:00
Agustin Pane 6ba98f4e8a
(BugFix) Add guard type for modules (#1124)
* Add guards for modules

* Add guards for modules

* Update src/routes/safe/store/actions/fetchSafe.ts

Co-authored-by: Fernando <fernando.greco@gmail.com>

Co-authored-by: Fernando <fernando.greco@gmail.com>
2020-07-20 20:17:33 +04:00
fernandomg a4d6e224f3 remove optional props 2020-07-18 10:26:32 -03:00
fernandomg fc28d1c833 fix dispatch misuse 2020-07-18 10:08:16 -03:00
fernandomg c28124b685 remove List from selectors 2020-07-17 17:33:21 -03:00
fernandomg 46e567ba88 add typing for TxDescription components 2020-07-17 17:13:36 -03:00
Fernando b5c3f08642
Merge branch 'development' into feature/#934-advanced-settings 2020-07-17 14:29:19 -03:00
fernandomg cc103c00d7 refactor: Advanced settings component 2020-07-17 14:25:05 -03:00
Mati Dastugue 4782d81204 Merge branch 'feature/wallet-enhacements' of github.com:gnosis/safe-react into feature/wallet-enhacements 2020-07-17 12:21:53 -03:00
Mati Dastugue 0237de751f Feedback PR 2020-07-17 12:21:05 -03:00
fernandomg ad9ee25b36 refactor: move `Dispatch` type to a common place 2020-07-17 12:00:50 -03:00
fernandomg c74b79bf67 refactor: prevent using reducer's name for field selection 2020-07-17 11:51:18 -03:00
fernandomg 3b7992a9e1 fix: remove unnecessary `async` 2020-07-17 11:12:24 -03:00
fernandomg 95e557b133 refactor: remove optional chaining as modules is always returned as an array 2020-07-17 11:10:27 -03:00
fernandomg 1ccb37e031 refactor: move tableTypes to `src/components/Table/types.d.ts` 2020-07-17 11:08:24 -03:00
fernandomg 1064e3deb8 fix relative paths and commented lines 2020-07-17 11:05:06 -03:00
fernandomg d483f1ff16 fix "cannot read `size` of undefined" error message 2020-07-17 11:04:49 -03:00
fernandomg eab41bd314 display module tx information 2020-07-16 23:09:24 -03:00
Fernando 6442b52562
Merge branch 'development' into feature/#934-advanced-settings 2020-07-16 19:12:59 -03:00
Mikhail Mikheev 17aef9703a
Merge branch 'development' into feature/wallet-enhacements 2020-07-17 01:14:05 +04:00
nicosampler db20cf107c Add synthetix app 2020-07-16 17:32:45 -03:00
Mati Dastugue f9a345d200 merge with develop 2020-07-16 12:13:06 -03:00
fernandomg 665d87eec7 Revert "replace `any` with `unknown`"
This reverts commit 8209e950
2020-07-16 10:30:05 -03:00
fernandomg 1674dab6ae Merge branch 'development' into feature/#934-advanced-settings 2020-07-16 10:26:32 -03:00
fernandomg 4634041467 prevent TypeError when viewedSafe is undefined 2020-07-16 10:23:25 -03:00
fernandomg 67c67f4569 set type for dispatch actions in hooks 2020-07-16 10:23:23 -03:00
Mikhail Mikheev cd6078e0a8
Merge branch 'development' into AddingTestId 2020-07-16 16:31:02 +04:00
fernandomg 8209e950d6 replace `any` with `unknown` 2020-07-15 18:50:19 -03:00
fernandomg 1671136115 replace `JSX.Element` with `React.ReactElement`
See: @Ferdaber's note at: https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/docs/advanced/types-react-ap.md

> I discourage the use of most `...Element` types because of how black-boxy `JSX.Element` is. You should almost always assume that anything produced by `React.createElement` is the base type `React.ReactElement`.
2020-07-15 18:48:29 -03:00
fernandomg b9262ffdf0 fix cannot read map of null error 2020-07-15 18:44:44 -03:00
Mikhail Mikheev a6600c703d add ethereumnetworks type 2020-07-15 19:12:23 +04:00
Mikhail Mikheev 4eb5a6b12f use inferred type for owners in OwnerForm 2020-07-15 18:25:54 +04:00
Mikhail Mikheev 211749aab8 fix fetchTransaction/createTransaction types 2020-07-15 18:14:28 +04:00
fernandomg fa30de45a8 Merge branch 'development' into feature/#934-advanced-settings 2020-07-15 08:33:22 -03:00
fernandomg 3858daf649 fix owners typing 2020-07-14 18:33:25 -03:00
fernandomg 32598bbe87 fix relative path 2020-07-14 17:04:39 -03:00
fernandomg 012f0a9693 Extract [string, string] as ModulePair type 2020-07-14 17:02:15 -03:00
fernandomg 79e80ea5e4 replace ternary with nullish coalescing operator 2020-07-14 16:43:32 -03:00
fernandomg 342acd27c4 use `JSX.Element` and fix imports 2020-07-14 16:42:05 -03:00
fernandomg 5cb1eb483a extract `TableColumn` interface to a common place and use where necessary 2020-07-14 16:22:22 -03:00
fernandomg 1fb191b7ae fix `valueInWei` so its always a string 2020-07-14 16:01:00 -03:00
fernandomg 92cb386cc7 remove usage of template string as `ethBalance` is only of string type now 2020-07-14 15:57:39 -03:00
fernandomg d9e428c4ed create `ProviderState`
done out of consistency, but with `ProviderRecord` it would have been enough
2020-07-14 15:00:37 -03:00
fernandomg c314910713 use `TokenState` in AppReduxState 2020-07-14 13:14:37 -03:00
fernandomg 4e18a416ee create `TokenState` 2020-07-14 12:57:10 -03:00
nicosampler 475e95bf5f Allow HX values 2020-07-14 10:15:04 -03:00
fernandomg f96eb3b8da rename SafeVersion interface 2020-07-14 09:21:11 -03:00
fernandomg b709f7774a fix ethBalance typing, set it to only `string` type 2020-07-14 08:39:48 -03:00
fernandomg 8bdfdb906c fix type for `AddressInfo` 2020-07-14 08:36:25 -03:00
fernandomg a8b8284bf4 fix modules discovery 2020-07-13 18:26:09 -03:00
fernandomg caaf7c8812 fix typing after merge 2020-07-13 16:25:38 -03:00
fernandomg 77eb70edf7 Merge branch 'development' into feature/#934-advanced-settings 2020-07-13 13:37:16 -03:00
francovenica 0129a720b0
Merge branch 'development' into AddingTestId 2020-07-13 10:19:52 -03:00
Mikhail Mikheev 34209aeb49 Merge branch 'master' of github.com:gnosis/safe-react into 2.6.1-dev-master-backemerge 2020-07-09 11:39:24 +04:00
Mikhail Mikheev c6d8d179aa
Merge branch 'development' into AddingTestId 2020-07-09 10:31:24 +04:00
Mikhail Mikheev 5072ad71b8
Merge branch 'development' into coveralls 2020-07-09 09:53:46 +04:00
Mati Dastugue 67c7506c4d Wallet enhancements 2020-07-09 01:06:49 -03:00
Agustin Pane ec83fc61ca Replaces ProviderInfo with ProviderProps 2020-07-08 16:12:45 -03:00
Agustin Pane c55c9236aa Add types for isSmartContractWallet 2020-07-08 16:08:08 -03:00
Mati Dastugue 5925f6ef9b
Update ts type for handleChange 2020-07-08 16:00:24 -03:00
nicosampler fb12430cc9 update request app 2020-07-08 15:47:31 -03:00
francovenica 855a69e434
Merge branch 'development' into AddingTestId 2020-07-08 13:35:44 -03:00
Mati Dastugue 73ba4d1897
Merge branch 'development' into fix/allow-repick 2020-07-08 12:41:43 -03:00
Fernando 9d4a7b84d5
(Fix) Load Safe if the address exist (#1104) 2020-07-08 11:41:25 -03:00
Agustin Pane 53731ffd9c Merge branch 'development' of https://github.com/gnosis/safe-react into coveralls
# Conflicts:
#	yarn.lock
2020-07-08 10:27:41 -03:00
Agustin Pane 7458eb0957 Fixs getProviderInfo usage 2020-07-08 10:26:33 -03:00
Agustin Pane 8fd252d1a7 Adds types in getWeb3.ts 2020-07-08 10:25:45 -03:00
Agustin Pane 8fb5cf5e63 Adds web3-core types 2020-07-08 10:07:38 -03:00
francovenica 6b3d7304f4
Merge branch 'development' into AddingTestId 2020-07-07 17:13:14 -03:00
Franco Venica b10928dbde add test id for send_funds test 2020-07-07 16:20:18 -03:00
Mati Dastugue 6611027b35 Merge branch 'development' of github.com:gnosis/safe-react into fix/allow-repick 2020-07-07 12:25:55 -03:00
Mikhail Mikheev e4ffd326a8 add 1inch.exchange app 2020-07-07 16:09:10 +04:00
Mikhail Mikheev 492b45f13a
Merge branch 'development' into 2.5.2-dev-master-backmerge 2020-07-07 11:28:41 +04:00
Agustin Pane 26a358a3af
(Feature) - 1029 Improve Polling behaviour (#1047)
* Adds exponential backOff for fetch methods

* Avoid multiple requests before the last finished

* Removes unused dependency

* Adds try catch

* Fix isFetchingData variable initialization

* Add return type to fetchAllUserCollectiblesByCategoryAsync

* Improve typings for fetchSafeTokens

* Add more types

* Improve types usage

* Improve types usage

* Refactor useCheckForUpdates to avoid calling the actions before they finished

* Updates typing in OpenSea.ts

* Update store types

* Update store types

* Remove unused promises

* useCheckForUPdates & useFetchTokens refactor wip

* enhanced safe state/selector types

* refactor useCheckForUpdates

* improve comment in useSafeScheduledUpdaates

* type enhancements

* use checksumAddress to checksum an address

* dep bump

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
2020-07-06 16:34:14 -03:00
Mikhail Mikheev 54ed00564b
2.5.1 Dev <- master backmerge (#1093)
* check if there as a pending transaction before marking transaction as a cancellation one

* update pkg.json
2020-07-06 12:04:31 -03:00
Agustin Pane 4c7fa87b1d Merge branch 'master' into 2.5.2-dev-master-backmerge 2020-07-06 12:02:52 -03:00
Agustin Pane d5f05536c3
(Hotfix) Tx decoding (#1094)
* Add types

* Fix missing condition

* Update Version
2020-07-06 09:54:49 -03:00