diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-06-22 04:18:32 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-06-22 04:18:32 +0800 |
commit | a08c3bc01b11fbd0e3a243359befbe9fc909edf4 (patch) | |
tree | b79b7324139945c429ca4b6c74715d8040fdf4e1 /ui/example.js | |
parent | f7f8f8b1c50be39db22a7b10c6c6db007fe590aa (diff) | |
download | tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.gz tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.bz2 tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.lz tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.xz tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.zst tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.zip |
Auto linted
Diffstat (limited to 'ui/example.js')
-rw-r--r-- | ui/example.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ui/example.js b/ui/example.js index b32da4be4..c143937c1 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()) } @@ -108,16 +108,16 @@ injectCss(css) var app = 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 +} |