diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-06-22 06:04:00 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-06-22 06:04:00 +0800 |
commit | cf663f1104697440121d32cc6db2a8a1d5d54c5a (patch) | |
tree | 3ed4b8b9fe8c85f3b3a5bf68482c3fb9967f2de5 /ui/example.js | |
parent | 265725c6edd62a7f46a9b9cf5a443cf01f0ff00c (diff) | |
parent | dc2ef967028723afe9fe1efd669754723e38a4f0 (diff) | |
download | tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.gz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.bz2 tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.lz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.xz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.zst tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.zip |
Fix conflict
Diffstat (limited to 'ui/example.js')
-rw-r--r-- | ui/example.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/ui/example.js b/ui/example.js index b32da4be4..f4126438c 100644 --- a/ui/example.js +++ b/ui/example.js @@ -26,7 +26,7 @@ var identities = { address: '0x333462427bcc9133bb46e88bcbe39cd7ef0e7333', balance: 0.000001, txCount: 1, - } + }, } var unconfTxs = {} @@ -42,7 +42,7 @@ addUnconfTx({ data: '0x000462427bcc9133bb46e88bcbe39cd7ef0e7000', }) -function addUnconfTx(txParams){ +function addUnconfTx (txParams) { var time = (new Date()).getTime() var id = createRandomId() unconfTxs[id] = { @@ -55,7 +55,7 @@ function addUnconfTx(txParams){ var isUnlocked = false var selectedAddress = null -function getState(){ +function getState () { return { isUnlocked: isUnlocked, identities: isUnlocked ? identities : {}, @@ -66,16 +66,16 @@ function getState(){ var accountManager = new EventEmitter() -accountManager.getState = function(cb){ +accountManager.getState = function (cb) { cb(null, getState()) } -accountManager.setLocked = function(){ +accountManager.setLocked = function () { isUnlocked = false this._didUpdate() } -accountManager.submitPassword = function(password, cb){ +accountManager.submitPassword = function (password, cb) { if (password === 'test') { isUnlocked = true cb(null, getState()) @@ -85,17 +85,17 @@ accountManager.submitPassword = function(password, cb){ } } -accountManager.setSelectedAddress = function(address, cb){ +accountManager.setSelectedAddress = function (address, cb) { selectedAddress = address cb(null, getState()) this._didUpdate() } -accountManager.signTransaction = function(txParams, cb){ +accountManager.signTransaction = function (txParams, cb) { alert('signing tx....') } -accountManager._didUpdate = function(){ +accountManager._didUpdate = function () { this.emit('update', getState()) } @@ -106,18 +106,18 @@ var container = document.getElementById('app-content') var css = MetaMaskUiCss() injectCss(css) -var app = MetaMaskUi({ +MetaMaskUi({ container: container, - accountManager: accountManager + accountManager: accountManager, }) // util -function createRandomId(){ +function createRandomId () { // 13 time digits - var datePart = new Date().getTime()*Math.pow(10, 3) + var datePart = new Date().getTime() * Math.pow(10, 3) // 3 random digits - var extraPart = Math.floor(Math.random()*Math.pow(10, 3)) + var extraPart = Math.floor(Math.random() * Math.pow(10, 3)) // 16 digits - return datePart+extraPart -}
\ No newline at end of file + return datePart + extraPart +} |