aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/inpage.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2015-08-02 13:23:33 +0800
committerkumavis <aaron@kumavis.me>2015-08-02 13:23:33 +0800
commitdcfd89db1b98d6d7235c3a73993d8a495a2aabff (patch)
tree8b3faba5f0a28841513ca0dbf49785d6c8d45bd8 /app/scripts/inpage.js
parent5a9698c77a30d909871974ef519da132f03ed0aa (diff)
downloadtangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar.gz
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar.bz2
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar.lz
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar.xz
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.tar.zst
tangerine-wallet-browser-dcfd89db1b98d6d7235c3a73993d8a495a2aabff.zip
store unconfirmedTxs in chrome sync storage
Diffstat (limited to 'app/scripts/inpage.js')
-rw-r--r--app/scripts/inpage.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index 006a8e0bb..1d264975e 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -2,8 +2,9 @@ const web3 = require('web3')
const MetamaskProvider = require('./lib/metamask-provider.js')
const rpcUrl = 'https://rpc.metamask.io'
-const messageType = 'metamaskMessage'
const documentOrigin = window.location.origin
+const allowedMessageTarget = 'metamask'
+const allowedMessageType = 'addUnconfirmedTx'
var provider = new MetamaskProvider(forwardPayload, rpcUrl)
@@ -15,7 +16,8 @@ window.web3 = web3
function forwardPayload(payload){
window.postMessage({
- type: messageType,
+ to: allowedMessageTarget,
+ type: allowedMessageType,
payload: payload,
}, documentOrigin)
} \ No newline at end of file