* Checksum addresses when build address book from localStorage
Checksum owner's addresses when build safe from localStorage
* ChecksumAddresses when add new addressBook entry
ChecksumAddresses when add new owner
ChecksumAddresses when replaces owner
* Adds checksumAddress function
Replaces old web3 usage with checksumAddress
* Refactors all web3.utils.toChecksumAddress with checksumAddress()
* Fix duplicating var name
* Fix 850
* Fix 853
* Apps flag using string value
* Fix unresponsive app when switching to another app
* Fix Apps send TX
* Confirmation Modal, correct app name
* Refactor Balances to functional component
Removes Balances props in Layout.jsx
* Replaces selectors that were using safeParamAddressSelector with safeParamAddressFromStateSelector to avoid the bug of non-loaded safe when called
Also exports extendedTransactionsSelector to let the components use it
* Refactors Transactions.jsx, replaces transactions.tsx with txsTable.jsx
Removes all unused props from transactions.jsx
Makes all childs of txsTable.jsx fetch the props they need instead of sharing all of them even if they are not used
* Adds new selectors: safeNameSelector, safeNeedsUpdateSelector, safeCurrentVersionSelector
* Removes unused props from layout to settings.jsx
Removed props from the settings.jsx childs, now they fetch the values they need directly from the store
* Removes unused redux connect
* Adds safeEthBalanceSelector
* Removes all the props from layout to settings
* Refactor root and layout, extracts checkForUpdate and componentDidMount to components
Extracts header and tabs from Layout.jsx
* Makes routes.jsx use selectors instead of connect to unify the code
* Loads tabs components using react suspense
* Fixs warning when trying to update root component within loadStore.jsx
Replaces safe with safeAddress selector in layout.jsx to reduce the unnecessary rendering
Fixs setState in container.jsx
* Fixs checkForUpdates fetchTokenBalances
Adds FetchTokens.jsx in balances
Adds safeFeaturesEnabledSelector
* Fixs load addressbook action
* Replaces safe with owners in manage owners
* Improves buildSafe promises calls
Improves the loadStorage calls
* Fixs error "Uncaught (in promise) TypeError: Cannot read property 'includes' of undefined"
* Extracts LoadStore from outside the router component to avoid re-loading the store
Adds react lazy for Coins and Collectible tabs
* Reduce the polling rate for fetching transactions
* Removes unused actions.js
Removes unused selector props
* Fixes owners column selector usage
* Fixes processTransaction usage
* Optimize how the transaction list within the transactions tab are loaded
* Fix lint error
* Fix edit addressbook entry
* Fixs show send coins modal
* feature: batchRequest for incoming transactions
* Fixs race condition on loadStore
Fixs check for updates address null validation
* Adds ensureOnceAsync for getGnosisSafeInstanceAt
Adds batch request for safe params
* Removes unnecessary checkAndUpdateSafe from checkForUpdates, now the safe gets updated when a transaction arrives
* Fixs ensureOnce/memoization
* refactor: make a generic generateBatchRequest method
Create a generic method to easily build web3 batch requests
* refactor: use `generateBatchRequest` in `getTokensBalances`
* Removes .toJS in edit entry
* Removes web3 from sendTransactions
Removes pascal case FetchTokens
* Replaces /layout import
* Replaces CheckForUpdates component with useCheckForUpdates hook
* Makes FetchTokens a hook
* Removes getSafeParamsBatch, now the safes gets the data using the generic generateBatchRequests
* Replaces INITIAL_STATUS with INITIAL_STATE
* Replaces regex
Adds spaces before return
* Adds wrapInSuspense
* Runs prettier
* Makes checkAndUpdateSafe use generateBatchRequests
* Makes checkAndUpdateSafe use generateBatchRequests
* Fixs check for updates with null address
* Fixs transaction details getNameFromAddressBook
* Fixes zIndex between cookies banner and transaction details
* fix: cast returned values to number
Original code was expecting a BN instance, now it's a plain string.
* Fix replace owner name
* Fix race condition with adbk load
* Fixes replaces owner
* Fixs apps
* Moved hooks into own folder
* Moved LoadStore to routes.js
Refactors LoadStore as Hook
Move LoadStore to hooks folder
* Moves useLoadStore to safes/index
* Revert loadStore place change
* Fixes bug with fetchEtherBalance that causes updateSafe to be called
* remove useLoadStore, add useAnalytics hook
* remove React.memo from SafeView
* Reverts removing useLoadStore in order to maintain the consistency of the code
* rewrite useLoadStore in a more hook-y way, rename it to useLoadSafe
* Removes unnecessary setSafeLoaded
* Removes unnecessary safeLoaded
* fix: Coins values and balances
The app was retrieving ERC20 tokens information from 3 different endpoints.
- One from `balance/` to have the list updated
- another from `balance/usd` to have the values in USD
- the last one from the blockchain, to update the balances
This was all simplified to `balance/usd`.
Also, added a `currencyRate` to be updated when the currency is modified.
The value calculation happens on a component level, so when the `balanceUsd` value is modified, the value is properly reflected on the screen.
Refactored `activateTokensByBalance` to `fetchSafeTokens`, as this was doing quite more than just _activating_ and also added the `currencyList` calculation in it, so everything is updated when `balance/usd` endpoint is requested.
* fix: Balance screen
Collectibles weren't loading when clicking on the link
Also, refactored setState usage, to properly update current state
* fix: featuresEnabled undefined
* fix: add/activate newly received tokens
* fix: NaN Values in Coins for a newly loaded Safe
Was failing to set a default value for the `currencyRate`
* fix: Settings fails to load if `owners` is not loaded into store
Added a `Loader` until the required Safe's data is loaded into store.
* fix: prefetch txs data
When building the Txs list, we requested data for every tx what was translated into several RPC calls.
Now by _batchRequesting_ all the information on beforehand, Safe's loading is a bit faster.
* fix: prevent requesting safe, when there's no safe available in the store
* enhancement: fetch tokens when loading safe
By doing this, when loading a safe in the balance screen we will have tokens immediately loaded into the coins list
* fix: load collectibles when switch to collectibles screen
Collectibles weren't loaded when clicking menu link for a newly loaded safe.
Now every switch to the collectible's screen will trigger a fetch for collectibles.
* fix: fetch only if safe is ready
Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
* offchain signatures wip
* offchain signing wip
* offchain signatures wip
* offchain signatures wip
* save signatures to the history service
* fix eth signer & useEfefct hook
* offchain signatures wip
* signature check, mainnet testing wip
* dep update
* disable offchain signing for smart contract wallets
* Refactor EIP712 signer
* bring back .env.example
* Check if save version is >1.1.1
* use canTryoffchainSigning boolean variable, add comment about 4001 error
* move semver selector for safe version/offchain signatures to a constant, make use of empty_data for isContractWallet
* remove TYPE when sending txs to history service
* add eth_signTypedData_v4 signer, dep bump, add missing await
* add comments about version check for canTryOffchainSigning variable
* hide "please sign notification"
* dep bump
* dep bump
* Check if connected is ledger before trying offchain signatures
* minor fixes, temp deployment to test trezor
* add hardwareWallet boolean property to wallet model, disable offchain signatures for hw wallets
* add personal signer
* prettier fixes
* offchain signatures fixes
* Generates a cache to avoid multiples getHumanFriendlyToken() for the same token address
* Adds etags implementation for transactions
* Caches outgoing and incoming safe transactions based on etag value
* Removes cachedSafeTransactions, cachedSafeIncommingTransactions
* Refactors getTokenInstance
* Avoid recreating tokens on fetchTokens() once we have them in redux
* Fixs error on catch
* Batch request tokens balances
* Fixs missing token names
Changes the tokens limit from 300 to 3000
* fix: failed to instantiate non-standard ERC-20 tokens
For the batchRequest of balances, we're just using the `balanceOf` method call. So having a simple ABI with that only method prevents errors with non-standard ERC-20 Tokens.
* Removes unnecessary action updateSafeThreshold
Removes unnecessary action fetchEtherBalance
* Updated comments in code
Replaces constant with directly dispatching action
* BatchRequest done right
* fix: invalid action name `savedToken` -> `saveToken`
* Renames getTokenInstance to getTokenInfos
Fixs first load of transactions are empty
* Move fetchTokenBalances to `Balances` and `SendModal` components
* fix: Incoming transaction type
Backend now changed the type from 'incoming' to one of: `'ERC721_TRANSFER', 'ERC20_TRANSFER', 'ETHER_TRANSFER'`
* fix: tokenInstance `symbol` and `decimal` extraction
* Fix property name `decimals` instead of `tokenDecimals`
* Standardize non-standard ERC20 tokens discovery
* fix: isStandardERC20
* Revert "Move fetchTokenBalances to `Balances` and `SendModal` components"
This reverts commit ed84bd92
* Fixs Typo INCOMING_TX_TYPES
Renames tokenInstance with localToken
* Renames getBatchBalances to getTokenBalances
Returns saved tokens instead of tokenInstance in getTokenInfos
* Remove promise returns
Co-authored-by: fernandomg <fernando.greco@gmail.com>
* Add Assets sections
* (add) collectibles tab
* (add) criptokitty items
* (add) collectible items, definitive edition
* (fix) collectibles were overlapping with bottom banner
* (fix) wording
* (fix) responsive issues
* Install `async-sema` dependency
* Create collectible source classes
- source from mocked data and opensea, it's extendable to import information from other sources
* Update `Collectible` implementation to use new data source
* Create constants file to better handle env variables and default values
* Add description to item's cards
- also added a mocked class with real data
* Fix `saveTxToHistory`, remove hardcoded `CALL`
* Fix after merge development
* Set background color for collectible based on data info
- Changed `withStyles` in favor of a hook-like approach with `makeStyles`
* Enhance collectible card info and group title
* Use current safeAddress to query for collectibles information
- also migrated from `withStyles` to `makeStyles`
* Use proper key values for lists and set more significant names
* update yarn.lock after merge
* Fix linting error
* Move ethAsToken verification outside loop
* Use absolute route for `SendModal` import
* Move Collectibles into redux store
* Update yarn.lock file
* Selectable NFTs
* Divide the `collectible` store into `nftAssets` and `nftTokens`
- Also updated components to retain functionality
- Created a `textShortener` function for better presentation
* Update `yarn.lock`
* Update `yarn.lock`
* Fix item background color
* Clears the tokenID select field when the collectible selected changes
* Open Send modal from the assets section
* Use token name for the token selection dropdown
* Add openZeppelin contracts dependency
* Create ERC721 getter
* Fix types, default values and clean code
* Fix: properly refresh list of collectibles when switching safes
* Add ReviewCollectible step in send NFT
* Change items shadow
* Give option to choose what to send by clicking 'Send' button in AddressBook
* Disable [Send] button for Collectibles if not owner
* Set Coins as default option in assets tab
- also fixed styles for `Coins` option
* Use collectible icon in send modal
* Set default message when no assets available
- removed pagination feature
* Create SafeVersionProvider to better handle version-related tasks
Provides:
- current and latest versions,
- a boolean indicating a need for update,
- an upgradeSafe callback to trigger upgrade from any place,
- a list of enabled features, depending on the current version
- the latter needs a refactor like extract features outside the provider
and define constants for the features.
* Force build
* Update `yarn.lock`
* Disable Manage list for NFTs
* Fix container shadow
- Also fixes tables shadow, thanks to @gabitoesmiapodo
* Enable nested routes for balances (assets) tab
* Default to `/balance` if invalid nested path
* Disable [Send Collectible] button, if not supported by safe
* Change sub-menu buttons to clickable text
* Replace Paragraph with Link
* Fix invalid props errors for Link component
* Fallback to `transferFrom` if `safeTransferFrom` is not implemented
* Use `transfer` as fallback to ERC-721's `safeTransferFrom`
- need to identify ERC721 token using `transfer` and `name` methods
* Display failed transactions
* Use react.lazy for collectibles' modals
* Identify ERC-721 token transaction
* Fix Send Collectibles modal layout/behavior
- disable dropdown list if there's no item to pick
- fix placeholder for tokens list
- fix dropdown list styles
* Set default `isSuccessful` flag to `true`
* Save version related values into store
- each safe has its `currentVersion`, `needsUpdate` and `featuresEnabled`
- and safes store has the `latestMasterContractVersion`
* Migrate Balance to use store-provided values
* Migrate Settings to use store-provided values
* Migrate ChooseTxType to use store-provided values
* Remove SafeVersionProvider
Co-authored-by: Gabriel Rodriguez Alsina <gabriel.rodriguez@altoros.com>
Co-authored-by: apane <agustin.pane@gmail.com>
* Prevent notifications from showing after loading safe
* Make a safe-based sessionStorage control
* Show notifications for new Safes and prevent displaying oldest incoming tx for newly loaded Safe
* Create `currentSession` state
* Add `currentSession` to the Store
* Initialize `currentSession`
* Use `currentSession` to handle notifications for incoming Transactions
* Remove `updateUserStatus`
* Move the load of the current session from storage to app startup
* Fix duplicated reducer id
* Adapt notificationsMiddleware
* Add `blockNumber` to transactions model
* Create `incomingTransaction` node in store and load it along with `transactions`
* Add incoming transfers to the Transactions table
* Rename `transactionHash` to `executionTxHash` for better incoming/outgoing txs unification in Transactions table
* Add incoming transactions details
* Add transaction type icon in table row
* Add snackbar notification for incoming txs
* Make incoming transaction snackbar to show on any tab
* Use makeStyles hooks
* Fix incoming amounts conversion from wei
* Make concurrent promise calls
* Use date to calculate transactions ids
* Prevent repeating messages
- also move logic to display snack bar into the notifications middleware
* Merge transactions and incomingTxs to the transactions selector
* Show 'Multiple incoming transfers' if they are more than 3
* Prevent incoming transactions snack bar for first-timer users
* Set ID as the default order
* Use constant for _incoming_ type
* Dep bump
* Fetch transactions when safe view is mounted
* eslint fix
* Calculate new tx nonce from latest tx in service
* Fix tx cancellation, allow passing nonce to createTransaction
* dep bump
* Refactor createTransaction/processTransaction to use object as argument
* Adopting transactions table to new send tx flow with predicted nonces
* dep bump, disable esModule in file-loader options after new v5 release
* Don't show older tx annotation for already executed txs
* sort tx by nonce
* get new safe nonce after tx execution
* Bugfixes
* remove whitespace for showOlderTxAnnotation
* Adds google analytics tracking for every route
* Adds cookies acceptance check before tracking
* Fix react-ga dependency
* Fix cookieStore deletion
* Merge with #189-cookie-banner
* Fixs react ga version
Refactored HOC with hooks
* Fix TYPO
* Fix path for cookies utils
* Fix imports
* remove flow type definition for polish
* Add GA ID log
* Fix load GA After cookies acceptance
* Implements intercom
Adds REACT_APP_INTERCOM_ID_MAINNET and REACT_APP_INTERCOM_ID_RINKEBY env vars
* Adds .env.example
* Adds intercom env vars
* Updates env vars
Replaces "rinkeby" and "mainnet" with "non-production" and "production"
* Now loads intercom after the user accepted the analytics
* Add env variable for production intercom id
* Update .env.example
* Removes react-intercom
Fixs getIntercomId with default dev appID
Now loads intercom as script
* Renegerate flow-types