Commit Graph

3501 Commits

Author SHA1 Message Date
Mikhail Mikheev 29ebf6667e
bump truffle version (#2389) 2021-06-08 09:22:55 +02:00
katspaugh add406c42b Merge branch 'master' of github.com:gnosis/safe-react into development 2021-06-07 09:57:21 +02:00
katspaugh c424c67d07 Revert "Fix: don't display Intercom in Safe Apps (#2365)"
This reverts commit 07465a0b29.
2021-06-07 09:21:33 +02:00
katspaugh 5f3598aed5 Bump version to 3.7.0 2021-06-07 08:46:21 +02:00
katspaugh 1c5bb22a59
Update readme, remove truffle and ganache instructions (#2398)
* Update readme, remove truffle and ganache instructions

* Rm exchange rate constants

* Move env vars info higher
2021-06-04 16:20:25 +02:00
Mati Dastugue 45205f8a77
Bugfix - Owners table sorting is not working correctly (#2364)
* Add custom sort funcionality

* Add correct types

* Fix undefined sorting type
2021-06-04 15:03:51 +02:00
Daniel Sanchez 2d532f303a
Set default order by name in address book (#2391) 2021-06-03 16:59:28 +02:00
Mikhail Mikheev 7ac1e1efdd
Feature: Relay safe apps sdk getBySafeTxHash api request (#2361)
* install new sdk version

* fix ts errors

* handler scaffold

* add api function for fetching tx, safe app msg handler

* bring back getEnvInfo method

* remove upperFirst where it is not needed

* move upperFirst import
2021-06-03 18:54:21 +04:00
Fernando 50a7a49d1b
keep safes with no name for the list of safes (#2387)
* keep safes with no name for the list of safes

* prevent storing only those safes whose `loadedViaUrl` flag is true

* update AB before Safe store

* default safe name to empty string if it is not available
2021-06-03 16:49:09 +02:00
Daniel Sanchez e66040d32f
[Address Book v2] Allow empty owner names when loading a safe (#2390)
* Allow to load new safe with empty owner names

* Avoid adding owners to addressbook if name is empty

* Remove unnecessary initialization
2021-06-03 15:24:55 +02:00
katspaugh 548d6d26ed Merge branch 'development' of github.com:gnosis/safe-react into address-book-v2 2021-06-03 11:58:10 +02:00
juampibermani 07465a0b29
Fix: don't display Intercom in Safe Apps (#2365)
* Check if current screen is the app view

* Get app url from utils hook

* Hook rename and updated effect dependency
2021-06-02 17:03:03 -03:00
juampibermani c5207f75c7
Feature/2317 update import export global ab (#2370)
* Verify chainId column and called import reducer

* Added dispatch for addressbook import

* Fixed store reducer and notification

* Validate all entries on csv data validation

* Using utils to verify imported addresses

* Add props typing to ImportEntriesModal

* Convert chainId to number
2021-06-02 12:13:40 -03:00
Fernando 5bc38ff09e
[Address Book v2] - Avoid deleting addressBook entry when deleting a safe (#2374)
* avoid deleting addressBook entry when deleting a safe

* avoid deleting addressBook entry when deleting a safe
2021-06-02 15:55:13 +02:00
katspaugh 9242d80079
Use the same link in the import and export modals (#2380) 2021-06-02 14:36:26 +02:00
Daniel Sanchez e97d228429 Set v3.6.7 2021-06-02 11:58:46 +02:00
Fernando 94bee4f8df
[Address Book v2] - Prevent name validation in AB reducer (#2356)
Co-authored-by: katspaugh <katspaugh@users.noreply.github.com>
2021-06-01 09:49:51 -03:00
Fernando fc0c450a74
[AddressBook v2] - Avoid using `checksumAddress` inside reducer (#2355) 2021-06-01 09:13:18 -03:00
Daniel Sanchez e58b6d6b7b
[Address Book v2] 1603 Use addressbook over known addresses (#2352)
* Use ADDRESS_BOOK_DEFAULT_NAME instead of hard coded string

* Use address book name in Send Collectible review step

* Show name if known in contract interaction review

* Use string comparison util
2021-06-01 12:17:58 +02:00
Mikhail Mikheev cc345946e6
Feature: Better error handling for Safe apps things (#2340)
* handle request/app fetch errors

* shorted extraMessage for app fetch error

* use context instead of extra for safe app url exception when fetching

* app -> safeApp for sentry context
2021-06-01 12:10:57 +02:00
Daniel Sanchez 1758cb34c3 Merge branch 'development' into hotfix/v3.6.6 2021-06-01 11:15:15 +02:00
Daniel Sanchez 6bc73b744a Set v3.6.6 2021-06-01 10:29:56 +02:00
Daniel Sanchez 8c40f43730 Fix crash with Coinbase Wallet after upgrade to latest version (#2363)
* Fix name changing in bnc-onboard Coinbase Wallet

* Add comment in wallet provider list to explain the use
2021-06-01 10:29:40 +02:00
Daniel Sanchez f1851d47a4
Fix crash with Coinbase Wallet after upgrade to latest version (#2363)
* Fix name changing in bnc-onboard Coinbase Wallet

* Add comment in wallet provider list to explain the use
2021-06-01 10:28:44 +02:00
dependabot[bot] c1dd274ede
Bump dns-packet from 1.3.1 to 1.3.4 (#2338)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 18:04:41 +02:00
katspaugh 2fdc5e05a9
Add an API key in the ETHGasStation URL (#2332)
* Add an API key in the ETHGasStation URL

* Fix typo

* Revert mainnet api key

* Add the env var in github actions

* Revert "Fix typo"

This reverts commit c9b463099d9b38d481d21f42b4cedb8eafb0b83c.
2021-05-28 11:28:31 +02:00
Mati Dastugue 0d915a6bc1
Export - Add loading state when click on download button (#2325)
* Add loading state when click on download button

* Expand clickable area for link
2021-05-27 17:26:38 +02:00
katspaugh 2308c1f567
[Address Book v2] Fix AB v2 migration (#2345)
* Refactor AB migration

* Fix AB v2 and safes migration

* Don't migrate if already migrated

* Restore removeFromStorage
2021-05-27 15:52:15 +02:00
nicolas 15d3cb8ff4
Tx decoded data, fix addresses array (#2309) 2021-05-27 13:34:24 +04:00
Mikhail Mikheev be39e4a8e3
Feature: Allow apps to request safe balances (#2316)
* add api function fetchTokenBalances, code improvements

* update test

* Update sdk version

* handle getSafeBalances call

* console.log > console.error

* rename declaration file

* rename declaration file, fix types

* use logError func to log error in communicator

* accept currency for getSafeBalance

* sort imports

* add generic error for processing safe apps requests

* add error codes for safe apps

* add usage of error 900

* fix logError usage in getAppInfo
2021-05-27 13:29:46 +04:00
Mikhail Mikheev 12edb5b988
Feature: Allow passing additional context to CodedException (#2334)
* Allow passing context to CodedException

* create a test for context

* update test

* sentryContext > context

* rename sentryContext in test
2021-05-27 12:54:18 +04:00
katspaugh bf39501ebb
Fix typo (#2335) 2021-05-27 09:53:28 +02:00
Fernando 82519b84b6
add back `loadedViaUrl` flag (#2337)
* add back `loadedViaUrl` flag

* implicitly set `loadedViaUrl` to `false` when adding a safe via form or setting its name from Settings

* exclude safes whose `loadedViaUrl` flag is `true`

* hide "Remove Safe" button for safes `loadedViaUrl`

* add `loadedViaUrl` flag to mocked safe
2021-05-27 09:31:49 +02:00
fernandomg 51c05e928d fix runtime issue with `addressBookName` not being provided 2021-05-26 18:47:03 -03:00
fernandomg dd3d09e157 Merge branch 'development' into chore/address-book-v2-conflict-resolution 2021-05-26 18:45:26 -03:00
Fernando 019d6cc5dd
[Address Book v2] Make the address book global (#2296)
* WIP: add `chainId` with default value to `AddressBookEntry`

* WIP: first approach to the new AB structure and data persistence in localStorage

* migrate AB

* migrate AB actions

* migrate AB reducers

* update AB selectors

* update AB middlewares

* update AB utils

* update AB model file

* migrate AB usage to the new structure

* change AB notification key name

* fixes after rebase

* add `addressBookBatchLoad` action

* create a selector for owners with AB data

`safeOwnersWithAddressBookDataSelector`

* migrate safe->owners structure

* make `name` and `address` mandatory for `makeAddressBookEntry`

* filter out invalid AB names before storing them

* review Load & Open flow for owner's names

* update owners' reducers and actions

- `editSafeOwner` no longer necessary as there's no name change in the owners' list

* create AB map-like selector

chainId -> address -> name

* auto-complete owner's name if it exist in the AB

* update replace owner modal and remove REPLACE_SAFE_OWNER

- no longer optimistically update the owner's list if threshold === 1, as it behaves erratically with the constant update from data provided by the services
- `REPLACE_SAFE_OWNER` no longer necessary

* update remove owner modal and remove REMOVE_SAFE_OWNER

- no longer optimistically update the owner's list if threshold === 1, as it behaves erratically with the constant update from data provided by the services
- `REMOVE_SAFE_OWNER` no longer necessary

* update add owner modal and remove ADD_SAFE_OWNER

- no longer optimistically update the owner's list if tx is signed, as it behaves erratically with the constant update from data provided by the services
- `ADD_SAFE_OWNER` no longer necessary

* update yarn.lock after rebase

* fix AddressBookMap type

* create a migration function for safe's names

* create selectors that require safe's name

* remove `name` from the safe model and update related code

* JSON.parse if JSON.parsed string returned a string instead of a JSON

* remove commented lines

* rename BATCH_LOAD to SAFE_LOAD

* refactor AddressBookMap to `chainId`->`address`->`AddressBookEntry`

* make `chainId` optional for `getNameFromAddressBookSelector`

* use `addressBookMapSelector` for a more direct AddressBook entry name lookup

* remove `loadedSafeViaUrl` flag, and rely on address book entry instead

* replace `addAddressBookEntry` action with `addressBookAddOrUpdate`
2021-05-26 17:25:01 +02:00
Mikhail Mikheev 5eef50ea4a
remove truffle related folders (#2333) 2021-05-26 17:58:47 +04:00
Daniel Sanchez 6773e546b6 Set v3.6.5 2021-05-25 11:20:52 +02:00
Daniel Sanchez 9119550373
Catch backend error and send controlled form error (#2324) 2021-05-25 10:41:31 +02:00
Mati Dastugue 3e4c9cf7d3
Bugfix - Safes added via URL not stored when changing name (#2310)
* Fix Types

* Fix adding a safe to the list after it was accessed via URL

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-05-25 10:41:13 +02:00
juampibermani 55b40f91be
Fix/2292 dont trigger transactions with not enough signatures (#2312)
* Check if the transaction confirmations reaches the threshold

* Added a notification when transaction doesn't have the confirmations

* Added confirmations verification before opening the execute modal
2021-05-24 11:40:54 +02:00
Fernando e0e23255ad
(Feature) Disable buttons while busy and fix modal buttons styles (#2247)
* button margin on Execute tx modal

* button margin on Advanced option modal

* fix lowercase on modal titles

* button margin and styles on Remove module modal

* button margin on Remove Safe modal

* buttons margins on Add new owner

* button margin and styles on Edit owner name modal

* button margin and styles on Replace owner modals

* fix modal heading height on Add new owner modal

* button margin and styles on Remove owner modals

* button aligmnent on Change required confirmations  modal

* buton alignment and styles on  create entry modal

* button aligmnent and styles Delete entry modal

* button alignment and styles on Add custom app modal

* add gap to the butons on modals

* add gap

* fix button color on Remove Safe

* add gap on remove module modal

* add gap on  Manage Safe Owners

* add gap on Policies modal

* add gap and remove some styles from TxList

* add gap and remove styles on Contract Interaction Modal

* add gap and remove styles from Send funds modal

* add gap and remove styles from Send collectible modal

* fix eslint issues

* upgrade SRC dependency

* remove unused variable

* WIP: common pattern for button status

* WIP: add status to generic Modal buttons

* WIP: text status for App modal

content is restricted to text

* WIP: common patter in settings buttons

* WIP: RemoveLimitModal button status

* add `testId` prop to Modal buttons

* use Modal's buttons status

* add default text for LOADING and READY status in Modal Buttons

* overwritte button text only when necessary

make use of the LOADING/READY default status texts

* create `useButtonStatus` hook to avoid code repetition

* Add `withoutBorder` prop to Modal.Footer

* Adapt Apps Modal footer to use Modal.Footer and Modal.Footer.Buttons

* Update Spending limits modals

* update app modal button text

* add `useButtonStatus` wherever it was missing

* rename and simplify `useButtonStatus`

new name: `useEstimationStatus`

removed `data` as argument, as it is was not adding any benefit

* update `txEstimationExecutionStatus` when no data provided

* Add validation for the hex data in custom contract interaction

* remove old buttons

* use default instead of cases

* set default EstimationStatus to SUCCESS

* Replace footer wrapper with `Modal.Footer`

* rollback EstimationStatus status when no `txData` is present

* fix Modal.Footer styles

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

* fix New Transaction modals buttons

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

* fix advanced settings styles

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

* fix settings->owners styles

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

* fix settings->remove safe modal styles

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

* fix settings->policies styles

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

* fix settings->spending limit styles

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

* fix apps modal styles

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

* fix txs list modal styles

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

* update Modal props and styles

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

* fix styles for Apps modals

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

* cleanup spending limit modal implementation

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

* fix receive modal button

* fix address book modal buttons

* fix receive modal header height

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

* fix add owner modal buttons

* fix add owner modal buttons (threshold)

* delete commented code

* fix Advanced option modal buttons and styles on Divider

Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-05-21 16:35:49 +02:00
juampibermani 28afa59d48
[Address Book V2] Import address book (#2290)
* Added import modal and import functionality

* Added modal refactor

* Added entry validations

* Added message after loading file

* Reset values on modal close

* Minor formal changes

* Entry list validations on separate functions

* Minor changes

* Text corrections

* Check if isAddress instead of checksum

* add styles on import

* fix sidebar label for ADDRESS BOOK (with a space)

* fix modal title in lowecase

* replace icons on AB list

* Clear upload feedback on modal close

* add styles to drag and drop area

* add link to Help Center article

* remove unused styles

* change color when is an error

* change error color

* fix error color and align file size

* Modal refactor

* fix button styles on modal

* fix long file names

Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
2021-05-21 14:41:40 +02:00
Fernando b9b83206d3
(Chore) Simplify PR template (#2303)
* simplify PR template

* update titles

also changed to h2

* remove comment

Co-authored-by: katspaugh <katspaugh@users.noreply.github.com>
2021-05-21 10:54:08 +02:00
Joel Raju 24069ca5bf
Catch the TypeError which occours when contractCode is undefined (#2314) 2021-05-21 10:49:16 +02:00
Daniel Sanchez 08953e36c0
[Spending Limit] Integration PR (#2308)
* Added spending limit reset function and call (#2262)

* Added spending limit reset function and call

* Fix: don't use DELEGATE_CALL in multisend tx and spending limits

* Changed reset spending limit operation parameter from DELEGATE_CALL to CALL

* Deleted operation parameter from MultiSendTx

* Remove sort for Spent and ResetTime columns (#2295)

* Fix spending limit enable check (#2299)

* fix spending limit existence check

Co-authored-by: juampibermani <30930241+juampibermani@users.noreply.github.com>
Co-authored-by: katspaugh <katspaugh@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
2021-05-21 09:52:52 +02:00
juampibermani 7ad8ecf4c7
Set recipient when going back from review (#2277)
* Set recipient when going back from review

* Updated recipient when props change

* Reset recipient on open modal

* Dont clean address when reviewing collectibles send

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2021-05-20 16:58:19 +02:00
katspaugh 1f9bb3aef4
Fix the input error message in contract interaction (#2253) (#2297)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2021-05-20 11:09:12 +02:00
katspaugh b0fadee951
Chore: coded exceptions registry and utils (#2283)
* Coded exceptions + registry

* adding throwError function

* Log to sentry

* Chore: coded exceptions registry and utils (#2161)

* Add error 600 for token fetching

* Fix constants type error

* Log only the error message on prod

* Add error 601

* PR feedback from Nico

* Add readonly for the public props

* Add isTracked and set it to false for 601

* Add a comment on how to add new errors

* Rename var

* Replace the registry object with an enum

* Add a reverse lookup map

* Duplicate the code in the enum

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-05-20 10:49:50 +02:00
nicolas 6f2ae5af54
Fix call response in contract interaction (#2285) 2021-05-19 12:43:46 +02:00