aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-04-12 07:04:12 +0800
committerkumavis <aaron@kumavis.me>2016-04-15 01:28:57 +0800
commit2c47fb14e08fb4385148135892c9b2d429bc76fe (patch)
tree965c789725a7b0e729943013ec69d541ded29b9a /app/scripts
parent5694a116725dad3d3bb9878c9c7059f1870d2e29 (diff)
downloadtangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar.gz
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar.bz2
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar.lz
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar.xz
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.tar.zst
tangerine-wallet-browser-2c47fb14e08fb4385148135892c9b2d429bc76fe.zip
clean - inpage remove unused xhr mitm code
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/inpage.js70
1 files changed, 0 insertions, 70 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index 065f69629..e15c08671 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -1,6 +1,4 @@
const XHR = window.XMLHttpRequest
-// const fauxJax = require('faux-jax')
-// fauxJax.install()
// bring in web3 but rename on window
const Web3 = require('web3')
@@ -94,71 +92,3 @@ web3.setProvider = function(){
console.log('MetaMask - overrode web3.setProvider')
}
console.log('MetaMask - injected web3')
-
-
-//
-// intercept local node requests
-//
-
-
-// console.log('MetaMask - intercepting localhost:8545 requests')
-
-// fauxJax.on('request', function(req){
-// // check if local node request
-// if (req.requestURL.indexOf('localhost:8545') !== -1) {
-// var rpcReq = JSON.parse(req.requestBody)
-// if (req.async) {
-// remoteProvider.sendAsync(rpcReq, function(err, result){
-// // console.log('intercepted request (async):', rpcReq, result)
-// handleResult(result)
-// })
-// } else {
-// var result = remoteProvider.send(rpcReq)
-// // console.log('intercepted request (sync):', rpcReq, result)
-// handleResult(result)
-// }
-// } else {
-// // console.log('request continuing normally:', req.requestURL)
-// continueRequestNormally(req)
-// }
-
-// function handleResult(result){
-// var serializedResult = JSON.stringify(result)
-// req.respond(200, {
-// 'content-type': 'application/json',
-// }, serializedResult)
-// }
-// })
-
-// function continueRequestNormally(req){
-// var xhr = new XHR()
-// // set target url and method
-// xhr.open(req.requestMethod, req.requestURL, req.async)
-// // set headers
-// Object.keys(req.requestHeaders || {}).forEach(function(headerKey){
-// xhr.setRequestHeader(headerKey, req.requestHeaders[headerKey])
-// })
-// // send and call completion handler
-// if (req.async) {
-// xhr.onload = copyResult
-// xhr.send(req.requestBody)
-// } else {
-// xhr.send(req.requestBody)
-// copyResult()
-// }
-
-// function copyResult() {
-// var headers = extractResponseHeaders(xhr.getAllResponseHeaders())
-// req.respond(xhr.status, headers, xhr.response)
-// }
-// }
-
-// function extractResponseHeaders(rawHeaders){
-// var headers = {}
-// var headerKeyValues = rawHeaders.split('\r\n').filter(Boolean)
-// headerKeyValues.forEach(function(keyValue){
-// var data = keyValue.split(': ')
-// headers[data[0]] = data[1]
-// })
-// return headers
-// }