Commit Graph

3155 Commits

Author SHA1 Message Date
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
Daniel Sanchez b7afc5caea
Fix fees not showing in transaction details (#1313)
* Add outgoing transaction fees in transaction details

* Convert fee from wei only when showing extended transaction

* Fix incoming transactions fee value to display correct value

* Add ETH symbol to fee on details
2020-09-07 17:42:05 +02:00
Mati Dastugue 7821da08f3
Update Contract Data Modal (#1322)
* Bump new onboard.js version

* Update contract data modal
2020-09-06 11:10:21 +04:00
Mikhail Mikheev 372d27f5a6
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>
2020-09-04 18:25:25 +04:00
Mikhail Mikheev bfed9679f7
Tech debt 1265: Enable strictNullChecks TS compiler option (#1301)
* dep bump, enable strictNullChecks ts compiler option

* working on errors wip

* remove unused imports

* nullchecks errors wip

* fixing errors

* fixing errors

* fixing errors

* fix clipboard func type errors

* error fixes

* error fixes

* error fixes

* error fixes

* error fixes

* error fixes

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* error fixing

* Finally made it

* eslint fixes

* eslint fixes 2

* fix send funds validation

* Update style load in ThresholdSettings

* Fix isValidAddress default state for SendCollectible

* fix OwnersColumn return type

* fix extractUsefulMethods typing

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-04 16:03:09 +04:00
Mati Dastugue 5d7369d41e Merge with dev 2020-09-01 14:16:31 -03:00
Mati Dastugue c5bafa6569
Bump new onboard.js version (#1307)
* Bump new onboard.js version

* bump new version

* Clean unnecessary dependencies from yarn.lock file

* Bump dependencies without breaking changes

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-09-01 19:02:25 +04:00
Mikhail Mikheev 6f036f9844
Merge pull request #1310 from gnosis/dev-backmerge/2.11.0
Backmerge: Release 2.11.0 to development
2020-09-01 14:58:25 +04:00
Mikhail 0fbc5f6500 Merge branch 'master' of github.com:gnosis/safe-react into dev-backmerge/2.11.0 2020-09-01 14:40:55 +04:00
Mikhail Mikheev 1ad57e60e9
Merge pull request #1291 from gnosis/release-2.11.0
Gnosis Safe Multisig - Public Release v2.11.0
2020-09-01 13:29:16 +04:00
Mati Dastugue deb0ad8501
Bump new onboard.js version 2020-08-31 18:07:12 -03:00
nicolas f7d4cfe112
Track GA for safe actions (#1302)
* Track GA for safe actions

* Add tracking for safeListSidebar

* review changes

* review changes v2
2020-08-31 18:33:55 +04:00
Mikhail e000bc6d0b use submissionDate/confirmations from current tx in processTransaction 2020-08-31 15:14:51 +04:00
Daniel Sanchez 4f32f77ef9 Update idle safe app (#1290)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-31 14:23:36 +04:00
Daniel Sanchez e9f7acff63
Update idle safe app (#1290)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-31 14:22:24 +04:00
nicosampler f04ec4c169 Merge branch 'development' into release-2.11.0 2020-08-28 16:23:43 -03:00
Mikhail Mikheev d1438d704b fix onUserConfirm invoke 2020-08-28 18:09:10 +04:00
Agustin Pane e84036c120
(Feature) - Update decoded value types (#1285)
* Renames decodedData to dataDecoded

* Renames DecodedValue to ValueDecoded

* Updates operation types

* Remove unnecesary keyof typepo

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-28 08:59:53 -03:00
nicosampler e0151a42d9 update safe-react-components version 2020-08-27 14:12:02 -03:00
nicosampler 34c64db530 update package.json 2020-08-27 12:37:19 -03:00
nicolas 03cb4aba96
New layout (#1201)
* Adding storybook

* new layout components

* add preview body

* add styles

* extract walletInfo to a separated component

* remove unused component

* New Layout componentes refactor

* Return type in Root

* change story name

* adding back OpenHoc

* sort import

* fix margins

* split layout

* Move Layout related components to /components/SidebarLayout

* Adding new layout for real

* Some changes and refactor

* Move Modals from safe to sidebar

* move safeAddress logic from safe to sidebar

* move safe container from components

* List refactor

* sidebar navigation

* selected item

* list selected example

* add styles

* add text component to new tx button

* Sidebar without walletInfo

* fix footer and body margins

* add logo Safe Multisig

* update safe-react-components

* List colors and List Icon

* fix subItem

* update safe-react-components

* fix logo margin, add notConnected icon and badge Read Only

* fix merge problems

* add sidebar styles and icon notConnected

* fix readOnly

* fix QR tooltip info

* add Help Center link and fix margins

* Remove 'No safe loaded' text

* review changes

* fix import

* fix Help center margin

* add styles to address

* replace empty div with FlexSpacer component

* rename Sidebar by SafeListSidebar

* fix load and create safe position (top-left)

* Add comment to FlexSpacer

* fix Title margin Safe Creation Progress

* fix Read Only line-height

* review fixes

* review fixes

* rename component

* fix Help Center styles

* return type in DefaultBadge

* Fix types for list component (still wip)

* move sidebarList to a hook

* fix safe route container

* fix src version

* fix list typescript issue

* rename sidebarlayout to applayout

* sidebar fixes wip

* sidebar fixes wip

* remove unused function

* lift sidebar items state up

* fix broken imports

* remove unused files

Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-27 18:53:28 +04:00
Agustin Pane 9fdfd7448c
(Feature) Types for safe (#1274)
* Types

* Types

* Fix SetDefaultSafe return type

* Remove unused files

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-27 14:10:02 +04:00
nicolas 5573383c48
Fix TX detail visualization (#1281)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-27 13:58:44 +04:00
Mikhail Mikheev 5333534f97
Merge pull request #1283 from gnosis/fix/electron-update
Fix error trying to update Desktop App
2020-08-27 12:40:40 +04:00
Mati Dastugue 96c7429351 Fix dependency import that prevents from updating app 2020-08-26 11:50:20 -03:00
Mikhail Mikheev 54d5b81069
Merge pull request #1278 from gnosis/v2.10.2-backmerge
V2.10.2 backmerge
2020-08-26 15:22:49 +04:00
Daniel Sanchez d5513013f5 Merge remote-tracking branch 'origin/development' into v2.10.2-backmerge 2020-08-26 11:34:22 +02:00
Mikhail Mikheev 66c5ae7f8e
Safe apps: return safe tx hash (#1245)
* apps refactoring wip

* apps refactoring wip

* type fixes

* add useLegalConsent hook in apps

* useAppList hook wip

* dep nump

* useAppList hook wip

* fix selecting first app

* Remove console.log

* dep bump

* update persisting app logic

* update saveToStorage type

* fix crash on apps tab

* add appframe comp

* add handleIframeLoad func

* reuse selectedApp variable in hook

* remove initialAppSelected

* yarn regenration

* useIframeCommunicator wip

* add types for apps component

* dep bump

* fix history types

* yarn regenration

* extract useIframeMessenger hook

* fix safe-react-components version

* useIframeMessageHandler wip

* fix types

* send safe info on handshake

* fix naming/types for url utils

* remove operations

* update safe-apps-sdk

* wip

* update safe-apps-sdk

* requestId wip

* cta snackbar usage fixes

* notifications refactor wip

* notifications refactor: use dispatch

* tsc fixes

* extract confirm transaction modal

* Extract confirmation modal to a separate component

* dep bump

* ConfirmTransactionModal component

* Return safeTxHash after user confirmed transaction

* fix address validator, close modal when user confirms the tx

* close modal after confirmation

* update imports

* update imports [2]

* update imports [3]

* update imports [4]

* remove console.log in createTransaction

* update safe-apps-sdk

* yarn.lock

* EditOwnerModal types
2020-08-26 13:05:34 +04:00
Daniel Sanchez 067dbb9e74
Merge pull request #1273 from gnosis/hotfix/app-crashes-via-link
(Hotfix) Fix crashing app when loading
2020-08-26 09:36:50 +02:00
Daniel Sanchez c267e30d0a Set v2.10.2 2020-08-26 09:18:16 +02:00
Daniel Sanchez f8565f4662 Bug/safe crash when accessing from link (#1209)
* use updateSafeAction for adding modules

* Fix address parameter naming issue

Add comment to ADD_SAFE_MODULE behaviour

* fetchSafe batch everything to updateSafe

* remove addSafeModules action

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-26 09:16:52 +02:00
Daniel Sanchez b965b5c712
Merge branch 'master' into hotfix/app-crashes-via-link 2020-08-26 09:04:16 +02:00
nicolas 4dc28942c0
Allow to remove a Safe-app added manually (#1260)
* partial imp

* Delete safe apps added manually

* Fix and review changes

* remove unnecesary exports

* Fix deleteApp and sort in modal list
2020-08-25 17:19:01 -03:00
Daniel Sanchez af0f303fe0
Fix windows directory issue on yarn install (#1275)
* Update yarn.lock file to match integrity

* Restore network-concurrency flag
2020-08-25 20:06:37 +02:00
Daniel Sanchez b337737d5d
Merge pull request #1270 from gnosis/fix/build-windows-app-production
Add fix for windows desktop app build (#1254)
2020-08-25 17:21:19 +02:00
Agustin Pane dcde716151 Revert version 2020-08-25 12:15:55 -03:00
Daniel Sanchez 3ceb1f219a Roll back version change as it wasn't published yet 2020-08-25 17:09:03 +02:00
Agustin Pane 78071d7b71 Update package version 2020-08-25 12:08:17 -03:00
Agustin Pane c12774205c Replaces addSafeModules with updateSafe 2020-08-25 11:44:07 -03:00