-
Notifications
You must be signed in to change notification settings - Fork 363
feat: Safe creation + settings transactions #2845
Conversation
* Added new Stepper Component * Added unit tests to the Stepper Component * Added new StepperForm Component * Added StepperForm unit tests
…mponent (#2699) * first approach of new Load Safe flow * Added Step 1 Connect wallet & select network step only for stage * Added Step 2 Name and address in load safe flow * Added Step 3 Load Safe Owners step * Added Step 4 Last step of load safe flow * added onSubmitLoadSafe event and switch network dialog * Added a isLoading state to prevent to show an error in the safe address field * Added the current network label clickable to open the network selection popup
* Use getChainId as hot load state * Adapt transaction list to be compatible with multiple chains at once * Fix queue transaction list * Reset safes list when changing network * Cleanup unused code * Use config functions inside render cycle of components * Add comments on things to be done in next steps * Add possibility to switch network from button * Remove unused selectors * Navigate to Welcome page when changing network * Add missing dependency in useCallback * Add provider functions to be evaluated in runtime * Fix create/process transaction * Correctly swithc networkId on bnc-onboard * Make onboard configuration dynamic * Use network selector instead of getNetwork * Skip a test for now * Skip a test for now * Fix lint * networkSelecto -> currentChainId; add ChainIndicator * Fix tests * Fix chainId when adding address book entries * Add network name in the default safe name * APP_ENV * Replace a couple more places with network config getters * restored the select Network popup in Load flow * Switch wallet chain only via popup click * fixed adding an entry to the AB that already exists in another network * updated addressBookAddressesByCurrentChainId selector to use currentNetworkAddressBook * restored the check if web3 has been instantiated * Use the onboard wallet check only as a fallback Co-authored-by: katspaugh <katspaugh@gmail.com> Co-authored-by: Daniel Somoza <daniel.somoza@gnosis.pm> Co-authored-by: katspaugh <ivan.kalyaev@gmail.com>
* Fix onboard initialization * Fix Ledger wallet connection
* Network circle on each transaction modal * Get network id from config * Added chain indicator on safe apps executions * Changed the header in all modals * Added header on add/replace/remove owner modals * Fix imports * Fix uncomplete missing import Co-authored-by: katspaugh <ivan.kalyaev@gmail.com> Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Update start commands to work on Windows * List of networks and owned safes * Display balance + filter network safes * Change network w/ safe + remove unused components * Readd NetworkSelector + refactor network setting * Refactor setNetwork * Move setNetwork * Load other network safes from localStorage * Fix safe names/ordering + display ETH balance * Scroll current safe into view * Fix imports, loadFromStorage, nativeCoin + yarn * Fix state * Fix types + get local safes by network id * Fix other network safe names * Extract logic into hook * Hide networks w/ no safes + lazy load hook state * Show owned safes for cur. network + name/coin fix * Fix number of owned safes * Tweak when to display Safes * Remove cross-env commands * Load new env Safes, collapsed + scroll to loaded * Add effect dependancy * Less padding, scroll to added + when disconnected * Fix scrolling to non-added, owned Safe
* Added new create safe flow and welcome layout * Added Step 3 in Create New Safe flow * Added Review Safe creation Step * Added support for Old MultiSig migration and fixed #2590 * Added Safe creation Process component * Added current network label to all steps in load and create safe flows * Added CreateNewSafePage tests (step 1) * Added Owners and confirmation tests in Create new safe flow * added Step 4 tests and removed throttle from estimateGas * Added a warning popup at the end of the New Safe Creation flow * added instantiateSafeContracts in the Create Safe flow Co-authored-by: katspaugh <katspaugh@users.noreply.github.com>
* Fix li nesting DOM error * Remove comment
* Only poll when tags change on relevant paths * Don't restrict polling to transactions route * Add matchPath * Remove matchPath for collectibles page * Readd collectibles page check + always get tokens * fetschSafeTokens in parallel * Dispatch syncronously + add initial fetchSafe flag * Polling dependant on safe loading state * Add default isSafeLoaded value * Update route + move network name to slug Add networkName slug to history pushes Move network name slug getter from config Add missing network name slugs Fix error boundary type Route that filters legacy paths Remove unnecessary path generation Remove router from store Fix Settings route Test ChainRoute Tests Adjust legacy route detection + fix tests Remove legacy routes + redirect before render Fix import Fix tests Add types Programmatically generate pathname Fix test Add basename to router Add basename to history object Update tests Explicitly disable refresh forcing Log networkName Add base Remove base and fallback via S3 Add network slug to middleware Add index-document S3 arg Adjust deploy script Remove S3 command Rm the network path from S3 Removed act warnings in the unit tests console (#2700) * removed annoying warnings in tests console Fix cla action (#2716) Revert "Fix cla action (#2716)" This reverts commit 578a53c. Fix: wrap web3Provider.eth.getCode in a try-catch (#2715) * Fix: wrap web3Provider.eth.getCode in a try-catch * Remove test code; add unit tests * Fix the null check Feature/2397 display guard information in settings (#2662) * Added transaction guard to advanced settings * Get guard from the unified gateway * Fixed tests * Added TransactionGuard component * WIP: created component without contract instance * Call safe method to set guard tx address * Deleted console log * Added description to remove guard modal * Update gateway-sdk to v2.1.0 * Fix remove guard function * Minor fixes * Replace guard if fetchedSafe has a null guard * Fixed some tests * Fixed test Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm> Change baseGas and safeTxGas to string (#2710) * Accept baseGas and safeTxGas as a number from the client gateway * Set Gateway SDK to v2.2.2 Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm> Bump axios from 0.21.1 to 0.21.2 (#2722) Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](axios/axios@v0.21.1...v0.21.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Use SignMessageLib for signing (#2701) * add function to get the deployment * remove signMessageLib.ts' * sign message modal wip * pass request id to confirm/reject transaction functions * sign message modal wip * add sign messasge modal * close modal by default * use next version of safe-apps-sdk * regenerate lockfile * sign message hash * style the signing modal * remove console log * tests wip * adjust message to by string only * updat esafe-apps-sdk * use apps sdk from npm * move try/catch logic to if statement * use absolute path when mocking a module in SignMessageModal tests fix gas types (#2732) Upgrade bnc onboard (#2734) * Bump bnc-onboard to latest version * Bump dependencies with minor changes Bump version to 3.14.0 dont import react when not needed (#2737) Add gas estimation endpoint from gateway SDK (#2725) * Add gas estimation endpoint from gateway SDK * Use latest gateway-sdk version Use fetchSafesByOwner from client-gateway Fix more ESLint errors (#2738) Use a different S3 bucket for PR deployments yarn install Revert "yarn install" This reverts commit a8bf5b3. A new PR deployment host Remove networks from PR comments Fix lint Change browser history basename Remove getBasename tests Add network to browser history basename Move network name from basename to welcome route Bump version Fix BSC gasPrice (#2747) Feature: Review Safe App Transaction modal tests (#2743) * wip confirm tx modal tests * remove unused var * Add ts-expect-error statements * Remove unused web3readonly Add base route slugs to all redirects Add missing base route slug Add route slugs Add network name slug to add safe button Add networkName slug to basename Remove all networkName path generation Move legacy route redirection to Root component Use window location object Add Router w/ history object to legacy redirection Default network name Fix import Revert "Use a different S3 bucket for PR deployments" This reverts commit 82eaa7f. Revert "A new PR deployment host" This reverts commit 3d1710c. Add network to deploy script Move network basename to slug + deploy to /app Fix test Add PUBLIC_URL base Adjust PUBLIC_URL Remove PUBLIC_URL from deploy actions Add absolute homepage Fix route slugs * Fix merge issues * Fix root URL * defaultSafe bug hunting + remove safe tracking * Base app rendering in addressFromUrl Clear current session from react state to get the app in loading state while fetching new info from local storage * Add types * Add return type * Set network subdirectory from network label * Fix config tests * Access loader via PUBLIC_URL * Load loader relevant to index.html * Add base * Header logo navigates to welcome page * Throw invalid URL addresses + fix network base * Remove error thrown + fix tests * Fix merge error * Fix merge conflicts Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Clean up deployment scripts * Fix tests
* Removed old files and added some extra ids because e2e * Deleted old stepper and renamed CreateSafePage component * renamed NewStepper to Stepper component
* Created iframe and postMessage * Migration flow complete * Remove event listeners once the component is unmounted * Minor fixes and commented some code * Migration from unified app to network apps * Added typing and mocked apps urls * Migration working, can be tested with ports 3000,3001,3002 * Added types to event from child iframe * Minor code changes * Added store action to migrate without notifications * Updated urls for QA testing * Unit tests for batchLoadEntries * Target.origin updated for postMessage * Changed urls for QA testing * Deleted console log * Added logs for debuging * Save into inmortaldb and include empty name addressbook entries * Add debugging for migration screen * Commit to trigger build * saveMigratedKey to storage using origin key * Allow read entries with undefined name in addressbook * Fix storing payload entries to local storage * Test to stringify the complete localstorage * Check if migration is already done and don't repeat * Directly save current session to storage when setting local storage migrated * Add logic to execute or skip migration * Add migration reset when adding/updating safes or updating the address book * Ensure that we send message only once * Remove state dependency from useEffect, cleanup console.log and fix executeMigration * Simplify condition check * Set a defined target URL for post message * Set example of production and staging urls * Configure new testing environment * Work in progress * Work in progress * Refactor * Remove redundant localStorage store flags * Remove log * Update subdomain * Track instead of log error * Exclude mainnet from migration * Remove mainnet check + add dependancy * Rm isLocalStorageMigrated * Load all iframes at once * Subdomain URL * Extract testable functions * Add tests + types * Cleaner typing * Never import MAINNET keys * Update the PR hostname * Rm slash * Take the network from the iframe * Extract network from the origin * Load iframes sequentially + add a timeout * Polygon first Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm> Co-authored-by: iamacook <aaron.cook@gnosis.pm> Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com>
const implementation = useKnownAddress(txInfo.implementation?.value || ZERO_ADDRESS, { | ||
name: txInfo.implementation?.name || undefined, | ||
image: txInfo.implementation?.logoUri || undefined, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a bit of a boilerplate. Could we maybe modify useKnownAddress
to fallback to ZERO_ADDRESS and undefined internally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Expected result: It should be "Send" and "Receive" as was before |
So I took the new description the original ticket had:
So I assume that: Issue: I created a "Send funds" tx for both of them, but their names won't show up @liliya-soroka Can you check if those addresses are still "known addresses"? |
I've just tweaked the code and it should be working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@iamacook Ok, I've check other outgoing tx and enabling modules and they look fine. |
I've checked with the backend team and the names are not returned. Can we move this out of QA? |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
E2E Tests Failed Failed tests:
|
What it solves
Resolves #1866
How this PR fixes it
Expanded safe creation/settings 'transactions' show names from the address book or historical transactions (in that order) if they exist.
Note: For the time being owner names are not returned when interacting with owners.
How to test it
Expand safe creation/settings 'transactions' and ensure that known names are displayed.
Screenshots