File tree 4 files changed +21
-14
lines changed
4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 3
3
## Current Master
4
4
5
5
- Fix bug where provider menu did not allow switching to custom network from a custom network.
6
+ - Sending a transaction from within MetaMask no longer triggers a popup.
6
7
7
8
## 2.10.0 2016-08-29
8
9
Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ module.exports = notifications
9
9
window . METAMASK_NOTIFIER = notifications
10
10
11
11
function show ( ) {
12
- getPopup ( ( popup ) => {
13
- if ( popup ) {
14
- return extension . windows . update ( popup . id , { focused : true } )
15
- }
12
+ getWindows ( ( windows ) => {
16
13
14
+ if ( windows . length > 0 ) {
15
+ const win = windows [ 0 ]
16
+ return extension . windows . update ( win . id , { focused : true } )
17
+ }
17
18
18
19
extension . windows . create ( {
19
20
url : 'notification.html' ,
@@ -25,22 +26,29 @@ function show () {
25
26
} )
26
27
}
27
28
28
- function getPopup ( cb ) {
29
-
29
+ function getWindows ( cb ) {
30
30
// Ignore in test environment
31
31
if ( ! extension . windows ) {
32
- return cb ( null )
32
+ return cb ( )
33
33
}
34
34
35
35
extension . windows . getAll ( { } , ( windows ) => {
36
- let popup = windows . find ( ( win ) => {
37
- return win . type === 'popup'
38
- } )
36
+ cb ( null , windows )
37
+ } )
38
+ }
39
39
40
- cb ( popup )
40
+ function getPopup ( cb ) {
41
+ getWindows ( ( windows ) => {
42
+ cb ( getPopupIn ( windows ) )
41
43
} )
42
44
}
43
45
46
+ function getPopupIn ( windows ) {
47
+ return windows ? windows . find ( ( win ) => {
48
+ return win . type === 'popup'
49
+ } ) : null
50
+ }
51
+
44
52
function closePopup ( ) {
45
53
getPopup ( ( popup ) => {
46
54
if ( ! popup ) return
Original file line number Diff line number Diff line change @@ -276,15 +276,14 @@ function signMsg (msgData) {
276
276
277
277
function signTx ( txData ) {
278
278
return ( dispatch ) => {
279
- dispatch ( actions . showLoadingIndication ( ) )
280
-
281
279
web3 . eth . sendTransaction ( txData , ( err , data ) => {
282
280
dispatch ( actions . hideLoadingIndication ( ) )
283
281
284
282
if ( err ) return dispatch ( actions . displayWarning ( err . message ) )
285
283
dispatch ( actions . hideWarning ( ) )
286
284
dispatch ( actions . goHome ( ) )
287
285
} )
286
+ dispatch ( this . showConfTxPage ( ) )
288
287
}
289
288
}
290
289
Original file line number Diff line number Diff line change @@ -236,7 +236,6 @@ SendTransactionScreen.prototype.onSubmit = function () {
236
236
}
237
237
238
238
this . props . dispatch ( actions . hideWarning ( ) )
239
- this . props . dispatch ( actions . showLoadingIndication ( ) )
240
239
241
240
var txParams = {
242
241
from : this . props . address ,
You can’t perform that action at this time.
0 commit comments