aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src/background.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-05 09:23:46 +0800
committerkumavis <aaron@kumavis.me>2017-04-05 09:23:46 +0800
commit5a91adf7d802097805938e3d54fe7256b19724d1 (patch)
tree9ad83ef345650796822b5462cff0d0bf5eab9b22 /mascara/src/background.js
parent5d967eeebb9f3cf4c2d3fcfe0b74cf6e8440c3cb (diff)
downloadtangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar.gz
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar.bz2
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar.lz
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar.xz
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.tar.zst
tangerine-wallet-browser-5a91adf7d802097805938e3d54fe7256b19724d1.zip
add platforms to mascara + move buyEther window open to ui
Diffstat (limited to 'mascara/src/background.js')
-rw-r--r--mascara/src/background.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/mascara/src/background.js b/mascara/src/background.js
index 6f9fb3d13..957570050 100644
--- a/mascara/src/background.js
+++ b/mascara/src/background.js
@@ -8,6 +8,7 @@ const PortStream = require('../../app/scripts/lib/port-stream.js')
const DbController = require('./lib/index-db-controller')
+const SwPlatform = require('../../app/scripts/platforms/sw')
const MetamaskController = require('../../app/scripts/metamask-controller')
const extension = {} //require('../../app/scripts/lib/extension')
@@ -17,7 +18,8 @@ const migrations = require('../../app/scripts/migrations/')
const firstTimeState = require('../../app/scripts/first-time-state')
const STORAGE_KEY = 'metamask-config'
-const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
+// const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
+const METAMASK_DEBUG = true
let popupIsOpen = false
const log = require('loglevel')
@@ -70,7 +72,11 @@ function setupController (initState, client) {
// MetaMask Controller
//
+ const platform = new SwPlatform()
+
const controller = new MetamaskController({
+ // platform specific implementation
+ platform,
// User confirmation callbacks:
showUnconfirmedMessage: noop,
unlockAccountMessage: noop,