-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor eth_sendTransaction
handler
#5619
Conversation
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.
LGTM
I think can be tested using the E2E Send Transaction test suite. @cortisiko @Gudahtt |
1500463
to
241ba4e
Compare
The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier.
The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier.
The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier.
This comment was marked as resolved.
This comment was marked as resolved.
* Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module.
241ba4e
to
a10f602
Compare
a10f602
to
94e092d
Compare
Tests have been added for the I was going to scrap the |
Substantial additional changes have been made
* Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module.
* Upgrade on-ramp-sdk to 1.9.0 (#5782) * Update 6.1.2 changelog (#5953) Update change log formatting and language * E2E Establish performance baseline (#5947) * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * add tags, create performance folder. * remove scenario chaining * change launch times * Verify Contract Details (#5327) * draft_token_allowance * code cleanup * fetch token address, nickname and image * rebased to main * styles should match design * toggle blockexplorer state, token image * validate address before saving * token symbols * implement feedback * updated snapshot * rebased to main * remove unused code * code cleanup * code rebase and clean * snapshot update * test_address rewrite * rebased to main * rebased to main, QA issue fix * QA issues fix * fix QA issues * update snapshot * rebased to main * updated to use the new network controller update * remove unneccessary fallbacks * INFRA-837: Add sonar integration (#5949) * INFRA-837: Add sonar integration * Update sonar branch * Vault corruption recovery flow (#4421) * Handle Vault Corruption - trigger vault recovery flow in Login when error occurs - fetch backup from vault and then reinitialize the engine with the backed up keyring - we also destroy the old engine - some local data might be lost but the accounts will be safe - on fail we get them to create/import a new wallet - translations * switch to nativeevent (#5960) * Added translations for MC 0.5 (#5964) * [FIX] Remove select address as a prop on App index.js (#5962) * Remove select address as a prop on App index.js * Update snapshot * Bump @xmldom/xmldom from 0.8.3 to 0.8.6 (#5959) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.3...0.8.6) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump http-cache-semantics from 4.1.0 to 4.1.1 (#5669) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Extract test accounts to env vars (#5952) * make detox import SRP from accounts.js file. * extract account infos to env vars * update e2e instructions and add vars in .js.env template --------- Co-authored-by: Curtis <Curtis.David7@gmail.com> * improv: add workflow triggers for tags on release and QA (#5902) update notifications * [UPDATE] pin sonar action to commit (#5967) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * [UPDATE] sonar action configuration (#5972) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * bump the sonar checkout action version which will use compliant version of node * configure sonar analysis directors, test path, exclusions * added project & file configurations * remove test directory argument and added more exclusions * added more exclusions * added test inclusions and root directory for tests * Move `eth_sendTransaction` method handler to a separate module (#5968) * Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module. * fix: bundle video in app to prevent crash when not available (2nd attempt) (#5941) - bundle video with embedded the subtitles in app - add a readme in video folder to explain risks if video and subs files are moved or removed - add a shell script running ffmpeg to regenerate the video - remove useless constants and code related to remote SRP video resources. * Send to multisig address. (#5931) * Send to multisig address. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Linter fix. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Revert wdio changes Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * fixed iyarc format removed exclusions not needed, added exclusion for production value since the project is stilll maintained (#5978) * [IMPLEMENT] Use Terms Modal (#5242) * user terms modal builded * use terms modal logic implemented * small fix on translations * remove old terms and conditions * remove ts ignore * fix typo * create a MandatoryModal component * readme and update props to generic names * update snapshot * changing && to ternary operator for a more accurate ui rendering * added margin and added component to the storybook * implemented webview to show the ToU * scale font size * clean * fix snapshot * fix lint * analytics * modal mandatory more agnostic * Clean up styles and storybook * Clean up on accept logic * logic on util file termsOfUse * scrolling webview on Android and reusable modal not dismissable * Implemented option scroll needed on ModalMandatory * update source of use terms * fix import * remove margin bottom * english translation updated * fix button import * modal mandatory not dismissable * change icon name * use terms modal on android for existing users * ToU called only called on nav/app component * Revert "ToU called only called on nav/app component" This reverts commit 7f2e12f. * fix redirect on ToU modal to acessibility website * fix track ecent * E2e appium/5783 tou onboarding new app installs (#5951) * Webdriverio and Detox test scripts for Term of use feature. Test scripts updated to have the term of use steps * Small changes to fit browserstack * Remove static-logos.js file changes * move terms of use to before importing or create a new allet * Update Detox and wdio test scripts to be compatible with the recept term of use changes * Solve lint issues --------- Co-authored-by: Cal Leung <cleun007@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> * feat: add portfolio button to asset action buttons (#5785) * feat: add portfolio button to asset action buttons * Update app/components/UI/AccountOverview/index.js Co-authored-by: Cal Leung <cleun007@gmail.com> * chore: move portfolio url to AppConstants * chore: fix minor issues * chore: add event for portfolio link clicked * chore: add snapshot test update * chore: add translations * add new icon type name * chore: move portfolio button next to net worth * chore: add progress * fix: tab not updating properly * move styles to stylesheet * fix wallet index test * remove logs and actually fix wallet index test * re-open existing tab instead of new tab after browser is loaded * fix browser load, active tab not re-appearing bug --------- Co-authored-by: Cal Leung <cleun007@gmail.com> * dispaly nft info in browser (#5930) * Clear Hex data when Token Transfer reverts ETH (#5839) * clear hexdata when token updates to eth * native token transaction data set to 0x * use constants * Ignore e2e test artifacts (#5998) A `.gitignore` entry has been added for the `artifacts` directory that gets generated locally when a Detox iOS e2e test fails. * remove sonar config from actions that can be configured in the web portal (#6013) * [ENHANCEMENT] E2E Permission system tests (#5910) * detox permission system working. * fix lint * removing imported account steps. * update steps in feature files. * added constants for element locators and added new feature file * fix linting * update tests * fix linting * update test name * delete wallet on permission system flow. need to set better timeouts to deal with toast * remove redudant test steps. * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * fix browser path * update dapp * fix tests from merge conflict. * add long wait to terms of use modal to deal with flakiness on bitrise * remove redundant test * disabling the ToU test. * Fix 18 JS type errors for TSC to output 683 TS/TSX errors (#5975) * Fix 18 JS type errors exposing 683 TS/TSX errors Minimum required to tackle remaining errors in 120 files Follow-up to: #5879 Fix: #5878 Next: #5882 * Fix app/core/Engine.ts lint errors * Revert "Fix app/core/Engine.ts lint errors" This reverts commit 7ac7011. * Fix app/core/Engine.ts lint errors * Skip type checking library declaration files (#5882) Fix: #5881 * [FEATURE] SDK Session Persistence (#5948) * refactor: sdkconnect typescript rewrite and otp generation * feat: permission management with otp deeplinks * feat: modal ui for loading / feedback on sdk connection state * feat: remove sdk settings from experimental * feat: prevent empty title in transaction header * feat: add otp in account approval modal * feat: i18n on sdk feedback modal * chore: cleanup comments * chore: remove rememberme comments * feat: use default codefi server url * fix: missing otp actions * chore: remove sdk from experiment description * feat: mmsdk auto retrieve approved account on getProviderState * chore: simplify logic for easier code readability * feat: manage sdk backward compatibility * feat: auto validate permission on deeplink reconnection * fix: typo * fix: useeffect deps * feat: new styling of otp * chore: remove comments * feat: remove unnecessary view * feat: remove unnecessary view * chore: linting and typos * chore: more linting adjustments * fix: invalid json file * fix: update jest snapshot for accountoverview * chore: remove extra space * feat: remove plaintext option used to debug protocol * chore: remove unused text * feat: move modal from drawer to root navigation * feat: edit i18n values and remove unused text * chore: remove console logs * feat: use theme typography in createstyle * feat: use navigation instead of redux store to display loading state * feat: update snapshot after ui changes * chore: remove unused code + linting * fix: invalid typography * fix: rename for valid camelcase * chore: cleanup * chore: remove unused code * feat: consolidate action params within connect uri * feat: add do not remember channel option * feat: use useAssetFromTheme hook for loading modal * fix: linting * chore: remove console logs * feat: remove sdk modal references * feat: extract onconfirm action to component props * fix: prevent opening inappbrowser on connect deeplink * feat: update ui according to latest design file * feat: prevent invalid connection interruption when paused * feat: display sorted connection list * feat: send metamask wallet version to connected clients * feat: replace fontstyles with typography in account approval modal * chore: consolidate sdk constants to AppConstants * chore: formatting * fix: duplicated imports * build: update communication layer dep to 0.2.0 * chore: disable debug logs * chore: prevent linting error * chore: remove comm layer * chore: linting * feat: replace navigation.goback with sheetRef.hide * feat: remove fontSize when using typography * feat: use Icon library instead of fontawesome * feat: catchall title value * feat: catchall title value * Revert "Move `eth_sendTransaction` method handler to a separate module (#5968)" (#6021) This reverts commit 49a6305. * On-ramp: Add accessibility label to custom action images (#6016) * disable back press and add margin to the bottom for accept ToU modal (#6023) * On-ramp: Add #6009 strings (#6019) * [FEATURE] Account selector on swaps screen (#5997) * Account selector on swaps screen * remove unused import * update with comment and without justify content * update with previous selected address * add ellipsis to the account name if it is more than 13 chars * feat: add consensys zkevm (Linea) support (#5958) * feat: add consensys zkevm support * fix: change consensys zkevm network name to Linea + change rpc url * feat: add feature toggle for linea network * feat: add two utility functions for block explorer url * feat: add patches to support lineatestnet * fix: add linea testnet as rpc network * fix: updates imports * Fix merge conflicts from merging main * Fix trackEvents * Fix missing import * Fix for #5898 - Converting native ETH to fiat and fiat to native ETH results in wrong values beign displayed on the Amount screen (#5961) * use setState callback to call onInputChange Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * E2E for currency switch Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Lint fix Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Update snapshot Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com> Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> Co-authored-by: Matthew Epps <mepps32@gmail.com> Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
* Upgrade on-ramp-sdk to 1.9.0 (#5782) * Update 6.1.2 changelog (#5953) Update change log formatting and language * E2E Establish performance baseline (#5947) * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * add tags, create performance folder. * remove scenario chaining * change launch times * Verify Contract Details (#5327) * draft_token_allowance * code cleanup * fetch token address, nickname and image * rebased to main * styles should match design * toggle blockexplorer state, token image * validate address before saving * token symbols * implement feedback * updated snapshot * rebased to main * remove unused code * code cleanup * code rebase and clean * snapshot update * test_address rewrite * rebased to main * rebased to main, QA issue fix * QA issues fix * fix QA issues * update snapshot * rebased to main * updated to use the new network controller update * remove unneccessary fallbacks * INFRA-837: Add sonar integration (#5949) * INFRA-837: Add sonar integration * Update sonar branch * Vault corruption recovery flow (#4421) * Handle Vault Corruption - trigger vault recovery flow in Login when error occurs - fetch backup from vault and then reinitialize the engine with the backed up keyring - we also destroy the old engine - some local data might be lost but the accounts will be safe - on fail we get them to create/import a new wallet - translations * switch to nativeevent (#5960) * Added translations for MC 0.5 (#5964) * [FIX] Remove select address as a prop on App index.js (#5962) * Remove select address as a prop on App index.js * Update snapshot * Bump @xmldom/xmldom from 0.8.3 to 0.8.6 (#5959) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.3...0.8.6) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump http-cache-semantics from 4.1.0 to 4.1.1 (#5669) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Extract test accounts to env vars (#5952) * make detox import SRP from accounts.js file. * extract account infos to env vars * update e2e instructions and add vars in .js.env template --------- Co-authored-by: Curtis <Curtis.David7@gmail.com> * improv: add workflow triggers for tags on release and QA (#5902) update notifications * [UPDATE] pin sonar action to commit (#5967) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * [UPDATE] sonar action configuration (#5972) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * bump the sonar checkout action version which will use compliant version of node * configure sonar analysis directors, test path, exclusions * added project & file configurations * remove test directory argument and added more exclusions * added more exclusions * added test inclusions and root directory for tests * Move `eth_sendTransaction` method handler to a separate module (#5968) * Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module. * fix: bundle video in app to prevent crash when not available (2nd attempt) (#5941) - bundle video with embedded the subtitles in app - add a readme in video folder to explain risks if video and subs files are moved or removed - add a shell script running ffmpeg to regenerate the video - remove useless constants and code related to remote SRP video resources. * Send to multisig address. (#5931) * Send to multisig address. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Linter fix. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Revert wdio changes Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * fixed iyarc format removed exclusions not needed, added exclusion for production value since the project is stilll maintained (#5978) * [IMPLEMENT] Use Terms Modal (#5242) * user terms modal builded * use terms modal logic implemented * small fix on translations * remove old terms and conditions * remove ts ignore * fix typo * create a MandatoryModal component * readme and update props to generic names * update snapshot * changing && to ternary operator for a more accurate ui rendering * added margin and added component to the storybook * implemented webview to show the ToU * scale font size * clean * fix snapshot * fix lint * analytics * modal mandatory more agnostic * Clean up styles and storybook * Clean up on accept logic * logic on util file termsOfUse * scrolling webview on Android and reusable modal not dismissable * Implemented option scroll needed on ModalMandatory * update source of use terms * fix import * remove margin bottom * english translation updated * fix button import * modal mandatory not dismissable * change icon name * use terms modal on android for existing users * ToU called only called on nav/app component * Revert "ToU called only called on nav/app component" This reverts commit 7f2e12f. * fix redirect on ToU modal to acessibility website * fix track ecent * E2e appium/5783 tou onboarding new app installs (#5951) * Webdriverio and Detox test scripts for Term of use feature. Test scripts updated to have the term of use steps * Small changes to fit browserstack * Remove static-logos.js file changes * move terms of use to before importing or create a new allet * Update Detox and wdio test scripts to be compatible with the recept term of use changes * Solve lint issues --------- Co-authored-by: Cal Leung <cleun007@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> * feat: add portfolio button to asset action buttons (#5785) * feat: add portfolio button to asset action buttons * Update app/components/UI/AccountOverview/index.js Co-authored-by: Cal Leung <cleun007@gmail.com> * chore: move portfolio url to AppConstants * chore: fix minor issues * chore: add event for portfolio link clicked * chore: add snapshot test update * chore: add translations * add new icon type name * chore: move portfolio button next to net worth * chore: add progress * fix: tab not updating properly * move styles to stylesheet * fix wallet index test * remove logs and actually fix wallet index test * re-open existing tab instead of new tab after browser is loaded * fix browser load, active tab not re-appearing bug --------- Co-authored-by: Cal Leung <cleun007@gmail.com> * dispaly nft info in browser (#5930) * Clear Hex data when Token Transfer reverts ETH (#5839) * clear hexdata when token updates to eth * native token transaction data set to 0x * use constants * Ignore e2e test artifacts (#5998) A `.gitignore` entry has been added for the `artifacts` directory that gets generated locally when a Detox iOS e2e test fails. * remove sonar config from actions that can be configured in the web portal (#6013) * [ENHANCEMENT] E2E Permission system tests (#5910) * detox permission system working. * fix lint * removing imported account steps. * update steps in feature files. * added constants for element locators and added new feature file * fix linting * update tests * fix linting * update test name * delete wallet on permission system flow. need to set better timeouts to deal with toast * remove redudant test steps. * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * fix browser path * update dapp * fix tests from merge conflict. * add long wait to terms of use modal to deal with flakiness on bitrise * remove redundant test * disabling the ToU test. * Fix 18 JS type errors for TSC to output 683 TS/TSX errors (#5975) * Fix 18 JS type errors exposing 683 TS/TSX errors Minimum required to tackle remaining errors in 120 files Follow-up to: #5879 Fix: #5878 Next: #5882 * Fix app/core/Engine.ts lint errors * Revert "Fix app/core/Engine.ts lint errors" This reverts commit 7ac7011. * Fix app/core/Engine.ts lint errors * Skip type checking library declaration files (#5882) Fix: #5881 * [FEATURE] SDK Session Persistence (#5948) * refactor: sdkconnect typescript rewrite and otp generation * feat: permission management with otp deeplinks * feat: modal ui for loading / feedback on sdk connection state * feat: remove sdk settings from experimental * feat: prevent empty title in transaction header * feat: add otp in account approval modal * feat: i18n on sdk feedback modal * chore: cleanup comments * chore: remove rememberme comments * feat: use default codefi server url * fix: missing otp actions * chore: remove sdk from experiment description * feat: mmsdk auto retrieve approved account on getProviderState * chore: simplify logic for easier code readability * feat: manage sdk backward compatibility * feat: auto validate permission on deeplink reconnection * fix: typo * fix: useeffect deps * feat: new styling of otp * chore: remove comments * feat: remove unnecessary view * feat: remove unnecessary view * chore: linting and typos * chore: more linting adjustments * fix: invalid json file * fix: update jest snapshot for accountoverview * chore: remove extra space * feat: remove plaintext option used to debug protocol * chore: remove unused text * feat: move modal from drawer to root navigation * feat: edit i18n values and remove unused text * chore: remove console logs * feat: use theme typography in createstyle * feat: use navigation instead of redux store to display loading state * feat: update snapshot after ui changes * chore: remove unused code + linting * fix: invalid typography * fix: rename for valid camelcase * chore: cleanup * chore: remove unused code * feat: consolidate action params within connect uri * feat: add do not remember channel option * feat: use useAssetFromTheme hook for loading modal * fix: linting * chore: remove console logs * feat: remove sdk modal references * feat: extract onconfirm action to component props * fix: prevent opening inappbrowser on connect deeplink * feat: update ui according to latest design file * feat: prevent invalid connection interruption when paused * feat: display sorted connection list * feat: send metamask wallet version to connected clients * feat: replace fontstyles with typography in account approval modal * chore: consolidate sdk constants to AppConstants * chore: formatting * fix: duplicated imports * build: update communication layer dep to 0.2.0 * chore: disable debug logs * chore: prevent linting error * chore: remove comm layer * chore: linting * feat: replace navigation.goback with sheetRef.hide * feat: remove fontSize when using typography * feat: use Icon library instead of fontawesome * feat: catchall title value * feat: catchall title value * Revert "Move `eth_sendTransaction` method handler to a separate module (#5968)" (#6021) This reverts commit 49a6305. * On-ramp: Add accessibility label to custom action images (#6016) * disable back press and add margin to the bottom for accept ToU modal (#6023) * On-ramp: Add #6009 strings (#6019) * [FEATURE] Account selector on swaps screen (#5997) * Account selector on swaps screen * remove unused import * update with comment and without justify content * update with previous selected address * add ellipsis to the account name if it is more than 13 chars * feat: add consensys zkevm (Linea) support (#5958) * feat: add consensys zkevm support * fix: change consensys zkevm network name to Linea + change rpc url * feat: add feature toggle for linea network * feat: add two utility functions for block explorer url * feat: add patches to support lineatestnet * fix: add linea testnet as rpc network * fix: updates imports * Fix for #5898 - Converting native ETH to fiat and fiat to native ETH results in wrong values beign displayed on the Amount screen (#5961) * use setState callback to call onInputChange Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * E2E for currency switch Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Lint fix Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Update snapshot Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Fix analytics --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com> Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> Co-authored-by: Matthew Epps <mepps32@gmail.com> Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
* 6.2.0 * Upgrade on-ramp-sdk to 1.9.0 (#5782) (#5943) Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> * [FIX] Prevent account selection reset (#5966) * Remove select address as a prop on App index.js * Update snapshot * Fix wallet creation (#5971) revert function back to logic from #5374 * [UPDATE] yarn audit config and providing excluded reasoning (#5987) * updated yarn audit config and providing excluded reasoning * fix lint warnings remove unused import * Revert Relative Path for EditGas (#5973) * update relative path for edit gas * update relative path for editgas legacy * On-ramp: Add #5870 localization (#5976) * Add #5870 localization strings * Center and lowercase text * [UPDATE] - patch for request 2.88.2 yarn audit (#5988) * updated yarn audit config and providing excluded reasoning * fix lint warnings remove unused import * add a patch for yarn audit report on request * [FIX] Fix displaying balance on watch asset screen (#5970) * Fix displaying balance on watch asset screen * Fallback to use wallet account if no account is connected to Dapp for watch asset * Fix linting issues * [FIX] Fix SRP reveal screen (#5980) * Fix padding issues on ErrorBoundary * Provide navigation to ErrorBoundary * Clean up RevealPrivateCredential screen * Fix safe area view on ErrorBoundary * Fix linting issues * [REVERT] Revert Segment related changes for 6.2.0 (#5991) * Revert "[IMPROVEMENT] Analytics Alert (#5892)" This reverts commit 6eddb15. * Revert "[FIX] Initial Analytics Opt Out (#5863)" This reverts commit 1474d44. * Revert "[ANALYTICS] Events migration (#5139)" This reverts commit e3d8124. * Fix redundant URL import * [UPDATE] changelog and bump app version for RC2 (#6005) * update changelog and bump app version for RC2 * removed merge conflict * undo delete of alert * [MERGE] Merge main into 6.2.0 (#6029) * Fix merge conflicts from merging main * Fix trackEvents * Fix missing import * [Merge] Fix merge conflicts with main (#6031) * Upgrade on-ramp-sdk to 1.9.0 (#5782) * Update 6.1.2 changelog (#5953) Update change log formatting and language * E2E Establish performance baseline (#5947) * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * add tags, create performance folder. * remove scenario chaining * change launch times * Verify Contract Details (#5327) * draft_token_allowance * code cleanup * fetch token address, nickname and image * rebased to main * styles should match design * toggle blockexplorer state, token image * validate address before saving * token symbols * implement feedback * updated snapshot * rebased to main * remove unused code * code cleanup * code rebase and clean * snapshot update * test_address rewrite * rebased to main * rebased to main, QA issue fix * QA issues fix * fix QA issues * update snapshot * rebased to main * updated to use the new network controller update * remove unneccessary fallbacks * INFRA-837: Add sonar integration (#5949) * INFRA-837: Add sonar integration * Update sonar branch * Vault corruption recovery flow (#4421) * Handle Vault Corruption - trigger vault recovery flow in Login when error occurs - fetch backup from vault and then reinitialize the engine with the backed up keyring - we also destroy the old engine - some local data might be lost but the accounts will be safe - on fail we get them to create/import a new wallet - translations * switch to nativeevent (#5960) * Added translations for MC 0.5 (#5964) * [FIX] Remove select address as a prop on App index.js (#5962) * Remove select address as a prop on App index.js * Update snapshot * Bump @xmldom/xmldom from 0.8.3 to 0.8.6 (#5959) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.3...0.8.6) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump http-cache-semantics from 4.1.0 to 4.1.1 (#5669) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Extract test accounts to env vars (#5952) * make detox import SRP from accounts.js file. * extract account infos to env vars * update e2e instructions and add vars in .js.env template --------- Co-authored-by: Curtis <Curtis.David7@gmail.com> * improv: add workflow triggers for tags on release and QA (#5902) update notifications * [UPDATE] pin sonar action to commit (#5967) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * [UPDATE] sonar action configuration (#5972) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * bump the sonar checkout action version which will use compliant version of node * configure sonar analysis directors, test path, exclusions * added project & file configurations * remove test directory argument and added more exclusions * added more exclusions * added test inclusions and root directory for tests * Move `eth_sendTransaction` method handler to a separate module (#5968) * Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module. * fix: bundle video in app to prevent crash when not available (2nd attempt) (#5941) - bundle video with embedded the subtitles in app - add a readme in video folder to explain risks if video and subs files are moved or removed - add a shell script running ffmpeg to regenerate the video - remove useless constants and code related to remote SRP video resources. * Send to multisig address. (#5931) * Send to multisig address. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Linter fix. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Revert wdio changes Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * fixed iyarc format removed exclusions not needed, added exclusion for production value since the project is stilll maintained (#5978) * [IMPLEMENT] Use Terms Modal (#5242) * user terms modal builded * use terms modal logic implemented * small fix on translations * remove old terms and conditions * remove ts ignore * fix typo * create a MandatoryModal component * readme and update props to generic names * update snapshot * changing && to ternary operator for a more accurate ui rendering * added margin and added component to the storybook * implemented webview to show the ToU * scale font size * clean * fix snapshot * fix lint * analytics * modal mandatory more agnostic * Clean up styles and storybook * Clean up on accept logic * logic on util file termsOfUse * scrolling webview on Android and reusable modal not dismissable * Implemented option scroll needed on ModalMandatory * update source of use terms * fix import * remove margin bottom * english translation updated * fix button import * modal mandatory not dismissable * change icon name * use terms modal on android for existing users * ToU called only called on nav/app component * Revert "ToU called only called on nav/app component" This reverts commit 7f2e12f. * fix redirect on ToU modal to acessibility website * fix track ecent * E2e appium/5783 tou onboarding new app installs (#5951) * Webdriverio and Detox test scripts for Term of use feature. Test scripts updated to have the term of use steps * Small changes to fit browserstack * Remove static-logos.js file changes * move terms of use to before importing or create a new allet * Update Detox and wdio test scripts to be compatible with the recept term of use changes * Solve lint issues --------- Co-authored-by: Cal Leung <cleun007@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> * feat: add portfolio button to asset action buttons (#5785) * feat: add portfolio button to asset action buttons * Update app/components/UI/AccountOverview/index.js Co-authored-by: Cal Leung <cleun007@gmail.com> * chore: move portfolio url to AppConstants * chore: fix minor issues * chore: add event for portfolio link clicked * chore: add snapshot test update * chore: add translations * add new icon type name * chore: move portfolio button next to net worth * chore: add progress * fix: tab not updating properly * move styles to stylesheet * fix wallet index test * remove logs and actually fix wallet index test * re-open existing tab instead of new tab after browser is loaded * fix browser load, active tab not re-appearing bug --------- Co-authored-by: Cal Leung <cleun007@gmail.com> * dispaly nft info in browser (#5930) * Clear Hex data when Token Transfer reverts ETH (#5839) * clear hexdata when token updates to eth * native token transaction data set to 0x * use constants * Ignore e2e test artifacts (#5998) A `.gitignore` entry has been added for the `artifacts` directory that gets generated locally when a Detox iOS e2e test fails. * remove sonar config from actions that can be configured in the web portal (#6013) * [ENHANCEMENT] E2E Permission system tests (#5910) * detox permission system working. * fix lint * removing imported account steps. * update steps in feature files. * added constants for element locators and added new feature file * fix linting * update tests * fix linting * update test name * delete wallet on permission system flow. need to set better timeouts to deal with toast * remove redudant test steps. * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * fix browser path * update dapp * fix tests from merge conflict. * add long wait to terms of use modal to deal with flakiness on bitrise * remove redundant test * disabling the ToU test. * Fix 18 JS type errors for TSC to output 683 TS/TSX errors (#5975) * Fix 18 JS type errors exposing 683 TS/TSX errors Minimum required to tackle remaining errors in 120 files Follow-up to: #5879 Fix: #5878 Next: #5882 * Fix app/core/Engine.ts lint errors * Revert "Fix app/core/Engine.ts lint errors" This reverts commit 7ac7011. * Fix app/core/Engine.ts lint errors * Skip type checking library declaration files (#5882) Fix: #5881 * [FEATURE] SDK Session Persistence (#5948) * refactor: sdkconnect typescript rewrite and otp generation * feat: permission management with otp deeplinks * feat: modal ui for loading / feedback on sdk connection state * feat: remove sdk settings from experimental * feat: prevent empty title in transaction header * feat: add otp in account approval modal * feat: i18n on sdk feedback modal * chore: cleanup comments * chore: remove rememberme comments * feat: use default codefi server url * fix: missing otp actions * chore: remove sdk from experiment description * feat: mmsdk auto retrieve approved account on getProviderState * chore: simplify logic for easier code readability * feat: manage sdk backward compatibility * feat: auto validate permission on deeplink reconnection * fix: typo * fix: useeffect deps * feat: new styling of otp * chore: remove comments * feat: remove unnecessary view * feat: remove unnecessary view * chore: linting and typos * chore: more linting adjustments * fix: invalid json file * fix: update jest snapshot for accountoverview * chore: remove extra space * feat: remove plaintext option used to debug protocol * chore: remove unused text * feat: move modal from drawer to root navigation * feat: edit i18n values and remove unused text * chore: remove console logs * feat: use theme typography in createstyle * feat: use navigation instead of redux store to display loading state * feat: update snapshot after ui changes * chore: remove unused code + linting * fix: invalid typography * fix: rename for valid camelcase * chore: cleanup * chore: remove unused code * feat: consolidate action params within connect uri * feat: add do not remember channel option * feat: use useAssetFromTheme hook for loading modal * fix: linting * chore: remove console logs * feat: remove sdk modal references * feat: extract onconfirm action to component props * fix: prevent opening inappbrowser on connect deeplink * feat: update ui according to latest design file * feat: prevent invalid connection interruption when paused * feat: display sorted connection list * feat: send metamask wallet version to connected clients * feat: replace fontstyles with typography in account approval modal * chore: consolidate sdk constants to AppConstants * chore: formatting * fix: duplicated imports * build: update communication layer dep to 0.2.0 * chore: disable debug logs * chore: prevent linting error * chore: remove comm layer * chore: linting * feat: replace navigation.goback with sheetRef.hide * feat: remove fontSize when using typography * feat: use Icon library instead of fontawesome * feat: catchall title value * feat: catchall title value * Revert "Move `eth_sendTransaction` method handler to a separate module (#5968)" (#6021) This reverts commit 49a6305. * On-ramp: Add accessibility label to custom action images (#6016) * disable back press and add margin to the bottom for accept ToU modal (#6023) * On-ramp: Add #6009 strings (#6019) * [FEATURE] Account selector on swaps screen (#5997) * Account selector on swaps screen * remove unused import * update with comment and without justify content * update with previous selected address * add ellipsis to the account name if it is more than 13 chars * feat: add consensys zkevm (Linea) support (#5958) * feat: add consensys zkevm support * fix: change consensys zkevm network name to Linea + change rpc url * feat: add feature toggle for linea network * feat: add two utility functions for block explorer url * feat: add patches to support lineatestnet * fix: add linea testnet as rpc network * fix: updates imports * Fix merge conflicts from merging main * Fix trackEvents * Fix missing import * Fix for #5898 - Converting native ETH to fiat and fiat to native ETH results in wrong values beign displayed on the Amount screen (#5961) * use setState callback to call onInputChange Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * E2E for currency switch Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Lint fix Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Update snapshot Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com> Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> Co-authored-by: Matthew Epps <mepps32@gmail.com> Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> * Merge/6.2.0 merge from main (#6033) * Revert "[Merge] Fix merge conflicts with main (#6031)" This reverts commit ebd3e13. * Revert "[MERGE] Merge main into 6.2.0 (#6029)" This reverts commit 283fd0c. * Merge/6.2.0 conflicts (#6034) * Upgrade on-ramp-sdk to 1.9.0 (#5782) * Update 6.1.2 changelog (#5953) Update change log formatting and language * E2E Establish performance baseline (#5947) * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * add tags, create performance folder. * remove scenario chaining * change launch times * Verify Contract Details (#5327) * draft_token_allowance * code cleanup * fetch token address, nickname and image * rebased to main * styles should match design * toggle blockexplorer state, token image * validate address before saving * token symbols * implement feedback * updated snapshot * rebased to main * remove unused code * code cleanup * code rebase and clean * snapshot update * test_address rewrite * rebased to main * rebased to main, QA issue fix * QA issues fix * fix QA issues * update snapshot * rebased to main * updated to use the new network controller update * remove unneccessary fallbacks * INFRA-837: Add sonar integration (#5949) * INFRA-837: Add sonar integration * Update sonar branch * Vault corruption recovery flow (#4421) * Handle Vault Corruption - trigger vault recovery flow in Login when error occurs - fetch backup from vault and then reinitialize the engine with the backed up keyring - we also destroy the old engine - some local data might be lost but the accounts will be safe - on fail we get them to create/import a new wallet - translations * switch to nativeevent (#5960) * Added translations for MC 0.5 (#5964) * [FIX] Remove select address as a prop on App index.js (#5962) * Remove select address as a prop on App index.js * Update snapshot * Bump @xmldom/xmldom from 0.8.3 to 0.8.6 (#5959) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.3...0.8.6) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump http-cache-semantics from 4.1.0 to 4.1.1 (#5669) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Extract test accounts to env vars (#5952) * make detox import SRP from accounts.js file. * extract account infos to env vars * update e2e instructions and add vars in .js.env template --------- Co-authored-by: Curtis <Curtis.David7@gmail.com> * improv: add workflow triggers for tags on release and QA (#5902) update notifications * [UPDATE] pin sonar action to commit (#5967) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * [UPDATE] sonar action configuration (#5972) * pin the sonar action to a specific commit * format sonar file * remove extra line from file * bump the sonar checkout action version which will use compliant version of node * configure sonar analysis directors, test path, exclusions * added project & file configurations * remove test directory argument and added more exclusions * added more exclusions * added test inclusions and root directory for tests * Move `eth_sendTransaction` method handler to a separate module (#5968) * Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module. * fix: bundle video in app to prevent crash when not available (2nd attempt) (#5941) - bundle video with embedded the subtitles in app - add a readme in video folder to explain risks if video and subs files are moved or removed - add a shell script running ffmpeg to regenerate the video - remove useless constants and code related to remote SRP video resources. * Send to multisig address. (#5931) * Send to multisig address. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Linter fix. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Revert wdio changes Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * fixed iyarc format removed exclusions not needed, added exclusion for production value since the project is stilll maintained (#5978) * [IMPLEMENT] Use Terms Modal (#5242) * user terms modal builded * use terms modal logic implemented * small fix on translations * remove old terms and conditions * remove ts ignore * fix typo * create a MandatoryModal component * readme and update props to generic names * update snapshot * changing && to ternary operator for a more accurate ui rendering * added margin and added component to the storybook * implemented webview to show the ToU * scale font size * clean * fix snapshot * fix lint * analytics * modal mandatory more agnostic * Clean up styles and storybook * Clean up on accept logic * logic on util file termsOfUse * scrolling webview on Android and reusable modal not dismissable * Implemented option scroll needed on ModalMandatory * update source of use terms * fix import * remove margin bottom * english translation updated * fix button import * modal mandatory not dismissable * change icon name * use terms modal on android for existing users * ToU called only called on nav/app component * Revert "ToU called only called on nav/app component" This reverts commit 7f2e12f. * fix redirect on ToU modal to acessibility website * fix track ecent * E2e appium/5783 tou onboarding new app installs (#5951) * Webdriverio and Detox test scripts for Term of use feature. Test scripts updated to have the term of use steps * Small changes to fit browserstack * Remove static-logos.js file changes * move terms of use to before importing or create a new allet * Update Detox and wdio test scripts to be compatible with the recept term of use changes * Solve lint issues --------- Co-authored-by: Cal Leung <cleun007@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> * feat: add portfolio button to asset action buttons (#5785) * feat: add portfolio button to asset action buttons * Update app/components/UI/AccountOverview/index.js Co-authored-by: Cal Leung <cleun007@gmail.com> * chore: move portfolio url to AppConstants * chore: fix minor issues * chore: add event for portfolio link clicked * chore: add snapshot test update * chore: add translations * add new icon type name * chore: move portfolio button next to net worth * chore: add progress * fix: tab not updating properly * move styles to stylesheet * fix wallet index test * remove logs and actually fix wallet index test * re-open existing tab instead of new tab after browser is loaded * fix browser load, active tab not re-appearing bug --------- Co-authored-by: Cal Leung <cleun007@gmail.com> * dispaly nft info in browser (#5930) * Clear Hex data when Token Transfer reverts ETH (#5839) * clear hexdata when token updates to eth * native token transaction data set to 0x * use constants * Ignore e2e test artifacts (#5998) A `.gitignore` entry has been added for the `artifacts` directory that gets generated locally when a Detox iOS e2e test fails. * remove sonar config from actions that can be configured in the web portal (#6013) * [ENHANCEMENT] E2E Permission system tests (#5910) * detox permission system working. * fix lint * removing imported account steps. * update steps in feature files. * added constants for element locators and added new feature file * fix linting * update tests * fix linting * update test name * delete wallet on permission system flow. need to set better timeouts to deal with toast * remove redudant test steps. * set baseline time * fix step to dismiss keyboard and add console.log to spit out launch time to console. * fix browser path * update dapp * fix tests from merge conflict. * add long wait to terms of use modal to deal with flakiness on bitrise * remove redundant test * disabling the ToU test. * Fix 18 JS type errors for TSC to output 683 TS/TSX errors (#5975) * Fix 18 JS type errors exposing 683 TS/TSX errors Minimum required to tackle remaining errors in 120 files Follow-up to: #5879 Fix: #5878 Next: #5882 * Fix app/core/Engine.ts lint errors * Revert "Fix app/core/Engine.ts lint errors" This reverts commit 7ac7011. * Fix app/core/Engine.ts lint errors * Skip type checking library declaration files (#5882) Fix: #5881 * [FEATURE] SDK Session Persistence (#5948) * refactor: sdkconnect typescript rewrite and otp generation * feat: permission management with otp deeplinks * feat: modal ui for loading / feedback on sdk connection state * feat: remove sdk settings from experimental * feat: prevent empty title in transaction header * feat: add otp in account approval modal * feat: i18n on sdk feedback modal * chore: cleanup comments * chore: remove rememberme comments * feat: use default codefi server url * fix: missing otp actions * chore: remove sdk from experiment description * feat: mmsdk auto retrieve approved account on getProviderState * chore: simplify logic for easier code readability * feat: manage sdk backward compatibility * feat: auto validate permission on deeplink reconnection * fix: typo * fix: useeffect deps * feat: new styling of otp * chore: remove comments * feat: remove unnecessary view * feat: remove unnecessary view * chore: linting and typos * chore: more linting adjustments * fix: invalid json file * fix: update jest snapshot for accountoverview * chore: remove extra space * feat: remove plaintext option used to debug protocol * chore: remove unused text * feat: move modal from drawer to root navigation * feat: edit i18n values and remove unused text * chore: remove console logs * feat: use theme typography in createstyle * feat: use navigation instead of redux store to display loading state * feat: update snapshot after ui changes * chore: remove unused code + linting * fix: invalid typography * fix: rename for valid camelcase * chore: cleanup * chore: remove unused code * feat: consolidate action params within connect uri * feat: add do not remember channel option * feat: use useAssetFromTheme hook for loading modal * fix: linting * chore: remove console logs * feat: remove sdk modal references * feat: extract onconfirm action to component props * fix: prevent opening inappbrowser on connect deeplink * feat: update ui according to latest design file * feat: prevent invalid connection interruption when paused * feat: display sorted connection list * feat: send metamask wallet version to connected clients * feat: replace fontstyles with typography in account approval modal * chore: consolidate sdk constants to AppConstants * chore: formatting * fix: duplicated imports * build: update communication layer dep to 0.2.0 * chore: disable debug logs * chore: prevent linting error * chore: remove comm layer * chore: linting * feat: replace navigation.goback with sheetRef.hide * feat: remove fontSize when using typography * feat: use Icon library instead of fontawesome * feat: catchall title value * feat: catchall title value * Revert "Move `eth_sendTransaction` method handler to a separate module (#5968)" (#6021) This reverts commit 49a6305. * On-ramp: Add accessibility label to custom action images (#6016) * disable back press and add margin to the bottom for accept ToU modal (#6023) * On-ramp: Add #6009 strings (#6019) * [FEATURE] Account selector on swaps screen (#5997) * Account selector on swaps screen * remove unused import * update with comment and without justify content * update with previous selected address * add ellipsis to the account name if it is more than 13 chars * feat: add consensys zkevm (Linea) support (#5958) * feat: add consensys zkevm support * fix: change consensys zkevm network name to Linea + change rpc url * feat: add feature toggle for linea network * feat: add two utility functions for block explorer url * feat: add patches to support lineatestnet * fix: add linea testnet as rpc network * fix: updates imports * Fix for #5898 - Converting native ETH to fiat and fiat to native ETH results in wrong values beign displayed on the Amount screen (#5961) * use setState callback to call onInputChange Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * E2E for currency switch Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Lint fix Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Update snapshot Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> --------- Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> * Fix analytics --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com> Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> Co-authored-by: Matthew Epps <mepps32@gmail.com> Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> * resolved yarn lint errors --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com> Co-authored-by: Cal Leung <cleun007@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com> Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com> Co-authored-by: Matthew Epps <mepps32@gmail.com> Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier.
* Refactor `eth_sendTransaction` method handler The method handler for `eth_sendTransaction` has been moved to a separate module to simplify unit testing. Unit tests have been added as well. This module was written in TypeScript, which asked for some additional validation of the method parameters. We now throw a more explicit message when the params are missing, and when the transaction parameters are not an object. Previously the method would still throw an error in these scenarios, just with a less helpful message. The change in error message should be the only functional change here. This refactor is intended to make testing PR #5619 easier. * Support `.cjs` file extensions The Metro configuration has been updated to support `.cjs` file extensions. The `@metamask/utils` dependency relies upon the library `superstruct` which uses `.cjs` for its main exported module. * Move utils dependency to 'dependencies' * Inline functions from `@metamask/utils` The two functions taken from `@metamask/utils` have been inlined as a workaround to an error that gets thrown upon import on Android builds. I'm still actively investigating that failure, so hopefully we can replace these inlined functions soon.
94e092d
to
98c2f2d
Compare
I'm currently investigating iOS e2e test failures (they might be unrelated to these changes). This is still ready for review, particularly the unit tests, but I will update here when I have gotten the e2e tests working (it may require waiting for them to be fixed on |
a58f2df
to
9322d20
Compare
I have completed additional local testing and found that the dapp API works as expected. I guess the e2e test failures were unrelated to these changes. |
The handler for `eth_sendTransaction` was previously spread between `RPCMethodMiddleware.ts` and the static middleware of `web3-provider-engine`. Instead it is all handled in `RPCMethodMiddleware.ts` now. This should have no functional impact. It is difficult to trace through `web3-provider-engine`, but this case is one of the easier ones because the static middleware is run first, and in this case it will always end the request. This relates to #5513
9322d20
to
18bfcaf
Compare
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.
LGTM
Development & PR Process
release-xx
label to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-review
label when work is completedneeds-qa
label when dev review is completedQA Passed
label when QA has signed offDescription
The handler for
eth_sendTransaction
was previously spread betweenRPCMethodMiddleware.ts
and the static middleware ofweb3-provider-engine
. Instead it is all handled inRPCMethodMiddleware.ts
now.This should have no functional impact. It is difficult to trace through
web3-provider-engine
, but this case is one of the easier ones because the static middleware is run first, and in this case it will always end the request.Issue
This relates to #5513
Checklist