We would like to insert TypeScript into the ESLint configuration, and
because of the way that the current config is organized, that is not
easy to do.
Most files are assumed to be files that are suited for running in a
browser context. This isn't correct, as we should expect most files to
work in a Node context instead. This is because all browser-based files
will be run through a transpiler that is able to make use of
Node-specific variables anyway.
There are a couple of important ways we can categories files which our
ESLint config should be capable of handling well:
* Is the file a script or a module? In other words, does the file run
procedurally or is the file intended to be brought into an existing
file?
* If the file is a module, does it use the CommonJS syntax (`require()`)
or does it use the ES syntax (`import`/`export`)?
When we introduce TypeScript, this set of questions will become:
* Is the file a script or a module?
* If the file is a module, is it a JavaScript module or a TypeScript
module?
* If the file is a JavaScript module, does it use the CommonJS syntax
(`require()`) or does it use the ES syntax (`import`/`export`)?
To represent these divisions, this commit removes global rules — so now
all of the rules are kept in `overrides` for explicitness — and sets up
rules for CommonJS- and ES-module-compatible files that intentionally do
not overlap with each other. This way TypeScript (which has its own set
of rules independent from JavaScript and therefore shouldn't overlap
with the other rules either) can be easily added later.
Finally, this commit splits up the ESLint config into separate files and
adds documentation to each section. This way sets of rules which are
connected to a particular plugin (`jsdoc`, `@babel`, etc.) can be easily
understood instead of being obscured.
* Add design-tokens and apply colors to button
* swap more colors
* tweak button and add dark theme switch to storybook
* tweak buttons
* fix typo
* remove comments
* add dep to ignored list
* fix linting issue
* fix linting issues
* Updating some styles and removing some deprecated buttons (#13742)
* Updating some styles and removing some deprecated buttons
* Warning button fixes
* Fixing warning text for darkmode
* bump design tokens and update storybook theme strategy
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"
* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote
* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"
* Fix: Unable to find value of key "undefined" for locale
* Use array destructuring
* Draft methods to brak updateTransaction into smaller more targeted
methods.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* normalize and validate tx params.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Method to normalize tx and check if it's unapproved.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Move the methods to controllers/transactions/index.js
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Flesh out the methods to update transaction with custom notes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* enforce that only the properties for the specific methid can be updated via the method.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Rename calls to check transaction status.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Test update gas fees
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Test update estimated base fee
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Update swap approval transaction
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* use lodash to remove undefined properties
update swap transaction tests
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Updates transaction user settings.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Remove commented log lines
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Add more parameters to updateSwapTransaction
approvalTxId
estimatedBaseFee
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix documentation for updateSwapTransaction
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Add Update Transaction Metrics
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Update transaction gas fees actions.js
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Update EIP 1559 Params.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint Fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Documentations.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Remove metrics from this PR
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint fixes: Removed unused variables
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Add more params to updateTransactionGasFees.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Update eip1559 method to editableParams.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix Mocha tests
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* add gasPrice to updateEditableParams
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Remove duplicated Params in notes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* A few more tests to cover if
transaction status is not unapproved
transaction is passed more parameters than it requires.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"
* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote
* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"
* Fix: Unable to find value of key "undefined" for locale
* Use array destructuring
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"
* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote
* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"
* Fix: Unable to find value of key "undefined" for locale
* Use array destructuring
This is a pure refactor that extracts the SRP input from the
`CreateNewVault` component. This is intended to make future changes to
the SRP input easier, and to reduce duplication between the old and new
onboarding flows.
Extensive unit tests have been added for the new SRP input component.
A new test library was added (`@testing-library/user-event`) for
simulating user events with components rendered using the
`@testing-library` library.
A new helper method has been added (`renderWithLocalization`) for
rendering components using `@testing-library` with just our
localization contexts added as a wrapper. The localization contexts
were already added by the `renderWithProviders` helper function, but
there is no need for a Redux provider in these unit tests.
* Secure you wallet page
* Remove seedPhraseIntroSidebarBulletThree from messages.json
* Change the second bullet from Figma design
* Requested review changes
* Installing design tokens and writing docs in storybook
* Adding design-tokens to dep check ignore
* Link updates, Sentence casing, better css code formatting, other grammer fixes
* fix error with color variable - fix rebase
* clean list search & fuse threshold decreased
* update search-icon , fix tests
* nice to have highlighting text & cleaning
* unit test on settings & search input ui up on expanded view
* fix color variable in alert scss
* setting search input padding right up
* fix dom warning
* util/search test added & Dom element warning fix
* renaming files
* fix color text in settings search
* settings search highlight text refacto & fix ui
* fix settings-search test & renaming
* Fix styling on search field for edge cases, update components and e2e
E2E tests update for search feature
Update components from class to functional component
#
Fix storybook for search box
Fix styling
Fix unit tests
fix: remove z-index
Fix unit tests
Co-authored-by: amerkadicE <amer.kadic@endava.com>