Commit Graph

2991 Commits

Author SHA1 Message Date
Mati Dastugue 1ee9dc3a8d
Merge pull request #1438 from gnosis/dependabot/npm_and_yarn/electron-9.3.1
Bump electron from 9.3.0 to 9.3.1
2020-10-08 17:18:23 -03: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
Agustin Pane 8d82086f0c
(Feature) Remove automatic load addressbook owners (#1406)
* Remove the auto adding owners when the safe loads

* Let the user add "invalid names" in the addressbook and also shows them on the addressbook

* Fix update name of safe if addressbook updated

* Removes unused addSafe action, replaces it with addOrUpdateSafe

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-05 14:45:51 -03:00
Fernando 5a41c3857d
(Fix) Contract interaction ABI resets (#1394)
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-05 12:13:19 -03:00
Mati Dastugue 21ea1ad9dd
Desktop app - Detect port and change it if needed (#1395)
* Bump new onboard.js version

* Detect if port is used and change it if needed before starting the server

* Fix icon creation

* Fix formatting

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-10-05 12:52:15 +04:00
Agustin Pane f4f90acc22
Checksum the address on addressInput (#1410) 2020-09-29 16:07:36 -03:00
Daniel Sanchez 296a6f62a1
Merge pull request #1413 from gnosis/tweak-production-travis-build
Backmerge v2.12.1 with travis fix
2020-09-29 18:43:40 +02:00
Daniel Sanchez 5649369ac7
Merge branch 'development' into tweak-production-travis-build 2020-09-29 17:58:17 +02:00
Daniel Sanchez 32570c6587
Merge pull request #1412 from gnosis/tweak-production-travis-build
New patch version with travis release tweak
2020-09-29 17:32:35 +02:00
Daniel Sanchez 24f2828a7b
Merge pull request #1411 from gnosis/release/v2.12.0
Backmerge 2.12.0 to development
2020-09-29 17:18:23 +02:00
Daniel Sanchez 8057ebfbae New patch version with travis release tweak 2020-09-29 17:14:30 +02:00
Daniel Sanchez daf8421aaf
Merge branch 'development' into release/v2.12.0 2020-09-29 16:51:50 +02:00
Mati Dastugue ab1775e891
Change wording when trying to add an incompatible Safe address (#1405)
* Update mastercopy error
2020-09-28 20:35:42 +02:00
Daniel Sanchez 21bd4a2eb7
Merge pull request #1397 from gnosis/release/v2.12.0
Release v2.12.0
2020-09-28 18:05:05 +02:00
Daniel Sanchez aeda4f64c3
v2.12.0 Bugfix - Fix Activate/Blacklist tokens (#1401)
* Fix activate / blacklist token or asset

* Fix asset add test

* Add new actions to storage middleware to save on change
2020-09-25 18:39:12 +02:00
Agustin Pane c1bc366c51
(Bugfix) Owners duplicated (#1402)
* Fix adding owners

* Lint
2020-09-25 12:43:48 -03:00
Daniel Sanchez dc806dcec7 Set v2.12.0 2020-09-24 16:07:59 +02: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
nicolas 32547a8ae6
Add WalletConnect safe-app (#1364)
* Add safe-connect safe-app

* rename safe-connect to walletConnect

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-23 20:34:35 +02:00
Agustin Pane 6f707a632b
(Feature) #588 Use addressBook names when creating/loading safe (#1377)
* Fix addressbook types
Restructure addressbook store type

* Add more safe types

* Fix imports

* Removes .toJS() usage

* Fix condition for saving addressBook

* Types & remove send button from addressbook if user not an owner

* Add types for addressBook actions
Remove unused saveAndUpdateAddressBook action

* Refactor addressBook: make it global and removes immutableJS
Removes unused addAddressBook action

* Fix edit and remove entries style when user is not owner

* Adds and updates safe name in addressBook

* Adds checkIfOwnerWasDeletedFromAddressBook
Let the user remove owners users without adding them again each time the safe loads

* Simplify loadAddressBookFromStorage

* Fix compilation errors included in pr #1301

* Uses sameAddress function

* Add migration function for old stored address books

* Replaces shouldAvoidUpdatesNotifications with addAddressBookEntryOptions on addAddressBookEntry

* Unify return on getOwnersWithNameFromAddressBook

* Adds the addressbook names in safe load

* Reword shouldAvoidUpdatesNotifications

* Replaces adbk with addressBook

* Renames adbk to AddressBook

* Types on Open and Layout

* Remove unused actions and selectors

* Replaces initialValuesFrom to a hook and retrieves the ownerName

* Uses addressBook names in safe creation

* Fix owner name on creating safe

* Renames getNameFromAddressBook to getNameFromAddressBookSelector

* Fixs addOrUpdateAddressBookEntry action

* Updates addressbook on safe load

* Revert load update addressbook behaviour

* Renames checkIfOwnerWasDeletedFromAddressBook to checkIfEntryWasDeletedFromAddressBook

* Feedback

* Type review informaiton

* Adds ADD_OR_UPDATE_SAFE action

* Replaces addSafe with addOrUpdateSafe on addSafeHandler

* Exports isValidAddressBookName util function

* Adds isValidAddressBookName test

* Add tests for checkIfEntryWasDeletedFromAddressBook

* Fix saveAddressBook test

* Fix fetchSafeTokens.test.ts

* Add update individually safe props in addOrUpdate

* Fix updating addressbook entries on safe load/create

* Fix always loading safe as LOADED SAFE instead of safe name

* Fix adding owner as UNKNOWN on addressBook when adding new owner

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-23 20:14:49 +02:00
Daniel Sanchez d1348713ad
Add Yearn Finance app (#1390)
* Add Yearn Finance app
2020-09-23 17:26:55 +02:00
Fernando a764a23e66
(Fix) (development) Missing collectibles and Safe version (#1375)
* use `updateSafe` instead of `addSafe`

* fix SAFE_UPDATE reducer

- treat every key individually

* allow to load owners on the first request

* Set UPDATE_SAFE to individually handling all props

* Handle List special case

* Add comment to list check

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-23 14:39:25 +02:00
Fernando eec6e64c84
(Chore) Type fixes and refactor (#1376)
* use `safeFeaturesEnabled` selector

also organized a bit the code (styles) and added Types for the `ChooseTxType` component

* fix `getGnosisSafeInstanceAt` return type

* add types to `safeStorage`

refactor `getSafeName`

* use redux selector to obtain master contract version

* fix return type

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-22 21:19:43 +02:00
Fernando e9468790b5
(Fix) Recipient address used as name as well (#1387)
* fix address being used as name

* Restore ENS name when sending transaction

* use `addressName` as default value if it happens that the name in the addressBook is not defined

* use resolvedAddress to filter by address in the address book

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
2020-09-22 21:06:06 +02:00
Mikhail Mikheev eebe972bac
Feature: Send env info message on safe apps sdk initialization (#1349) 2020-09-22 20:01:55 +02:00
Agustin Pane 59dc1f711c
(Bugfix) - #1246 Addressbook entries removed when reloading page (#1300)
* Fix addressbook types
Restructure addressbook store type

* Add more safe types

* Fix imports

* Removes .toJS() usage

* Fix condition for saving addressBook

* Types & remove send button from addressbook if user not an owner

* Add types for addressBook actions
Remove unused saveAndUpdateAddressBook action

* Refactor addressBook: make it global and removes immutableJS
Add types
Removes unused addAddressBook action

* Remove todo

* Fix edit and remove entries style when user is not owner

* Adds and updates safe name in addressBook

* Adds checkIfOwnerWasDeletedFromAddressBook
Let the user remove owners users without adding them again each time the safe loads

* Simplify loadAddressBookFromStorage

* Fix compilation errors included in pr #1301

* Uses sameAddress function

* Add migration function for old stored address books

* Update tests

* Replaces shouldAvoidUpdatesNotifications with addAddressBookEntryOptions on addAddressBookEntry

* Update tests

* Unify return on getOwnersWithNameFromAddressBook

* Reword shouldAvoidUpdatesNotifications

* Replaces adbk with addressBook

* Fix condition

* Fix typos

* Fix typo

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-22 09:31:07 -03:00
nicolas fffabf02ce
(Bugfix) - #1233 Fix method values length in TXs (#1314)
* Fix method values length in TXs

* arrays Improvment

* Make use of EthHashInfo

* review change
2020-09-21 15:03:27 -03:00
Mati Dastugue 46c59460cd
ENS names not working properly (#1372)
* Fix ENS names

* Fix types

* Add typo to AddressBookInput component

* Remove ensToAddress field

* Fix error message variable name

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-21 17:26:15 +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
Agustín Longoni f3b2d69ef3
Merge pull request #1365 from gnosis/issue-925
(Bugfix) - #925 [Contract Interaction] UI Glitch
2020-09-17 20:09:11 -03:00
Daniel Sanchez f20152a375
Merge branch 'development' into issue-925 2020-09-17 15:59:46 +02:00
Mikhail Mikheev e81f2ec4c2
Merge pull request #1370 from gnosis/release/v2.11.1
Backmerge v2.11.1 to development
2020-09-16 23:58:09 +04:00
Daniel Sanchez e5468704d4
Merge branch 'development' into release/v2.11.1 2020-09-16 18:59:49 +02:00
Daniel Sanchez 9a91b4640a
Merge pull request #1366 from gnosis/release/v2.11.1
Release v2.11.1
2020-09-16 17:24:08 +02:00
Daniel Sanchez f9d5b9bab1 Set version 2.11.1 2020-09-16 16:10:13 +02:00
Daniel Sanchez a670af114e Upgrade Idle app to use V4 contracts
Upgrade Sablier app to enable mUSD
2020-09-16 16:09:22 +02:00
Agustín Longoni 835e647072 add styles to class formContainer 2020-09-16 11:04:49 -03:00
Agustín Longoni a86c919b5b apply the word break property to the container 2020-09-16 09:57:57 -03:00
Agustín Longoni 6636fdf930 add word-break property 2020-09-15 19:24:47 -03: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
Mikhail Mikheev e000958c28
(Bugfix) - #1312 Assets disappear when loading a safe (#1333)
* fix currency middleware, actinos, cleanup & bugfix

* mergeDeep in reducer

* dont modify state in add_safe if same already exists

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-15 18:30:30 +04:00
Agustin Pane 33018172df
(Feature) Remove spam tokens / Deactivate tokens refresh fix (#1331)
* Fix load current session

* Fixs useMemo usage in filteredData

* Type fetchTokens

* Type useFetchTokens

* Type setCurrencyBalances

* Fixs ADD_SAFE reducer for existing safe, uses mergeDeep instead of merge, now the active tokens for the safe are not overwritten

* Fix save selected currency

* Adds excludeSpamTokens param in fetchTokenCurrenciesBalances

* Adds onlyTrustedTokens param in fetchTokenCurrenciesBalances

* Merge with development

* Remove onlyTrustedTokens param

* Fix unnecesary changes

* Replace Dispatch with ThunkDispatch

* Fix import consistency

* Type containsMethodByHash

* Fix blacklisted addresses calculation

* Adds types on updateActiveTokens
Adds types on updateBlacklistedTokens

* Refactor Tokens to TokenList, makes it functional component
also fix blacklisted addresses calculation

* Refactor Tokens to TokenList, makes it functional component
also fix blacklisted addresses calculation

* Refactor AddCustomToken, add types
Removes actions from Tokens

* Fix warning on useEffect

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-15 15:12:30 +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
Daniel Sanchez 0d7fc80924
Add lenght requirements for safe/owner naming when creating or loading a safe (#1357) 2020-09-14 22:52:17 +04:00
Agustin Pane f1916e92f1
(Feature) Add unit tests (#1230)
* Test for balances store

* Types for addressBook.ts

* Adds addressBookUtils.test.ts

* Remove duplicated type

* Tests for addressBookUtils

* Adds fetchSafeTokens.test.ts

* Adds getMockedSafeInstance and getMockedTxServiceModel in safeHelper.ts

* Adds shouldExecuteTransaction tests

* Fix types for TransactionProps
And getNewTxNonce

* Adds tests for getNewTxNonce and getLastTx

* Moves utils.test.tsx to /actions folder

* Placeholder for transactionHelpers tests

* isInnerTransaction tests

* calculateTransactionStatus tests

* Adds calculateTransactionType tests

* Adds buildTx test
Adds generateSafeTxHash test

* Absolute imports

* Adds types for getRefundParams

* Adds getRefundParams tests

* Add mock example for isInnerTransaction

* Adds isCancelTransaction tests
Adds isModifySettingsTransaction tests
Adds isMultiSendTransaction tests
Adds isUpgradeTransaction tests
Adds isOutgoingTransaction tests
Adds isCustomTransaction tests

* Adds types in mockNonPayableTransactionObject

* Add TODOS

* Fix shortVersionOf function

* Add ethAddresses.test.ts
Adds sameAddress test
Adds shortVersionOf test
Adds isUserAnOwner test

* Adds isUserAnOwnerOfAnySafe
Adds isValidEnsName

* Fix isERC721Contract

* Adds tokenHelpers.test.ts:
- getEthAsToken
- isTokenTransfer
- getERC20DecimalsAndSymbol
- isERC721Contract

* Fix eslint errors

* Remove unused files

* Use selectors in safeBalance tests

* Move file near his implementation

* Replaces resultExpected with expectedResult

* Update comment

* Reword tests

* Adds utility function description

* Merge with dev
Fix types

* Fix types

* Fix build types

* Mock contract

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-09-14 17:59:28 +02:00
Fernando ac92f49c72
(Fix) Pending transaction amount set to zero (#1316)
* fix: prevent runtime error when prev is `undefined`

* fix: prevent runtime error when prev is `undefined`

* fix: prevent runtime error when 'safes' is `undefined`

* fix: add `dataDecoded` to the mocked tx so information is properly displayed for known methods

* fix: set 'pending' status for tx being processed

- given that the confirmations key is no longer an empty array, tx status must be explicitly set this way

* fix: properly update mockedTx

* fix: hide buttons when tx is pending

* fix: type error

* Rollback patches trying to fix bug

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-09-14 15:46:34 +04:00
Agustín Longoni 5b99ceaa6d
(Bugfix) - #1286 Fix Sidebar position (#1340)
* fix Sidebar position

* fix padding

* fix padding and margin Help Center and Not connected Icon

* add scroll to Sidebar List menu

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-09-14 15:29:54 +04:00
Mati Dastugue 9ead8ef95b
(Feature) Tooltip equivalent balance may be zero (#1337)
* Add tooltip info

* Update icon and types

* Hide tooltip when value and balance are equal to 0

* Remove onClick + Improve perfomance issues

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-11 21:22:51 +02:00
Daniel Sanchez 43bc4984b8
Revert "Tech debt 1265: Enable strictNullChecks TS compiler option (#1301)" (#1335)
This reverts commit bfed9679f7.
2020-09-09 17:35:27 +02:00