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

97 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Alexander Tseung
43de189d06 Add createCancelTransaction method 2018-09-10 12:48:01 -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
kumavis
a89902c170 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-07-02 13:54:05 -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
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
cf73581c0e adding tests for recipient blacklist checker 2018-05-30 17:38:27 +02:00
Csaba Solya
afb5788861 initial implementation 2018-05-30 15:53:18 +02: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
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
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
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
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
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
2d7c3c2b00 meta - transactions - create a transactions dir in controller and move relevant files into it 2018-04-10 14:28:05 -07:00