Commit Graph

2262 Commits

Author SHA1 Message Date
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 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
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
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
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
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 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
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
Agustin Pane c12774205c Replaces addSafeModules with updateSafe 2020-08-25 11:44:07 -03:00
fernandomg 0f777d070a fix: update balancerPool IPFS url
- also set the Safe's version to `2.10.1`
2020-08-24 14:36:51 -03:00
Mati Dastugue 50995c3f0c
Etherscan link broken (#1255)
* Add default type

* update deps

* Rename variables

* Update link

* hardcode link type

* remove optional type prop for etherscanlink

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-20 23:15:38 +04:00
Mikhail Mikheev 32748c4b15 Merge branch 'master' of github.com:gnosis/safe-react into v2.10.0-backmerge 2020-08-17 16:09:43 +04:00
Mikhail Mikheev 78f832f7dd Add openzeppelin app 2020-08-17 15:18:41 +04:00
nicolas 691ef98048
new TXs tab (#1089)
* new TXs tab

* Removes coverage folder from git

* Adds getAllTxServiceUriTo
Adds types on fetchTransactions

* Adds loadAllTransactions method

* Adds types for allTransactions

* Adds types to loadAllTransactions
Adds urlParams to fetchAllTransactions

* Adds transactionsNew store

* Fetch all transactions endpoint and updates newTransactions store

* Updates transactions types

* Adds newTransactionsHelpers.ts

* Remove white spaces

* Removes immutableJS usage in NewTransactionsState

* Renames getAllTxServiceUriTo to getNewTransactionsServiceUriFrom

* Renames reducer TRANSACTIONS_NEW to TRANSACTIONS

* Removes newTransactions from fetchTransactions.ts

* Adds useFetchNewTransactions hook
Adds uriParams as parameter for loadAllTransactions

* Updates default state

* Adds newTransactionsSelector
Updates newTxsTab behaviour

* Renames eTag to responseEtag

* Fix missing Map type Import in AppReduxState

* Remove generic types

* Adds offset and limit to the NewTransactionsState
Adds currentPageSelector
Adds getNewTransactionsState

* Moves addNewTransactions action to actions/TransactionsNew

* Implements setPreviousPage, setNextPage

* Adds safeNewTransactionsSelector
Adds newTransactionsCurrentPageSelector

* Implements basic pagination on tabs layout

* Remove offset and limit from ADD_NEW_TRANSACTIONS action
Fixs ADD_NEW_TRANSACTIONS reducer implementation

* Improves useFetchNewTransactions usage to avoid re renders

* Fix newTransactionsCurrentPageSelector page calculation

* Fixs newTransactionsCurrentPageSelector
Adds loader state on newTxsTab

* Implements etags by page

* Implements pagination restrictions

* Fix import

* Reduce any's usage

* Replaces JSX.Element with ReactElement

* Fixs types

* Moves all the pagination actions to pagination.ts

* Simplify loadAllTransactions return values

* Replaces limit 100 to 50

* Rename actions

* Fix types

* Add TODO

* Replaces count/transactionsCount to totalTransactionsAmount

* Renames getNewTransactionsServiceUriFrom to getAllTransactionsUriFrom
Add types

* Rename newTxs to Transactions

* Add types to CopyBtn

* Replaces /transactionsNew with /all-transactions

* Replace btn handlers usage

* Uses hash as key

* Replaces redux with params

* Types

* Improves enum types

* Replaces is with boolean

* Merge branch 'development' of https://github.com/gnosis/safe-react into transactions_new

# Conflicts:
#	src/store/index.ts

* Types

* Enums

* Remove tabsValue()

* Moves store from ui to logic folder

* Fix imports

* Add type for new transactions

* Add Gnosis CLA (#1188)

* replace newTransactions with allTransactions

* bring back src/store

* bring back src/store 2

* Fix match type usage

* Merge branch 'development' of https://github.com/gnosis/safe-react into transactions_new

# Conflicts:
#	src/logic/addressBook/store/selectors/index.ts
#	src/logic/safe/transactions/send.ts

* Fix key null warning

* Removes limit and offset from allTransactions State

* Simplify allTransactions state

* Renames transactionsNew folder to allTransactions

* v2.9.0

* bump node in travis to 12

* add overflow hidden to iframe container in safe apps

* Merge branch 'development' of https://github.com/gnosis/safe-react into transactions_new

# Conflicts:
#	src/logic/safe/store/actions/__tests__/utils.test.ts
#	src/logic/safe/store/actions/addSafeModules.ts
#	src/logic/safe/store/reducer/safe.ts
#	src/logic/safe/store/reducer/types/safe.d.ts
#	src/routes/safe/components/Apps/index.tsx
#	src/routes/safe/components/Layout/Tabs/index.tsx
#	src/routes/safe/components/Settings/Advanced/dataFetcher.ts
#	src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx
#	src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/CustomDescription.tsx
#	src/routes/safe/container/hooks/useFetchTokens.tsx
#	src/routes/safe/container/hooks/useLoadSafe.tsx
#	src/routes/safe/store/reducer/types/safe.d.ts
#	src/routes/safe/store/reducer/types/safe.ts

* Fix offchain signing

* fix crash when opening a mocked transaction

* Add Balancer Pool and Exchange Apps.

* Feedback, absolute imports

* Types

* Refactor all transactions, adds totalTransactionsAmount on redux

* Absolute path

Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
2020-08-14 12:15:09 -03:00
Mikhail Mikheev 7a4773511c
Safe apps: Extract Iframe messenger to a hook (#1219)
* add useLegalConsent hook in apps

* useAppList hook wip

* fix selecting first app

* 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

* add types for apps component

* fix history types

* extract useIframeMessenger hook

* fix safe-react-components version

* useIframeMessageHandler

* update safe-apps-sdk

* Fix alignment between app list and app iframe

* send safe info on handshake

* fix naming/types for url utils

* fix types and code cleanup

* remove operations

* dep bump

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-08-13 13:37:34 +02:00
Mati Dastugue aeaf3c4ee6 Remove styles hook and change styles change 2020-08-12 12:07:45 -03:00
Mati Dastugue 2d79ac9c7b Merge branch 'development' of github.com:gnosis/safe-react into fix/fullValue 2020-08-12 11:59:01 -03:00
nicosampler c4a412ae09 Add Balancer Pool and Exchange Apps. 2020-08-12 15:04:12 +04:00
Mikhail Mikheev db103065da fix crash when opening a mocked transaction 2020-08-12 15:04:12 +04:00
Mikhail Mikheev 168dcc9f6d Fix offchain signing 2020-08-12 15:04:12 +04:00
Mikhail Mikheev 70a1c523d4 add overflow hidden to iframe container in safe apps 2020-08-12 15:04:12 +04:00
Mati Dastugue 4666272cdd Merge with dev 2020-08-11 13:35:53 -03:00
Daniel Sanchez 425a38b2d9
Merge branch 'development' into issue-1144 2020-08-11 17:26:10 +02:00
nicosampler c42ce0f261 Add Balancer Pool and Exchange Apps. 2020-08-11 12:09:27 -03:00
Mikhail Mikheev 41059c1e8e fix crash when opening a mocked transaction 2020-08-11 14:59:28 +04:00
Mikhail Mikheev 94de33aa5d Fix offchain signing 2020-08-11 13:12:24 +04:00
Mikhail Mikheev a84c8765c0 add overflow hidden to iframe container in safe apps 2020-08-10 14:25:53 +04:00
Daniel Sanchez 91d3aa8592
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-07 18:49:29 +04:00
nicosampler c6b0d6a783 remove forced error 2020-08-07 09:12:07 -03:00
nicosampler fcb601fd79 force an error 2020-08-07 09:11:35 -03:00
nicosampler 8462759e13 Merge branch 'development' into issue-1144 2020-08-07 09:01:06 -03:00
Agustin Pane 64e4b6b45a
(Feature) - 1068 Don't show unknown when unknown (#1212)
* Components types

* Remove UNKNOWN in OwnerAddressTableCell

* Remove UNKNOWN in OwnerComponent

* Move imports

* Fix import

* Fix types

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-07 15:26:26 +04:00
nicosampler e39e9bbc31 tsc fixes 2020-08-07 08:21:54 -03:00
nicosampler b119f3e88f Merge branch 'development' into issue-1144 2020-08-06 19:28:03 -03:00
nicolas 22d12a37fa
Fix broken unit tests (#1216)
* Fix broken unittests

* fix TS errors

* remove unused mock

* remove getTransactinoServiceMock function

* fix types in tests

* fix safe reducer types

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-07 00:58:05 +04:00
Fernando f8b9851020
(Feature) Add "Action" details in transaction list (#1134)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-06 12:18:46 -03:00
nicosampler 18dd6b7e97 Merge branch 'development' into issue-1144 2020-08-06 08:22:19 -03:00
Mikhail Mikheev b6bb5ffde1
Tech Debt: Safe Apps Refactor (#1110)
* 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

* reuse selectedApp variable in hook

* remove initialAppSelected
2020-08-06 11:33:58 +04:00
Mati Dastugue a0baca4d1f Add styles for full output 2020-08-05 18:35:33 -03:00
Fernando a0ed0a1f31
(Feature) Decode multiSend tx details (#1106)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-04 15:32:09 -03:00
nicosampler a21de8be18 Replace AddressInfo by EthHashInfo 2020-08-04 15:29:29 -03:00
Mikhail Mikheev ece2bc6a8c
Fix safe loading (#1203) 2020-08-04 19:53:30 +04:00
nicosampler 7f3a99b7f1 Merge remote-tracking branch 'origin/development' into issue-1144 2020-08-03 13:36:36 -03:00
nicosampler 24fe633e1a Styles 2020-08-03 13:31:43 -03:00
nicosampler bc5c30ec85 fix makeTransaction 2020-08-03 13:02:48 -03:00
nicosampler 7373c4afac ExpandedTx 2020-08-03 13:01:47 -03:00
nicosampler 877cf5ea4b ExpandedTx - creation 2020-08-03 12:38:02 -03:00
nicosampler 1bd028b97a SafeList types 2020-08-03 12:35:40 -03:00
nicosampler 7b2d7fd35d remove unused classes 2020-08-03 11:03:39 -03:00
Daniel Sanchez f374315a5a
Avoid constant creation of new web3 object (#1171)
* Avoid constant creation of new web3 object

* rollback web3 version, small type fixes in ConnectButton

* Use web3 instance in getProviderInfo

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-03 11:29:17 +02:00
Mikhail Mikheev 86cbd94b0c
Tech debt: Add types for contracts (#1118)
* typechain wip

* add types for multisend

* type definitions improvements

* type safe contract in estimateTxGasCosts

* contract type definitions wip

* SafeInstance truffle -> web3 migration

* fix calls for version

* transactions/send enhancements

* fix safe recor owner type

* Stepper type definitions wip

* dep bump

* stepper types wip

* refactoring stepper component to fix bug in load safe form

* stepper types wip, addressbook reducer types wip

* finally make it work

* Fix ownerlist component hook in load safe

* dep bump

* dep bump

* rollback types/history

* add types for gas calc

* debugging...

* fix using RO web3 for sending txs

* update package.json generate-types command

* add ts-ignore for stepperpage

* db

* dep bump

* as unknown as AbiItem -> as AbiItem[]

* use optional chaining for isExecution in gas esimations

* abiITem -> AbiItem[]

* fix safeVersion utils tests

* fix imports, put upgradeSafe test close to the actual code

* add comment about ts-ignore usage

* downgrade web3 version
2020-08-01 02:26:10 +04:00
Mikhail Mikheev 24dffd53da
Set inclusive false for minValue validator in sendfunds form (#1193) 2020-08-01 01:15:56 +04:00
nicosampler df8e3f49df review fixes 2020-07-31 15:21:17 -03:00
nicolas 81c14133ac
Update MultiSend contract address. (#1186)
* Update Multisend Address

* Update Apps loaders not centered

* remove empty spaces

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-07-31 14:27:22 +04:00
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