1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

330 Commits

Author SHA1 Message Date
Whymarrh Whitby
8dd886a25b
Update tx:dropped return value in PendingTxTracker (#8397) 2020-04-26 00:03:25 -02:30
Whymarrh Whitby
91a75b2417
Add new PendingTransactionTracker tests (#8384)
Co-authored-by: Jenny Pollack <jennypollack3@gmail.com>
2020-04-23 13:19:04 -02:30
Whymarrh Whitby
deacde615f
Rename _checkIfTxWasDropped (#8378) 2020-04-22 17:03:59 -02:30
Whymarrh Whitby
f2f70342e2
Skip adding history entry for empty txMeta diffs (#8379) 2020-04-22 11:09:16 +08:00
Whymarrh Whitby
d908102636
Update tx utils JSDoc comments (#8372)
Co-authored-by: Jenny Pollack <jennypollack3@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-04-20 16:42:24 -02:30
Whymarrh Whitby
9d535b949f
Rename recipientBlacklistChecker function (#8365) 2020-04-20 16:29:41 -02:30
Whymarrh Whitby
164923acd1
Export individual fns from tx-state-history-helpers (#8370) 2020-04-20 13:00:51 -02:30
Whymarrh Whitby
a83d26486c
Snapshot txMeta without cloning history (#8363) 2020-04-20 12:26:01 -02:30
Whymarrh Whitby
7c3ffeb841
Export blacklist direct from recipient-blacklist (#8364) 2020-04-20 12:06:02 -02:30
Erik Marks
5263395add
Fix background console errors on pending transaction (#8351)
* fix background console error on pending transaction
2020-04-17 09:53:46 -07:00
Mark Stacey
61fdb56864
Use specified gas limit when speeding up a transaction (#8178)
The sidebar used to speed up a transaction while it's pending or after
it has failed currently allows editing the gas limit, but that new
limit is ignored. This is especially problematic for transactions that
failed due to a low gas limit, as the problem becomes impossible to fix
by retrying.

The gas limit specified by the user is now used in the speed up
transaction.

Fixes #8156
Fixes #7977
2020-03-12 11:33:11 -03:00
Erik Marks
2df8b85c5f
LoginPerSite: Support multiple accounts without automatic switching (#8079)
* transaction editing: use txParams 'from' account

* signature-request: use txParams 'from' account

* signature-request-original: use txParams 'from' account

* encryption/decryption: use txParams 'from' account

* update tests

* set 'send' state 'from' address in confirm containers
2020-03-06 13:34:56 -08:00
Whymarrh Whitby
da0300d3b1 Enable core ESLint no-mixed-operators rule 2020-02-17 21:06:36 -03:30
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Mark Stacey
398a45bfdd
Replace clone dependency with cloneDeep from lodash (#7926)
This was done to reduce the number of direct dependencies we have. It
should be functionally equivalent. The bundle size should not change,
as we use `clone` as a transitive dependency in a number of places.
2020-01-29 13:14:33 -04:00
Whymarrh Whitby
25fe4adaa7 Remove usages of xtend from the background scripts (#7796) 2020-01-13 08:59:36 -10:00
Mark Stacey
ac01c5c89a
Consistent jsdoc syntax (#7755)
* Specify type before parameter name

Various JSDoc `@param` entries were specified as `name {type}` rather
than `{type} name`.

A couple of `@return` entries have been given types as well.

* Use JSDoc optional syntax rather than Closure syntax

* Use @returns rather than @return

* Use consistent built-in type capitalization

Primitive types are lower-case, and Object is upper-case.

* Separate param/return description with a dash
2020-01-13 14:36:36 -04:00
Whymarrh Whitby
92971d3c87
Migrate codebase to use ESM (#7730)
* Update eslint-plugin-import version

* Convert JS files to use ESM

* Update ESLint rules to check imports

* Fix test:unit:global command env

* Cleanup mock-dev script
2020-01-09 00:04:58 -03:30
Whymarrh Whitby
6c1bce28ac
Fix a few instances of signature mismatches (#7704)
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-12-16 19:54:52 -03:30
Frankie
71a89df8ee
transactions/pending - buffer 3 blocks before dropping a tx (#7483)
* transactions/pending - buffer 3 blocks before dropping a tx

* transactions/pending - only increment for dropped txs
2019-12-05 09:34:10 -10:00
Dan Finlay
30304913eb
Merge pull request #7591 from whymarrh/eslint-object-curly-spacing
Enable object-curly-spacing rule for ESLint
2019-12-04 10:25:32 -08:00
Dan Finlay
6aa0bec751
Merge pull request #7573 from whymarrh/eslint-no-confusing-arrow
Enable no-confusing-arrow rule for ESLint
2019-12-04 10:23:57 -08:00
Whymarrh Whitby
274a9ecf53 yarn lint --fix 2019-12-03 17:20:55 -03:30
Dan Finlay
f519fa1ed3
Connect distinct accounts per site (#7004)
* add PermissionsController

remove provider approval controller
integrate rpc-cap
create PermissionsController
move provider approval functionality to permissions controller
add permissions approval ui, settings page
add permissions activity and history
move some functionality to metamask-inpage-provider
rename siteMetadata -> domainMetadata

add accountsChange notification to inpage provider
move functionality to inpage provider
update inpage provider
Remove 'Connections' settings page (#7369)
add hooks for exposing accounts in settings
rename unused messages in non-English locales

Add external extension id to metadata (#7396)

update inpage provider, rpc-cap
add eth_requestAccounts handling to background
prevent notifying connections if extension is locked
update inpage provider
Fix lint errors
add migration
review fixes
transaction controller review updates
removed unused messages

* Login Per Site UI (#7368)

* LoginPerSite original UI changes to keep

* First commit

* Get necessary connected tab info for redirect and icon display for permissioned sites

* Fix up designs and add missing features

* Some lint fixes

* More lint fixes

* Ensures the tx controller + tx-state-manager orders transactions in the order they are received

* Code cleanup for LoginPerSite-ui

* Update e2e tests to use new connection flow

* Fix display of connect screen and app header after login when connect request present

* Update metamask-responsive-ui.spec for new item in accounts dropdown

* Fix approve container by replacing approvedOrigins with domainMetaData

* Adds test/e2e/permissions.spec.js

* Correctly handle cancellation of a permissions request

* Redirect to home after disconnecting all sites / cancelling all permissions

* Fix display of site icons in menu

* Fix height of permissions page container

* Remove unused locale messages

* Set default values for openExternalTabs and tabIdOrigins in account-menu.container

* More code cleanup for LoginPerSite-ui

* Use extensions api to close tab in permissions-connect

* Remove unnecessary change in domIsReady() in contentscript

* Remove unnecessary private function markers and class methods (for background tab info) in metamask-controller.

* Adds getOriginOfCurrentTab selector

* Adds IconWithFallback component and substitutes for appropriate cases

* Add and utilize font mixins

* Remove unused  method in disconnect-all.container.js

* Simplify buttonSizeLarge code in page-container-footer.component.js

* Add and utilize getAccountsWithLabels selector

* Remove console.log in ui/app/store/actions.js

* Change last connected time format to yyyy-M-d

* Fix css associated with IconWithFallback change

* Ensure tracked openNonMetamaskTabsIDs are correctly set to inactive on tab changes

* Code cleanup for LoginPerSite-ui

* Use reusable function for modifying openNonMetamaskTabsIDs in background.js

* Enables automatic switching to connected account when connected domain is open

* Prevent exploit of tabIdOriginMap in background.js

* Remove unneeded code from contentscript.js

* Simplify current tab origin and window opener logic using remotePort listener tabs.queryTabs

* Design and styling fixes for LoginPerSite-ui

* Fix permissionHistory and permission logging for eth_requestAccounts and eth_accounts

* Front end changes to support display of lastConnected time in connected and permissions screens

* Fix lint errors

* Refactor structure of permissionsHistory

* Fix default values and object modifications for domain and permissionsHistory related data

* Fix connecting to new accounts from modal

* Replace retweet.svg with connect-white.svg

* Fix signature-request.spec

* Update metamask-inpage-provider version

* Fix permissions e2e tests

* Remove unneeded delay from test/e2e/signature-request.spec.js

* Add delay before attempting to retrieve network id in dapp in ethereum-on=.spec

* Use requestAccountTabIds strategy for determining tab id that opened a given window

* Improve default values for permissions requests

* Add some message descriptions to app/_locales/en/messages.json

* Code clean up in permission controller

* Stopped deep cloning object in mapObjectValues

* Bump metamask-inpage-provider version

* Add missing description in app/_locales/en/messages.json

* Return promises from queryTabs and switchToTab of extension.js

* Remove unused getAllPermissions function

* Use default props in icon-with-fallback.component.js

* Stop passing  to permissions controller

* Delete no longer used clear-approved-origins modal code

* Remove duplicate imports in ui/app/components/app/index.scss

* Use URL instead of regex in getOriginFromUrl()

* Add runtime error checking to platform, promise based extension.tab methods

* Support permission requests from external extensions

* Improve font size and colour of the domain origin on the permission confirmation screen

* Add support for toggling permissions

* Ensure getRenderablePermissionsDomains only returns domains with exposedAccount caveat permissions

* Remove unused code from LoginPerSite-ui branch

* Ensure modal closes on Enter press for new-account-modal.component.js

* Lint fix

* fixup! Login Per Site UI (#7368)

* Some code cleanup for LoginPerSite

* Adds UX for connecting to dapps via the connected sites screen (#7593)

* Adds UX for connecting to dapps via the connected sites screen

* Use openMetaMaskTabIds from background.js to determine if current active tab is MetaMask

* Delete unused permissions controller methods

* Fixes two small bugs in the LoginPerSite ui (#7595)

* Restore `providerRequest` message translations (#7600)

This message was removed, but it was replaced with a very similar
message called `likeToConnect`. The only difference is that the new
message has "MetaMask" in it. Preserving these messages without
"MetaMask" is probably better than deleting them, so these messages
have all been restored and renamed to `likeToConnect`.

* Login per site no sitemetadata fix (#7610)

* Support connected sites for which we have no site metadata.

* Change property containing subtitle info often populated by origin to a more accurate of purpose name

* Lint fix

* Improve disconnection modal messages (#7612)

* Improve disconnectAccountModalDescription and disconnectAllModalDescription messages

* Update disconnectAccountModalDescription app/_locales/en/messages.json

Co-Authored-By: Mark Stacey <markjstacey@gmail.com>

* Improve disconnectAccount modal message clarity

* Adds cancel button to the account selection screen of the permissions request flow (#7613)

* Fix eth_accounts permission language & selectability (#7614)

* fix eth_accounts language & selectability

* fix MetaMask capitalization in all messages

* Close sidebar when opening connected sites (#7611)

The 'Connected Sites' button in the accounts details now closes the
sidebar, if it is open. This was accomplished by pulling the click
handler for that button up to the wallet view component, where another
button already followed a similar pattern of closing the sidebar.

It seemed confusing to me that one handler was in the `AccountsDetails`
container component, and one was handed down from above, so I added
PropTypes to the container component.

I'm not sure that the WalletView component is the best place for this
logic, but I've put it there for now to be consistent with the add
token button.

* Reject permissions request upon tab close (#7618)

Permissions requests are now rejected when the page is closed. This
only applies to the full-screen view, as that is the view permission
requests should be handled in. The case where the user deals with the
request through a different view is handled in #7617

* Handle tab update failure (#7619)

`extension.tabs.update` can sometimes fail if the user interacts with
the tabs directly around the same time. The redirect flow has been
updated to ensure that the permissions tab is still closed in that
case. The user is on their own to find the dapp tab again in that case.

* Login per site tab popup fixes (#7617)

* Handle redirect in response to state update in permissions-connect

* Ensure origin is available to permissions-connect subcomponents during redirect

* Hide app bar whenever on redirect route

* Improvements to handling of redirects in permissions-connect

* Ensure permission request id change handling only happens when page is not null

* Lint fix

* Decouple confirm transaction screen from the selected address (#7622)

* Avoid race condtion that could prevent contextual account switching (#7623)

There was a race condition in the logic responsible for switching the
selected account based upon the active tab. It was asynchronously
querying the active tab, then assuming it had been retrieved later.

The active tab info itself was already in the redux store in another
spot, one that is guaranteed to be set before the UI renders. The
race condition was avoided by deleting the duplicate state, and using
the other active tab state.

* Only redirect back to dapp if current tab is active (#7621)

The "redirect back to dapp" behaviour can be disruptive when the
permissions connect tab is not active. The purpose of the redirect was
to maintain context between the dapp and the permissions request, but
if the user has already moved to another tab, that no longer applies.

* Fix JSX style lint errors

* Remove unused state
2019-12-03 09:35:56 -08:00
Whymarrh Whitby
16e6103a68 yarn lint --fix 2019-12-03 13:23:13 -03:30
Dan J Miller
724bd42e2c
Ensures the tx controller + state-manager orders transactions as received (#7484)
* Ensures the tx controller + tx-state-manager orders transactions in the order they are received

* Handle transaction ordering in cases where tx ids are off by more than 1 in tx-state-manager

* Add comment to addUnapprovedTransaction explaining calling _determineTransactionCategory after generateTxMeta

* Sort txes by timestamp of creation instead of id
2019-11-27 09:28:03 -03:30
Whymarrh Whitby
aa41057628
Update ESLint rules for curly braces style (#7477)
* eslint: Enable curly and brace-style

* yarn lint --fix
2019-11-19 20:33:20 -03:30
Frankie
514be408f8
I#6704 eth_getTransactionByHash will now check metamask's local history for pending transactions (#7327)
* tests - create tests for pending middlewares

* transactions - add r,s,v values to the txMeta to match the JSON rpc response

* network - add new middleware for eth_getTransactionByHash that the checks pending tx's for a response value

* transactions/pending - use getTransactionReceipt for checking if tx is in a block

* meta - file rename
2019-10-30 12:15:54 -10:00
Frankie
51e5220d5e
I#3669 ignore known transactions on first broadcast and continue with normal flow (#7328)
* transactions - ignore known tx errors

* tests - test ignoreing Transaction Failed: known transaction message
2019-10-30 11:40:33 -10:00
Dan J Miller
38df64783d Ensure correct tx category when sending to contracts without tx data (#7252)
* Ensure correct transaction category when sending to contracts but there is no txParams data

* Update gas when pasting address in send

* Gracefully fall back is send.util/estimateGas when blockGasLimit from background is falsy

* Remove network request frontend fallback for blockGasLimit

* Add some needed slow downs to e2e tests
2019-10-08 04:29:37 +09:00
ricky
5f254f7325 Add advanced setting to enable editing nonce on confirmation screens (#7089)
* Add UseNonce toggle

* Get the toggle actually working and dispatching

* Display nonce field on confirmation page

* Remove console.log

* Add placeholder

* Set customNonceValue

* Add nonce key/value to txParams

* remove customNonceValue from component state

* Use translation file and existing CSS class

* Use existing TextField component

* Remove console.log

* Fix lint nits

* Okay this sorta works?

* Move nonce toggle to advanced tab

* Set min to 0

* Wrap value in Number()

* Add customNonceMap

* Update custom nonce translation

* Update styles

* Reset CustomNonce

* Fix lint

* Get tests passing

* Add customNonceValue to defaults

* Fix test

* Fix comments

* Update tests

* Use camel case

* Ensure custom nonce can only be whole number

* Correct font size for custom nonce input

* UX improvements for custom nonce feature

* Fix advanced-tab-component tests for custom nonce changes

* Update title of nonce toggle in settings

* Remove unused locale message

* Cast custom nonce to string in confirm-transaction-base.component

* Handle string conversion and invalid values for custom nonces in handler

* Don't call getNonceLock in tx controller if there is a custom nonce

* Set nonce details for cases where nonce is customized

* Fix incorrectly use value for deciding whether to getnoncelock in approveTransaction

* Default nonceLock to empty object in approveTransaction

* Reapply use on nonceLock in cases where customNonceValue in approveTransaction.

* Show warning message if custom nonce is higher than MetaMask's next nonce

* Fix e2e test failure caused by custom nonce and 3box toggle conflict

* Update nonce warning message to include the suggested nonce

* Handle nextNonce comparison and update logic in lifecycle

* Default nonce field to suggested nonce

* Clear custom nonce on reject or confirm

* Fix bug where nonces are not shown in tx list on self sent transactions

* Ensure custom nonce is reset after tx is created in background

* Convert customNonceValue to number in approve tranasction controller

* Lint fix

* Call getNextNonce after updating custom nonce
2019-09-27 00:30:36 -04:00
Erik Marks
58c5fe01bf use eth-json-rpc-errors 2019-09-18 19:17:31 -07:00
Frankie
f6d25357db
transactions:tx-state-manager - optionally take a function as a search param (#7078) 2019-08-29 14:57:28 +02:00
Whymarrh Whitby
4d88e1cf86 Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint

* yarn run lint:fix
2019-07-31 10:17:11 -10:00
Dan Finlay
aea54d1b86
Address resubmit bug (#6886)
* Add some notes

* Add explanatory comment and TODO

* Typo

* Improve verbage

* Remove contextual comment
2019-07-18 20:37:51 -07:00
Akshit Kr Nagpal
d16d6f483c Validate txParams in TransactionStateManager.addTx (#6713)
* Normalize and Validate txParams in TransactionStateManager.addTx too

* Added Tests

* Updated normalizeAndValidateParams to return the new txParams
2019-06-29 00:51:51 +02:00
frankiebee
5cf5359e78 transactions - always hexprefix txParams on update; fixes #6724 2019-06-19 14:36:24 +02:00
Frankie
2b5c7b82a9
transactions/deps - use broken out nonce-tracker module (#6555) 2019-05-21 17:17:09 +02:00
Frankie
a34103987a
drop transactions who's nonce is lower then the known network nonce but were not included in a block (#6388)
* transactions/pending - check nonce against the network and mark as dropped if not included in a block

* transactions/pending - unifiy "dropped" txs

* transactions/pending - test - fix for new expected behavior

* fix comment

* transactions/pending - clean up dropped event

* fix spelling

Co-Authored-By: frankiebee <frankie.diamond@gmail.com>

* nit fix

* test/tx-pending - clarify test description
2019-05-16 07:36:53 +02:00
Dan J Miller
b81c4e5c98 Set a default value for code in _determineTransactionCategory (#6604)
* Set a default value for code in _determineTransactionCategory

* Adds e2e tests that fail when token txs without gas param are not properly handled.

* Adds unit tests for _determineTransactionCategory

* Base error throwing and simple gas setting in estimateTxGas on transactionCategory
2019-05-14 14:14:07 -04:00
Whymarrh Whitby
094e4cf555 Check for unused function arguments (#6583)
* eslint: Check for unused function arguments

* eslint: Ignore unused '_' in argument list

Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly

* Remove and rename unused arguments
2019-05-08 15:51:33 -04:00
Dan J Miller
ef8a07c2ce
Adds a transactionCategory to txMeta for use in UI (#6567)
* Adds a transactionCategory to txMeta for use in UI

* Update transaction controller and tx-gas-util documentation on new code param in multiple functions.
2019-05-08 16:48:33 -02:30
Chi Kei Chan
31175625b4 Folder restructure (#6304)
* Remove ui/app/keychains/

* Remove ui/app/img/ (unused images)

* Move conversion-util to helpers/utils/

* Move token-util to helpers/utils/

* Move /helpers/*.js inside /helpers/utils/

* Move util tests inside /helpers/utils/

* Renameand move confirm-transaction/util.js to helpers/utils/

* Move higher-order-components to helpers/higher-order-components/

* Move infura-conversion.json to helpers/constants/

* Move all utility functions to helpers/utils/

* Move pages directory to top-level

* Move all constants to helpers/constants/

* Move metametrics inside helpers/

* Move app and root inside pages/

* Move routes inside helpers/

* Re-organize ducks/

* Move reducers to ducks/

* Move selectors inside selectors/

* Move test out of test folder

* Move action, reducer, store inside store/

* Move ui components inside ui/

* Move UI components inside ui/

* Move connected components inside components/app/

* Move i18n-helper inside helpers/

* Fix unit tests

* Fix unit test

* Move pages components

* Rename routes component

* Move reducers to ducks/index

* Fix bad path in unit test
2019-03-21 20:33:30 -02:30
Frankie
b5d6452454
Disallow loading as metamaskNetworkId (#5924)
* transactions - throw an error if a transaction is generated while the network is loading

* add tests for failing when netId is loading
2018-12-13 09:14:46 -10:00
Alexander Tseung
d8ab9cc002
Group transactions by nonce (#5886) 2018-12-09 12:48:06 -08:00
Dan Miller
9b9a2cc2e0 Adds createSpeedUpTransaction to txController 2018-12-04 00:06:05 -03:30
Dan Finlay
c7233e2cc7
Fixed Vivek's bug (#5860)
* Fixed Vivek's bug

Fixes #5850

What was happening:

It seems that his MetaMask had crashed while some new transactions had
been loading defaults. He probably had a network connectivity issue to
Infura (which we are working with Infura to address).

As a result of this network cutout, his three unapproved transactions
were not marked failed, and were not marked as `loadingDefaults =
false`, as their gas prices had not yet been estimated.

Normally this behavior is supposed to clean itself up when the
transaction controller starts up, via the
`TransactionController._onBootCleanUp()` function, but in this case,
during unlock, that function was unable to do its job because when it
requested the transaction list, the current network was in the `loading`
state, making it proceed as if there were no pending transactions.

To fix this, I am doing two things:
- Setting transactions to loadingDefaults = false in more catch blocks.
- Calling `onBootCleanUp()` when the network store's status changes, so
that it will re-trigger when loading completes.

* Fixed reference

* Fixed infinite loop bug

Was refreshing the tx list on every tx state change instead of just
network changes, creating an infinite loop.

* Add notes to tx updates to clarify logs
2018-11-29 16:08:03 -08:00
Frankie
a803522a92 transactions/tx-gas-utils - add the acctual response for eth_getCode for NO_CONTRACT_ERROR's && add a debug object to simulationFailed (#5840) 2018-11-29 10:07:05 -08:00
Frankie
8198ec9ae1
Autofill gasPrice for retry attempts with either the recommended gasprice or a %10 bump (#5786)
* transactions - autofill gasPrice for retry attempts with either the recomened gasprice or a %10 bump

* lint
2018-11-26 09:29:14 -10:00
Frankie
97c1e6bcc1
transactions - ensure err is defined when setting tx failed (#5801) 2018-11-26 09:00:58 -10:00
Whymarrh Whitby
1988e1e96b ESLint fixes (#5775)
* eslint . --fix

* Upgrade all ESLint warnings to errors
2018-11-16 14:54:55 -10:00
Frankie
ce147bf6d8 Tx controller now uses safe event emitter (#5769)
* transactions - use safe-event-emitter over events

* tests - pass a platform object on init with a noop showTransactionNotification

* test - fix for tx-state-history-helper trying to reduce an empty array

* deps - safe-event-emitter

* lint
2018-11-16 10:34:08 -08:00
Dan Finlay
22ba0b0c2d Resubmit approved transactions on new block (#5752)
* Add beginning of test

* Resubmit approved transactions on new block

May fix #4343 and related issues, where an error could leave
transactions stranded in the approved state.

* Remove unused test

* Re-approve transactions when retrying approved

* Add retry approved test

* Include approved in pending tx count

* Fix getPendingTxs()

* Linted

* Only throw hash error in submitted state

* Only check submitted txs for block inclusion

* Fix test expectations
2018-11-14 11:34:07 -10:00
kumavis
31e5cad1e3 tx-gas-util - set error message when invalidating tx based on tx data but no contract code 2018-10-21 01:01:21 -04:00
kumavis
3b46478024
Merge branch 'develop' into develop 2018-10-20 23:48:10 -04:00
Alexander Tseung
c821a8354c
Add txReceipt data to transaction details (#5513) 2018-10-16 06:00:47 +08:00
Whymarrh Whitby
af43b7d6c9 Ensure that new transactions added are using the selected address 2018-10-10 16:16:20 -02:30
Whymarrh Whitby
428a7cacdf Revert "transactions - add txReceipt to the txMeta body for confirmed txs (#5375)"
This reverts commit ff67293a8e.
2018-10-10 15:30:12 -02:30
Frankie
ff67293a8e transactions - add txReceipt to the txMeta body for confirmed txs (#5375) 2018-10-10 10:26:38 -04:00
kumavis
600f755dbf
tx-gas-utils - improve format + comments 2018-10-09 23:17:05 -04:00
Howard Braham
4cc0b1ef01 ganache-core merged my PR, so I changed some comments to clarify that ganache-core v2.2.1 and below will return the non-standard '0x0' 2018-10-09 15:31:25 -07:00
Howard Braham
222e62d7f1 Bug Fix: #1789 and #4525 eth.getCode() with no contract 2018-10-09 15:31:25 -07:00
Dan Finlay
507397f6c3 Fix updating of pending transactions
Transaction statuses were not being properly updated when:

- MetaMask was unlocked
- The network was changed

This PR fixes both of those. Fixes #5174
2018-10-05 10:35:14 -07:00
Alexander Tseung
5a6c333506 Switch existing modals from using Notification to Modal. Remove Notification component. Add CancelTransaction modal 2018-09-19 14:31:10 -07:00
Frankie
1552fe1c3e
Merge pull request #5216 from MetaMask/tx-cancel
Add createCancelTransaction method
2018-09-10 13:29:29 -10:00
Alexander Tseung
43de189d06 Add createCancelTransaction method 2018-09-10 12:48:01 -07:00
Whymarrh Whitby
7c3b69e1e4 Attach the RPC error value to txMeta 2018-09-08 19:59:50 -02:30
Thomas Huang
024ebe07e0 Merge branch 'develop' into network-remove-provider-engine-tests 2018-08-01 10:40:31 -07:00
Thomas
138858647e Merge branch 'develop' into network-remove-provider-engine 2018-07-25 22:38:44 -07:00
Jenny Pollack
00bae74475 tx-gas-utils - catch all errors from gas estimation 2018-07-24 14:16:37 -07:00
Thomas Huang
5a45df72c6
Merge pull request #4669 from MetaMask/removeNonceTrackerFunction
Remove unsued nonce tracker function
2018-07-12 11:48:05 -07:00
Thomas
5188b727d4 Merge branch 'develop' into removeNonceTrackerFunction 2018-07-10 11:34:00 -07:00
frankiebee
28c509914b Merge branch 'develop' of https://github.com/MetaMask/metamask-extension into i#3896 2018-07-10 11:32:05 -07:00
kumavis
77daed5c74 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-07-03 12:42:14 -07:00
brunobar79
a8f745f9fe eslint --fix . 2018-07-02 18:49:33 -04:00
kumavis
a89902c170 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-07-02 13:54:05 -07:00
frankiebee
9b92ba4c47 trandsactions - remove rejected transactions from history 2018-06-25 15:07:54 -07:00
tmashuang
dd18684a5d Remove unsued nonce tracker function 2018-06-25 15:01:14 -07:00
kumavis
33cb0a8cb2 lint - fix recipient-blacklist.js 2018-06-15 11:07:56 -07:00
kumavis
83c02f90cf blacklist - recipient blacklist as js for inline comments 2018-06-15 10:47:42 -07:00
kumavis
753743e746
Update recipient-blacklist-config.json 2018-06-15 10:32:09 -07:00
Dan Finlay
a42299aab7
Add apparent phishing address to block list
In [this reddit post](https://www.reddit.com/r/Metamask/comments/8r3nsu/help_me_please_somebody_stole_my_ethers/) a user suggests they got some ether stolen after visiting IDEX. Their ether was sent to [this address](https://etherscan.io/address/0x9bcb0a9d99d815bb87ee3191b1399b1bcc46dc77), which is full of comments of people telling similar stories of being phished on IDEX. I think we can safely block this, and probably safe some people some money.
2018-06-15 08:55:39 -07:00
kumavis
604289c96c controllers - transaction - prefer log over console 2018-06-12 12:08:06 -07:00
kumavis
177cc3f280 metamask - ensure all nonce locks are released 2018-06-12 11:51:35 -07:00
kumavis
8f93e34175 nonce-tracker - wrap nonce calculations in try-catch and release lock on error 2018-06-12 11:31:26 -07:00
kumavis
c86f935889 nonce-tracker - wrap nonce calculations in try-catch and release lock on error 2018-06-12 10:55:54 -07:00
kumavis
2198276bd5 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-06-06 12:05:38 -07:00
kumavis
9d77b0a196 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-06-06 11:08:29 -07:00
Csaba Solya
1dda0c6469 remove generating blocked accounts and use a config file instead 2018-05-30 21:15:59 +02:00
Csaba Solya
3e489ea165 fix documentation 2018-05-30 17:42:41 +02:00
Csaba Solya
cf73581c0e adding tests for recipient blacklist checker 2018-05-30 17:38:27 +02:00
Csaba Solya
6affd8f949 adding transaction controller tests 2018-05-30 16:24:40 +02:00
Csaba Solya
afb5788861 initial implementation 2018-05-30 15:53:18 +02:00
kumavis
4205d92729 Merge branch 'master' of github.com:MetaMask/metamask-extension into merge-master 2018-05-29 16:12:36 -07:00
kumavis
58de5671cc controllers - transactions - fix tx status update on boot 2018-05-29 00:53:44 -07:00
kumavis
16d0db15e0 controllers - transactions - fix tx confirmation 2018-05-29 00:41:28 -07:00
kumavis
1b3fedd10d controllers - transaction - pending-tx-tracker - lint fix 2018-05-28 15:54:47 -07:00
kumavis
5be154ea20 controllers - transactions - merge @frankiebee's work with mine 2018-05-28 14:29:31 -07:00
Anton
71a6e97327 cleanErrorStack moved to separate library module
more errors traces cleaned up
2018-05-28 22:57:08 +02:00
Anton
1d23a5c81b error message fix 2018-05-28 18:08:33 +02:00
Anton
62dc6e20eb Clean up user rejection error message 2018-05-28 17:57:45 +02:00
kumavis
9f8d5f0547 controllers - transactions - pending-tx-tracker - _getBlock - poll until block is truthy 2018-05-25 13:30:26 -07:00
kumavis
61ef4f1f29 tx-gas-utils - query for block without tx bodies 2018-05-25 13:21:42 -07:00
frankiebee
61caee9d94 Merge branch 'network-remove-provider-engine' of https://github.com/MetaMask/metamask-extension into transactions-use-new-block-tracker 2018-05-22 16:45:20 -07:00
frankiebee
c4b09da34e transactions - update pending-tx-tracker to use the new block tracker 2018-05-22 16:42:06 -07:00
frankiebee
10aecf4922 remove dependance on the even tx:confirmed 2018-05-22 16:40:01 -07:00
kumavis
3a80f3dd83 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-05-22 13:20:04 -07:00
Frankie
e8b2e11c56 Reveal get filtered tx list (#4332)
* add getFilteredTxList from txController to getApi

* transactions - remove dead code (isNonceTaken)
2018-05-21 16:00:44 -07:00
kumavis
088d7930e0 network - create provider and block-tracker via json-rpc-engine 2018-05-16 20:46:34 -07:00
kumavis
8e1cad5ff6
tx-state-history-helper - use more readable Date.now method 2018-05-16 13:05:07 -07:00
Csaba Solya
2081768fc5 fix lint issues 2018-05-10 13:43:31 +02:00
Csaba Solya
3642810584 remove unnecessary lib 2018-05-10 13:34:56 +02:00
Csaba Solya
349fb9e0bc revert unnecessary change in state manager 2018-05-10 13:33:40 +02:00
Csaba Solya
9026651224 add time stamps to transaction history log entries 2018-05-10 13:26:02 +02:00
bitpshr
6351b7bb88 Fix documentation typo 2018-05-07 15:08:43 -04:00
frankiebee
a45cb75435 transactions - add a nonce check utility for ui use 2018-05-01 13:57:43 -07:00
frankiebee
62bf76db53 fix - getTxsByMetaData check if the key is in the object not if the value is truthy 2018-05-01 13:57:14 -07:00
frankiebee
98ae853b6c require log 2018-04-30 09:57:36 -07:00
frankiebee
706647785c log emitter errors 2018-04-29 16:35:08 -07:00
frankiebee
7eb735651b transactions - run event emitters outside context of _setTxStatus 2018-04-29 16:32:16 -07:00
frankiebee
8ffce8b59d transactions - more docs and clean ups 2018-04-25 11:13:51 -07:00
Dan Finlay
621e9334bc Cleaned up some typos and JSDocs in Transactions
Nonce tracker is not fully documented yet.
Have not yet touched:
- tx-state-manager
- tx-state-history-helper
- util
- tx-gas-utils
- pending-tx-tracker
2018-04-23 09:43:18 -07:00
frankiebee
e862a5091e transactions - fix refernces 2018-04-19 12:07:45 -07:00
frankiebee
c20c97ce62 Merge branch 'master' into tx-controller-rewrite-v3 2018-04-19 11:49:11 -07:00
frankiebee
eeb9390de8 meta - transactions - docs yo! 2018-04-19 11:46:15 -07:00
frankiebee
943eea043c fix up - more docs 2018-04-13 13:18:45 -07:00
frankiebee
88f4212363 meta - transactions - code clean up and jsDoc 2018-04-13 12:38:07 -07:00
frankiebee
3aaa28531e transactions - code cleanup 2018-04-12 12:24:16 -07:00
frankiebee
5494aa4f9c transactions - lint fixes 2018-04-10 14:54:30 -07:00
frankiebee
2d7c3c2b00 meta - transactions - create a transactions dir in controller and move relevant files into it 2018-04-10 14:28:05 -07:00