aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-11-05 22:13:22 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2018-11-06 07:07:09 +0800
commitb3f428fd1f2fd5c4041c03d55b38c6de298fc789 (patch)
treefdf6ffa94137aa71eeb18b55d751787668465948 /app
parent879997af517b36cf701ec74c08ec4293a2206baa (diff)
downloadtangerine-wallet-browser-b3f428fd1f2fd5c4041c03d55b38c6de298fc789.tar.gz
tangerine-wallet-browser-b3f428fd1f2fd5c4041c03d55b38c6de298fc789.tar.zst
tangerine-wallet-browser-b3f428fd1f2fd5c4041c03d55b38c6de298fc789.zip
Move experimental provider augmentation
Diffstat (limited to 'app')
-rw-r--r--app/scripts/inpage.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index e1948a522..327e25042 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -89,19 +89,6 @@ inpageProvider.enable = function ({ force } = {}) {
})
}
-// detect eth_requestAccounts and pipe to enable for now
-function detectAccountRequest(method) {
- const originalMethod = inpageProvider[method]
- inpageProvider[method] = function ({ method }) {
- if (method === 'eth_requestAccounts') {
- return ethereum.enable()
- }
- return originalMethod.apply(this, arguments)
- }
-}
-detectAccountRequest('send')
-detectAccountRequest('sendAsync')
-
// add metamask-specific convenience methods
inpageProvider._metamask = new Proxy({
/**
@@ -176,6 +163,19 @@ const proxiedInpageProvider = new Proxy(inpageProvider, {
window.ethereum = proxiedInpageProvider
+// detect eth_requestAccounts and pipe to enable for now
+function detectAccountRequest(method) {
+ const originalMethod = inpageProvider[method]
+ inpageProvider[method] = function ({ method }) {
+ if (method === 'eth_requestAccounts') {
+ return window.ethereum.enable()
+ }
+ return originalMethod.apply(this, arguments)
+ }
+}
+detectAccountRequest('send')
+detectAccountRequest('sendAsync')
+
//
// setup web3
//
soc2013-evolution/commit/shell/Makefile.am?h=EVOLUTION_3_8_0&id=f62728b55e201ea92e682e07b3253ce4fb42d5af'>f62728b55e
6cda29281f

f62728b55e




f62728b55e
baea9882fc
f62728b55e

054c088169
f62728b55e




3e481b5a38
59bd81691d
1f38f4d92c
2634f04217
f62728b55e
54a9260f69
86ecfc5053
f4cf9af33c
caa8621351
eca687589d
51d0fc6863
2e1a8c3899

4cbbdedf52
b06cdfab92
5350eebb5e
eca687589d
5350eebb5e
86ecfc5053
03a3e6f846

f4cf9af33c

f4cf9af33c

03a3e6f846
6cda29281f
f4cf9af33c
7ba831860d
1600064022
c03e685846


3e481b5a38
393021c19d
2634f04217
b04bd957c7
7ba831860d

fb970ccf14
e234598bdf
fb970ccf14

f62728b55e


f62728b55e






f62728b55e


c6727d66ad
054c088169
f62728b55e
d46c4b4e5b
f62728b55e


1f38f4d92c
9ede7a7fb4
1f38f4d92c
2634f04217
f62728b55e
7f36752a67
ee5671fc1a

ed4e8afecd
f5a654d71a

f5a654d71a
1f38f4d92c
59bd81691d
2634f04217
e234598bdf
725d0a088d
f7e298665b



c6727d66ad









f92b45d7df

c6727d66ad


f92b45d7df


c6727d66ad
b106b13525

735789921b
2cf63ca4ba
735789921b
2cf63ca4ba
9c73777f22

b106b13525
6cda29281f
f22e38ffad

735789921b
fb970ccf14




ed458bfc2a
7ba831860d
5adb1dedf6
f80ee8128b
7ba831860d
f80ee8128b








04fac44de1
6cda29281f



83ac1fc7df
04fac44de1



fb970ccf14

504642b798

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206