Commit Graph

529 Commits

Author SHA1 Message Date
Agustin Pane 551db136f3
(Feature) #1515 Gas estimation for NON-GETH nodes (#1523)
* Remove unnecesary await

* Implement gas calculation for NON-GETH nodes

* Add tests

* Refactor estimateSafeTxGas: now getGasEstimationTxResponse calculates gas or throws errors based on the current node

* Refactor getOpenEthereumErrorDataResult to make it works with Nethermind
Updates tests

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-28 17:03:14 +01:00
nicolas 0278722645
Add config for EWC and Volta (#1513)
* Add config for EWC and Volta

* Join tests in same file

* change price oracle in volta

* add travis config for volta and ewc

* Update travis to build xDai only in master or version release

* Add PR environment by network

* simplify some constants assignments

* Add PUBLIC_URL overwrite for PRs

* Change PULL_REQUEST condition test

* Use absolute path for PUBLIC_URL

* Fix missing https://

* Adapt EWC/Volta config to use new gasPriceOracle format

* disable openZeppeling in volta and EWC

* Deploy EWC to staging

* Fix Portis, Fortmatic and Blocknative key refactor

* Set EWC deployment to release/2.14.0

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-28 13:10:40 +01:00
Daniel Sanchez 02ba83cef2
Bump dependencies (#1529)
* Upgrade Typescript to v4.0.3

* Upgrade dependencies with minor changes

* Cleanup yarn.lock file

* Upgrade types dependencies

* Fix inconsistency with @typescript/eslint caused by react-scripts

* Fix eslint issues

Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
2020-10-28 12:48:31 +01:00
Fernando aa181fb9a1
(Fix) Modules not shown in Advanced Settings (#1516) 2020-10-27 11:04:44 -03:00
Agustin Pane 4ce8917f34
(Bug) - #1503 Fix collectibles groups is not removed when the last item from it is sent (#1511)
* Remove default export with const

* Filter collectibles group with user's available nftAsset

* Improves filter

* Fix duplicated assets
2020-10-26 10:58:01 -03:00
Agustin Pane 058fec3dbc
(Feature) - Send erc721 collectible with proxy contact (#1508)
* Removed containsMethodByHash condition check, now we always expect that safeTransferFrom is defined on the erc721 contract

* Types

* More types

* Add try catch on estimateGas

* Add try catch on submit transaction

* More types

* More types

* More types

* ReviewTx modal props

* Fix SendCollectible modal types

* Add guard for safeAddress

* Move some imports

* Fix DispatchReturn types

* Fix import of Dispatch

* Remove console log

* Adds logs

* Fix import

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-26 10:11:52 -03:00
Daniel Sanchez 95d102d337
Fix show token balances after sending out all tokens (#1521) 2020-10-26 11:34:53 +01:00
Daniel Sanchez 5f3a9ef1a9
Update calculateGasPrice to fetch from config (#1517)
* Update calculateGasPrice to fetch from config

* Remove unused gas estimation function

* Remove unused gasCost estimate function

* Add gasParameter to gasPriceOracle
2020-10-23 17:18:09 +02:00
Mati Dastugue c9e9fe8ca6
Enable/Disable wallets by configuration flag (#1504)
* Add disableWallets key to config

* Fix merge issues
2020-10-23 13:30:09 +02:00
nicolas 8aeb5a1c01
Add coin by network (#1505)
* Add coin by network

* Join tests in same file

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-23 12:58:46 +02:00
Mikhail Mikheev 56430b5966
Feature #1440: Handle transactions with set safeTxGas from Safe Apps (#1442)
* sdk version update

* point sdk to a newer commit

* Update iframe message handler

* ConfirmTransactionModal tweaks to support params

* handle sendTransactionsWithParams, display safeTxGas in app tx modal

* new sdk version

* yarn lock update

* install libudev in travis

* update sdk version

* Estimating safeTxGas for Safe Apps Txs WIP

* safetxgas estimation warning wip

* gas estimation in confirm transaction modal

* yarn lock update

* review fixes

* Change estimation loading msg, use imported vars to index payload type

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-22 17:43:59 +04:00
Daniel Sanchez 24c917d821 Set warn level to batch request catch 2020-10-20 17:46:09 +02:00
Fernando 9ca9007105
(Feature) - xDai Compatibility (#1476)
* feat: Support for Volta and EWC

* chore: Store network ID in the ETHEREUM_NETWORK enum itself

* chore: forward tx and address to non-etherscan explorers

* fix test, avoid assigning enum to const

* (Feature) [xDai] - Create network-based configurations (#1420)

Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>

* (Feature) [xDai] Use generic config (#1422)

Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>

* fix function name after merge development

* (Feature) [xDai] - Contract interaction abi lookup (#1429)

* Filter Apps by network (#1433)

* Filter apps by network

* (Feature) [xDai] - Parametrize ethscan values (#1424)

* (Feature) [xDai] - Use parametrized network values (#1437)

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Use tx service for loading token info (#1435)

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Visually differentiate networks (#1431)

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>

* (Feature) [xDai] - Cosmetic fixes (#1449)

* Add staging configuration for deployment using xDai (#1459)

* Add staging xDai deployment to travis

* Add safe apps production url for xdai

* Add travis rule to build xDai on master or integration branch

* (Bugfix) Set min height to ListContentLayout wrapper #1447 (#1451)

* fix min-height app container and margin to info text at
bottom

* change css unit from % to vh

Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* disable OpenZepplin in xDai (#1465)

* remove any in config/index.ts (#1462)

* [xDai] Parametrize Native Coin (#1444)

* fix `generateBatchRequest` calls

* Fix some ETH harcoded values + Add tests

* Fix null or undefined value

* Move nativeCoin outside component + fix toTokenInput function

* Remove native coin from useEffect

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) [xDai] - Disable safe sections based on network config (#1468)

* Adds FEATURES enum
Renames features to disabledFeatures

* Uses FEATURES enum instead of hard-coded contract features

* Refactor enabledFeatures function, now checks that there are not disabled features by config before return the enabledFeatures result

* Adds SAFE_APPS and CONTRACT_INTERACTION to FEATURES enum

* Remove SAFE_APPS from sidebar if disabled

* Redirect user from /apps if safe apps are disabled

* Disables contract interaction from config

* Remove !remoteOwners

* Move settings to a constant

* Deploy from xDai integration branch only to xDai staging

* Fix .travis.yml warnings

* Update branch and condition for staging deployment

* Update xDai depoy condition

* (Feature) [xDai] - Fetch collectibles from Gnosis services (#1460)

* Add https to safe-xdai apps link

* make getExplorerInfo return values per network (#1470)

* (Fix) "Approve transaction" modal closes (#1477)

* add equality function to prevent re-renders

- I left the inline equalityFn, as an ad-hoc solution.
First, because we're going to remove this when https://github.com/gnosis/safe-react/issues/1479 is done
Second, because this way it infers the types defined in the useSelector generics

* (Fix) xDai feature issues (#1484)

Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>

* RPC interactions errors (#1475)

* Add options to httpProvider

* Add log when generateatchRequest fails

* add types to generateBarchRequest

* fix types in `generateBatchRequests`

* add `.d` for imports of definition files

* add `undefined` alternative value for `generateBatchRequests` ReturnValues

- also, fixed typing errors in related functions

* fix return values for `generateBatchRequests` in tests

Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>

* (Feature) xDai configs (#1489)

* (Feature) - Replaces ETH with network native coin (#1491)

* Remove networkInfo from the components

* Replaces humanReadableValue to fromTokenUnit

Co-authored-by: JosephBagaric <bagaricjos@gmail.com>
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Agustin Pane <agustin.pane@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
Co-authored-by: nicosampler <nf.dominguez.87@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-10-18 21:48:22 +02:00
Mikhail Mikheev 396f6dd99b
Bug #1384: Deadlock with pending older transactions (#1455)
* don't use nonce in tx reducer

* remove displaying of pending status if tx has no confirmations

* Fix test for transactions pending status

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-16 13:23:07 +02:00
Agustin Pane b04ec4337b
(Feature) - Update balance endpoint parameter usage (#1482)
* Replaces old balanceUsd with fiatBalance and fiatCode on BalanceEndpoint API

* Update balance endpoint tests

Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-10-15 14:43:18 -03:00
Daniel Sanchez eab0e73ac6
Bump dependencies (#1478)
* Upgrade dependencies without breaking changes

* Update electron and gnosis dependencies with minor changes

* Upgrade dependencies with minor changes and remove unnecessary electron dependency

* Upgrade truffle-contract to latest @truffle/contract
2020-10-15 17:01:12 +02: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
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 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
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
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
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
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
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
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 e000bc6d0b use submissionDate/confirmations from current tx in processTransaction 2020-08-31 15:14:51 +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
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
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 168dcc9f6d Fix offchain signing 2020-08-12 15:04:12 +04: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 a0ed0a1f31
(Feature) Decode multiSend tx details (#1106)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
2020-08-04 15:32:09 -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
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