From e26429ab2cecccb8b4c2ec64c1327b0dcf3bebb9 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 16 Feb 2018 21:53:09 -0800 Subject: [PATCH 01/46] [WIP] eth wallet support --- .gitignore | 1 + app/extensions.js | 41 +- .../brave/img/extensions/ethereum-128.png | Bin 0 -> 7760 bytes .../brave/locales/en-US/extensions.properties | 4 +- app/locale.js | 1 + app/renderer/lib/extensionsUtil.js | 10 + img/ethereum/ethereum-128.png | Bin 0 -> 7760 bytes img/ethereum/ethereum-16.png | Bin 0 -> 1023 bytes img/ethereum/ethereum-48.png | Bin 0 -> 19187 bytes js/about/preferences.js | 2 + js/constants/appConfig.js | 1 + js/constants/config.js | 1 + js/constants/settings.js | 1 + js/lib/appUrlUtil.js | 58 +- package-lock.json | 669 +++++++++--------- package.json | 4 +- test/unit/lib/appUrlUtilTest.js | 51 ++ tools/downloadEthwallet.js | 11 + 18 files changed, 521 insertions(+), 334 deletions(-) create mode 100644 app/extensions/brave/img/extensions/ethereum-128.png create mode 100644 img/ethereum/ethereum-128.png create mode 100644 img/ethereum/ethereum-16.png create mode 100644 img/ethereum/ethereum-48.png create mode 100644 tools/downloadEthwallet.js diff --git a/.gitignore b/.gitignore index d2f75d658bc..97f128815fa 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ Brave.tar.bz2 app/extensions/gen app/extensions/brave/gen app/extensions/torrent/gen +app/extensions/ethwallet *.pfx js/constants/buildConfig.js diff --git a/app/extensions.js b/app/extensions.js index 9cae84b5d07..1b4235d9ffd 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -267,6 +267,37 @@ let generateTorrentManifest = () => { } } +let generateEthwalletManifest = () => { + let cspDirectives = { + 'default-src': '\'self\'', + 'style-src': '\'self\' \'unsafe-inline\'', + 'connect-src': 'blob: \'self\' http://localhost:* https://min-api.cryptocompare.com https://mini-api.cryptocompare.com', + 'img-src': '\'self\' data:', + 'script-src': '\'sha256-7B6rTuXUsu9shBeECmDFH4h7RDsfogQ3kIonJnIL40o=\' \'sha256-dHk4wOUZR8kQPod/eH4V2U8eAnISQFg5bqkG8wdrqiA=\' \'self\'' + } + + if (process.env.NODE_ENV === 'development') { + // allow access to webpack dev server resources + let devServer = 'localhost:' + process.env.npm_package_config_port + cspDirectives['default-src'] += ' http://' + devServer + ' ' + 'ws://' + devServer + } + + return { + name: 'Ethereum Wallet', + description: l10n.translation('ethwalletDesc'), + manifest_version: 2, + version: '1.0', + content_security_policy: concatCSP(cspDirectives), + icons: { + 128: 'ethereum-128.png', + 48: 'ethereum-48.png', + 16: 'ethereum-16.png' + }, + incognito: 'split', + key: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzrdMUtpj4PkN7uoeRC7pXsJyNC65iCWJObISzDQ/mCXerD3ATL54Y8TCkE1mS9O2tiZFY+og4g0GqLjT/M9GJ/Rjlj6cQqIaa9MnQ65H789V6rqPlTQyrd3udIylPJbr5aJ9RvuMcX8BKpT7SKcYvRSwZblKQ/OZ/a/5ylfM+QPyS5ZzooEq921I8eB4JF80aic/3cdU+Xmpyo/jdEe804/MemQ6kqlErXdNaFVU7fQ3lvCzWWcI+I3A1QbKSC2+G1HiToxllxU1gv+rAOsoHYwSkL2ZBTPkvnVBuV5vTS91GF3jGF9TMbw4m3TRNPJZkU32nfJy2JNaa1Ssnws+bQIDAQAB' + } +} + let generateSyncManifest = () => { let cspDirectives = { 'default-src': '\'self\'', @@ -480,7 +511,7 @@ module.exports.init = () => { } if (!extensionInfo.isLoaded(extensionId) && !extensionInfo.isLoading(extensionId)) { extensionInfo.setState(extensionId, extensionStates.LOADING) - if (extensionId === config.braveExtensionId || extensionId === config.torrentExtensionId || extensionId === config.cryptoTokenExtensionId || extensionId === config.syncExtensionId) { + if (extensionId === config.braveExtensionId || extensionId === config.torrentExtensionId || extensionId === config.ethwalletExtensionId || extensionId === config.cryptoTokenExtensionId || extensionId === config.syncExtensionId) { session.defaultSession.extensions.load(extensionPath, manifest, manifestLocation) return } @@ -528,6 +559,14 @@ module.exports.init = () => { extensionInfo.setState(config.syncExtensionId, extensionStates.REGISTERED) loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') + if (getSetting(settings.ETHWALLET_ENABLED)) { + extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) + loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') + } else { + extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) + extensionActions.extensionDisabled(config.ethwalletExtensionId) + } + if (getSetting(settings.TORRENT_VIEWER_ENABLED)) { extensionInfo.setState(config.torrentExtensionId, extensionStates.REGISTERED) loadExtension(config.torrentExtensionId, getExtensionsPath('torrent'), generateTorrentManifest(), 'component') diff --git a/app/extensions/brave/img/extensions/ethereum-128.png b/app/extensions/brave/img/extensions/ethereum-128.png new file mode 100644 index 0000000000000000000000000000000000000000..f2022eef8ae18550751cd814e333e1fd5b4a420e GIT binary patch literal 7760 zcma)hcQjmI+xE;Dj53Vg62=fUdhdf#LUf`;7eVyiW%LrgghUU)PecpRf)S!b^d4RG zHi%y0mFIcB_kF+h{qvo*_St)1=eqBEUuT_l*1q>0tF5U5C8Q?=007WOswmyN9{smL z@b2!NvR3_f9ne!(MFCJbcyH@&Lg1!q>t1wBd@b z9=321USVE-ge)N(4wv?L_FPgIrTicByO|8a-pk8Pl8?{V*O%8F?rY<;UaV$?|U}|Hlu?*3-tr!OhFT)dl|7ua&i{x0eh8@i)+aU;kdG zm&5b_iR9w>A6a(-`TjoP6X50N`)}WOrqX{=Ni7ct+q=kr{mTkS|BLy5VgHFE&G$F> z|60tymHrF8lPXIn&G+B0O_uQSS9W6n;9l}0l)SzlaLTXk|PEC$* z%9VkQ&fW%RgiQNLGH<~G`aXCzU-6u58_eGeN*S{g$&T}`==-C!0Tl>Ydv?)bPtGgtD#19tXXnkm1QNB`g&=oNbT=dAuolKV4# zu$F1@`TM}w;MkVe==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@+>!AQY<4r$CVTI6Pe)mPtKf(5!%8w6SR-}fLn#=Q) zH+4JTdO3iWhHaTw@>UkM!i&nHa|`6_u)-c!rh{vrL|ii20d7pUZ3ZZu zz=+6JViJv26dH6xOq?AgwZS#;$T zi;18tOLDX)l3k%!k|WV~yEwJtwI<_he%H^AXLGV93I?$D_4l&=SZT%k@iGan(Q2m1 zeGbV?dM78&!Erk%g41Y#PVMNAhW;W<+MV7G) zCwQ&XbHM%eoUE)Yy~f>I-hA5hiOi>DfS#xfN$V?-#;A5M7&rDMZ75fDkH|BhB%Pv3 z)xy15n~&eup-xPvQT@$9yY1fYQlKS(?bJbJUz%Y+fPY9=EK_>Gz@QE`&CLXipC9bk z6*J?6e#ZpXuJSq05u#~e1t18Rmg#+VetNUfN<>yNpZJ<3hX#CIQ`BrPv>VFPId@&U zC%tjRoBy$<@v&=Y1ReG1Bz@(#e6QLreISjTOA zRyIXF%2UAIL0uY zG`jyv1ml5uyUKyZ;UgjymyYzG{5GhC=JsugOxwJJNPNKG+MdRRBqqIo1Owo|P%aVn z-d?3LrynRasAPWFSuPD*^`;l;=;&y_@yDQzE3k>YOg*+{Z^?nCp3u8YQeldpDv+#0 zB)#%2g*35D;Bl6K>%tdxK0GSpnf&c&j literal 0 HcmV?d00001 diff --git a/app/extensions/brave/locales/en-US/extensions.properties b/app/extensions/brave/locales/en-US/extensions.properties index b0bf7a66cc7..d039c6d764a 100644 --- a/app/extensions/brave/locales/en-US/extensions.properties +++ b/app/extensions/brave/locales/en-US/extensions.properties @@ -33,5 +33,7 @@ sync= Brave Sync syncDesc= torrent= Torrent Viewer torrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links. +ethwallet=Ethereum Wallet +ethwalletDesc=Local Ethereum Wallet with hardware wallet support, based on https://wallet.ethereum.org. vimium= Vimium -vimiumDesc= \ No newline at end of file +vimiumDesc= diff --git a/app/locale.js b/app/locale.js index c5ef2a5b2c5..56a70826a1e 100644 --- a/app/locale.js +++ b/app/locale.js @@ -256,6 +256,7 @@ var rendererIdentifiers = function () { 'downloadPaused', 'noDownloads', 'torrentDesc', + 'ethwalletDesc', 'multiSelectionBookmarks', // Caption buttons in titlebar (min/max/close - Windows only) 'windowCaptionButtonMinimize', diff --git a/app/renderer/lib/extensionsUtil.js b/app/renderer/lib/extensionsUtil.js index 55191919b58..13bb208b940 100644 --- a/app/renderer/lib/extensionsUtil.js +++ b/app/renderer/lib/extensionsUtil.js @@ -21,6 +21,7 @@ const vimium = config.vimiumExtensionId const honey = config.honeyExtensionId const pinterest = config.pinterestExtensionId const metamask = config.metamaskExtensionId +const ethwallet = config.ethwalletExtensionId /** * Stores dummy data for all known extensions based on vault-updater extension manifest. @@ -79,6 +80,12 @@ const dummyData = [ name: 'MetaMask', description: 'metamaskDesc', icon: 'img/extensions/metamask-128.png' + }, + { + id: ethwallet, + name: 'Ethereum Wallet', + description: 'ethwalletDesc', + icon: 'img/extensions/ethereum-128.png' } // { // id: metamask, @@ -177,6 +184,9 @@ module.exports.getExtensionKey = (extensionId) => { case metamask: extensionSetting = settings.METAMASK_ENABLED break + case ethwallet: + extensionSetting = settings.ETHWALLET_ENABLED + break default: break } diff --git a/img/ethereum/ethereum-128.png b/img/ethereum/ethereum-128.png new file mode 100644 index 0000000000000000000000000000000000000000..f2022eef8ae18550751cd814e333e1fd5b4a420e GIT binary patch literal 7760 zcma)hcQjmI+xE;Dj53Vg62=fUdhdf#LUf`;7eVyiW%LrgghUU)PecpRf)S!b^d4RG zHi%y0mFIcB_kF+h{qvo*_St)1=eqBEUuT_l*1q>0tF5U5C8Q?=007WOswmyN9{smL z@b2!NvR3_f9ne!(MFCJbcyH@&Lg1!q>t1wBd@b z9=321USVE-ge)N(4wv?L_FPgIrTicByO|8a-pk8Pl8?{V*O%8F?rY<;UaV$?|U}|Hlu?*3-tr!OhFT)dl|7ua&i{x0eh8@i)+aU;kdG zm&5b_iR9w>A6a(-`TjoP6X50N`)}WOrqX{=Ni7ct+q=kr{mTkS|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qFvEJ-RjjQ^81hf90|w z>5VfPasA!T0a0Z>hmTkiN{3v3B$_Is=hDTpj5E-}l3&%;Z%O;&W@>pYZ1+DPK-(;( z3mC{}@|tle%+{~1kKn?=ao7Md`3y2w+zb=VP^ab~`h6O&osSKJ-A=#g^bJ{}w1>_n zk5aS!`fUl&{O@FtQ!uNaHXS@+>!AQY<4r$CVTI6Pe)mPtKf(5!%8w6SR-}fLn#=Q) zH+4JTdO3iWhHaTw@>UkM!i&nHa|`6_u)-c!rh{vrL|ii20d7pUZ3ZZu zz=+6JViJv26dH6xOq?AgwZS#;$T zi;18tOLDX)l3k%!k|WV~yEwJtwI<_he%H^AXLGV93I?$D_4l&=SZT%k@iGan(Q2m1 zeGbV?dM78&!Erk%g41Y#PVMNAhW;W<+MV7G) zCwQ&XbHM%eoUE)Yy~f>I-hA5hiOi>DfS#xfN$V?-#;A5M7&rDMZ75fDkH|BhB%Pv3 z)xy15n~&eup-xPvQT@$9yY1fYQlKS(?bJbJUz%Y+fPY9=EK_>Gz@QE`&CLXipC9bk z6*J?6e#ZpXuJSq05u#~e1t18Rmg#+VetNUfN<>yNpZJ<3hX#CIQ`BrPv>VFPId@&U zC%tjRoBy$<@v&=Y1ReG1Bz@(#e6QLreISjTOA zRyIXF%2UAIL0uY zG`jyv1ml5uyUKyZ;UgjymyYzG{5GhC=JsugOxwJJNPNKG+MdRRBqqIo1Owo|P%aVn z-d?3LrynRasAPWFSuPD*^`;l;=;&y_@yDQzE3k>YOg*+{Z^?nCp3u8YQeldpDv+#0 zB)#%2g*35D;Bl6K>%tdxK0GSpnf&c&j literal 0 HcmV?d00001 diff --git a/img/ethereum/ethereum-16.png b/img/ethereum/ethereum-16.png new file mode 100644 index 0000000000000000000000000000000000000000..becdbed9dc3641e49dacf5730c7c275a48733dfa GIT binary patch literal 1023 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|6p}rHd>I(3 z)EF2VS{N990fib~Fff!FFfhD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sgY}_MYS??@K|8 z>E?2NJ~HOVP_cFQI@WEutna}ai|eFx04%A!Sh_yq0RiQNTY5kL%H7RRY&*xXhb`>1 zz`?M*k`i(GUt_Y8I^VA$P0TMxHniu*wsCf^245G5&&tTEN!9;Z^-5EsClnn99O%_UqnnU zO;kAnH!>5iN1h){0vQDr%~H|1&lF-N$yz6e7!WEB6NXII`v&ndrMN#e`+tK2)CHlG z;Pz++m|9J|@+KsoF3YU$^dA>XmdiL>p19{)ItaWdVDfrbEUP?GpN z{%PAcZp6t_W|F?nNOi%i>-lJ2c*&c;Xm*8a40b2d*!X$`xT{GGWWmJhLJ1w`NS+T` zw;3pGNREfPdR`GEt+6Y2Oaf_{cV<=FQ!I#A!XRFC9q&JaINtC$-fV8h)ZY7%Au5;J!){P*LAq z;HT#y{IMe2ye2sox(X)i*E%de!&l*@WdJ!iWzEM-y#sf`7=QsA4J%(KU7%>uEdw>B zB7@UovWPTQ=^C|nHKC#1#1y%pT^_xhfzp3pzq_dcHd`&h-VAQ*YJwi!M4nOU;kYTU zi9%!D_F7evs7;@R;>R0*S;56#&=PjcBCr)xh;jC0s4XYi4d&EnMt{_kUKvuujux2K z*e)Fpo2%lN2A8>-^M4xx1HKN{qhdS?|&3#Qoy*#CA4*L@7;Y zD`+D6Wqr+@WJwBqBt{R!2|B_!1K%)a=p(u;cqt*fS;8Ge4er)fB>&cP-+GYX3|G9J zp^N4C75G2zNKr2W0de~_F2y|ax@_I6Gq>}b4I~f>Rul;&_PiXCJ`B$9%=?@XA8QtW zi4DB|uRs3x%YOxNt|b4}ga69l{{cNfB|=ZHP9NHgsr3H+*IQ93%d0=jfBN#>{{a|^ B;+p^f literal 0 HcmV?d00001 diff --git a/js/about/preferences.js b/js/about/preferences.js index 3a8ce1bc973..4ec8839b3ab 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -836,12 +836,14 @@ class AboutPreferences extends React.Component { settings: this.state.settings.set(key, value) }) aboutActions.changeSetting(key, value) + console.log('on change setting', key, value) const settingsRequiringRestart = [ settings.HARDWARE_ACCELERATION_ENABLED, settings.DO_NOT_TRACK, settings.LANGUAGE, settings.PDFJS_ENABLED, settings.TORRENT_VIEWER_ENABLED, + settings.ETHWALLET_ENABLED, settings.SMOOTH_SCROLL_ENABLED, settings.SITE_ISOLATION_ENABLED, settings.SEND_CRASH_REPORTS, diff --git a/js/constants/appConfig.js b/js/constants/appConfig.js index 54684d2d086..4fbfa034483 100644 --- a/js/constants/appConfig.js +++ b/js/constants/appConfig.js @@ -226,6 +226,7 @@ module.exports = { 'extensions.pinterest.enabled': false, 'extensions.metamask.enabled': false, 'extensions.metamask.promptDismissed': false, + 'extensions.ethwallet.enabled': false, 'general.bookmarks-toolbar-mode': null, 'general.is-default-browser': null, 'notification-add-funds-timestamp': null, diff --git a/js/constants/config.js b/js/constants/config.js index c16d3aa3207..e77cae17981 100644 --- a/js/constants/config.js +++ b/js/constants/config.js @@ -62,6 +62,7 @@ module.exports = { widevineComponentPublicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmhe+02cLPPAViaevk/fzODKUnb/ysaAeD8lpE9pwirV6GYOm+naTo7xPOCh8ujcR6Ryi1nPTq2GTG0CyqdDyOsZ1aRLuMZ5QqX3dJ9jXklS0LqGfosoIpGexfwggbiLvQOo9Q+IWTrAO620KAzYU0U6MV272TJLSmZPUEFY6IGQIDAQAB', braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd', torrentExtensionId: 'fmdpfempfmekjkcfdehndghogpnpjeno', + ethwalletExtensionId: 'dakeiobolocmlkdebloniehpglcjkgcp', syncExtensionId: 'cjnmeadmgmiihncdidmfiabhenbggfjm', // PDFJS // Parent repo: https://github.com/diracdeltas/pdf.js diff --git a/js/constants/settings.js b/js/constants/settings.js index 60947eb2089..f9faa44a9de 100644 --- a/js/constants/settings.js +++ b/js/constants/settings.js @@ -97,6 +97,7 @@ const settings = { PINTEREST_ENABLED: 'extensions.pinterest.enabled', METAMASK_ENABLED: 'extensions.metamask.enabled', METAMASK_PROMPT_DISMISSED: 'extensions.metamask.promptDismissed', + ETHWALLET_ENABLED: 'extensions.ethwallet.enabled', // Debug settings DEBUG_ALLOW_MANUAL_TAB_DISCARD: 'debug.manual-tab-discard.enabled', diff --git a/js/lib/appUrlUtil.js b/js/lib/appUrlUtil.js index 3543b9c83f3..f695ec5f2ba 100644 --- a/js/lib/appUrlUtil.js +++ b/js/lib/appUrlUtil.js @@ -6,6 +6,9 @@ const Immutable = require('immutable') const path = require('path') const UrlUtil = require('./urlutil') const config = require('../constants/config') +const urlParse = require('../../app/common/urlParse') + +const ethwalletOrigin = 'chrome-extension://' + config.ethwalletExtensionId + '/' module.exports.fileUrl = (filePath) => { // It's preferrable to call path.resolve but it's not available @@ -55,6 +58,14 @@ module.exports.getTorrentExtUrl = function (relativeUrl) { return 'chrome-extension://' + config.torrentExtensionId + '/' + relativeUrl } +module.exports.getEthwalletExtUrl = function (relativeUrl) { + if (relativeUrl === undefined) { + relativeUrl = '' + } + + return ethwalletOrigin + relativeUrl +} + module.exports.getExtensionsPath = function (extensionDir) { return (process.env.NODE_ENV !== 'development' && process.env.NODE_ENV !== 'test') // the path is different for release builds because extensions are not in the asar file @@ -115,7 +126,8 @@ module.exports.aboutUrls = new Immutable.Map({ 'about:safebrowsing': module.exports.getBraveExtUrl('about-safebrowsing.html'), 'about:styles': module.exports.getBraveExtUrl('about-styles.html'), 'about:contributions': module.exports.getBraveExtUrl('about-contributions.html'), - 'about:welcome': module.exports.getBraveExtUrl('about-welcome.html') + 'about:welcome': module.exports.getBraveExtUrl('about-welcome.html'), + 'about:ethwallet': module.exports.getEthwalletExtUrl('') }) module.exports.isIntermediateAboutPage = (location) => @@ -139,12 +151,18 @@ const aboutUrlsReverse = new Immutable.Map(module.exports.aboutUrls.reduce((obj, * about:blank -> http://localhost:8000/about-blank/index.html */ module.exports.getTargetAboutUrl = function (input) { - const url = module.exports.aboutUrls.get(getBaseUrl(input)) + let url = module.exports.aboutUrls.get(getBaseUrl(input)) if (!url) { return url } + const path = getPath(input) + url = path ? [url, path].join('') : url const hash = getHash(input) - return hash && url ? [url, hash].join('#') : url + url = hash ? [url, hash].join('#') : url + if (url === ethwalletOrigin) { + url = url + 'index.html' + } + return url } /** @@ -153,12 +171,15 @@ module.exports.getTargetAboutUrl = function (input) { * http://localhost:8000/about-blank.html -> about:blank */ module.exports.getSourceAboutUrl = function (input) { - const url = aboutUrlsReverse.get(getBaseUrl(input)) + let url = aboutUrlsReverse.get(getBaseUrl(input)) if (!url) { return url } + const path = getPath(input) + url = path ? [url, path].join('/') : url const hash = getHash(input) - return hash ? [url, hash].join('#') : url + url = hash ? [url, hash].join('#') : url + return url } /** @@ -229,8 +250,18 @@ module.exports.isUrl = function (input) { * Gets base url from an about: url or its target mapping. */ function getBaseUrl (input) { - return (typeof input === 'string') ? input.split(/#|\?/)[0] : '' + if (typeof input !== 'string') { + return '' + } + input = input.split(/#|\?/)[0] + if (input.startsWith('about:ethwallet')) { + input = 'about:ethwallet' + } else if (input.startsWith(ethwalletOrigin)) { + input = ethwalletOrigin + } + return input } + module.exports.getBaseUrl = getBaseUrl /** @@ -240,6 +271,21 @@ function getHash (input) { return (typeof input === 'string') ? input.split('#')[1] : '' } +/** + * Gets path for ethwallet URLs + */ +function getPath (input) { + if (typeof input !== 'string') { + return '' + } + if (input.startsWith('about:ethwallet')) { + return input.split('/')[1] + } else if (input.startsWith(ethwalletOrigin)) { + return input.split(ethwalletOrigin)[1] + } +} + + module.exports.navigatableTypes = ['http:', 'https:', 'about:', 'chrome:', 'chrome-extension:', 'chrome-devtools:', 'file:', 'view-source:', 'ftp:', 'magnet:'] /** diff --git a/package-lock.json b/package-lock.json index a61d521a508..20080138394 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,27 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "7zip-bin-linux": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.3.1.tgz", + "integrity": "sha512-Wv1uEEeHbTiS1+ycpwUxYNuIcyohU6Y6vEqY3NquBkeqy0YhVdsNUGsj0XKSRciHR6LoJSEUuqYUexmws3zH7Q==", + "dev": true, + "optional": true + }, + "7zip-bin-mac": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", + "integrity": "sha1-Pmh3i78JJq3GgVlCcHRQXUdVXAI=", + "dev": true, + "optional": true + }, + "7zip-bin-win": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.1.tgz", + "integrity": "sha512-6VGEW7PXGroTsoI2QW3b0ea95HJmbVBHvfANKLLMzSzFA1zKqVX5ybNuhmeGpf6vA0x8FJTt6twpprDANsY5WQ==", + "dev": true, + "optional": true + }, "@ambassify/backoff-strategies": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@ambassify/backoff-strategies/-/backoff-strategies-1.0.0.tgz", @@ -14,13 +35,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.88.tgz", "integrity": "sha512-bYDPZTX0/s1aihdjLuAgogUAT5M+TpoWChEMea2p0yOcfn5bu3k6cJb9cp6nw268XeSNIGGr+4+/8V5K6BGzLQ==" }, - "7zip-bin-mac": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", - "integrity": "sha1-Pmh3i78JJq3GgVlCcHRQXUdVXAI=", - "dev": true, - "optional": true - }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -708,6 +722,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, "requires": { "babel-code-frame": "6.26.0", "babel-generator": "6.26.0", @@ -746,6 +761,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, "requires": { "babel-messages": "6.23.0", "babel-runtime": "6.26.0", @@ -899,6 +915,7 @@ "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, "requires": { "babel-runtime": "6.26.0", "babel-template": "6.26.0" @@ -908,6 +925,7 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz", "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==", + "dev": true, "requires": { "find-cache-dir": "1.0.0", "loader-utils": "1.1.0", @@ -918,6 +936,7 @@ "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, "requires": { "babel-runtime": "6.26.0" } @@ -1424,6 +1443,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, "requires": { "babel-core": "6.26.0", "babel-runtime": "6.26.0", @@ -1447,6 +1467,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, "requires": { "babel-runtime": "6.26.0", "babel-traverse": "6.26.0", @@ -1459,6 +1480,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, "requires": { "babel-code-frame": "6.26.0", "babel-messages": "6.23.0", @@ -1475,6 +1497,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", @@ -1485,7 +1508,8 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true }, "balanced-match": { "version": "1.0.0", @@ -1639,11 +1663,6 @@ "tweetnacl": "0.14.5" } }, - "bech32": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-0.0.3.tgz", - "integrity": "sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg==" - }, "beeper": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", @@ -1796,7 +1815,7 @@ "bigi": "1.4.0", "bip66": "1.1.5", "bitcoin-ops": "1.4.0", - "bs58check": "2.1.0", + "bs58check": "2.1.1", "create-hash": "1.1.3", "create-hmac": "1.1.6", "ecurve": "1.0.6", @@ -1804,11 +1823,16 @@ "pushdata-bitcoin": "1.0.1", "randombytes": "2.0.5", "safe-buffer": "5.1.1", - "typeforce": "1.11.5", + "typeforce": "1.12.0", "varuint-bitcoin": "1.0.4", "wif": "2.0.6" }, "dependencies": { + "bech32": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-0.0.3.tgz", + "integrity": "sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg==" + }, "bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", @@ -1818,13 +1842,18 @@ } }, "bs58check": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.0.tgz", - "integrity": "sha512-FWT30tP+89OiXjWLHlAElxdPrbYo05T8XSmgKhh2GHq1JCBFUG0fujt5n7dadkEL3l4DFdfEi5KG5RcXW7UDEA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.1.tgz", + "integrity": "sha512-okRQiWc5FJuA2VOwQ1hB7Sf0MyEFg/EwRN12h4b8HrJoGkZ3xq1CGjkaAfYloLcZyqixQnO5mhPpN6IcHSplVg==", "requires": { "bs58": "4.0.1", "create-hash": "1.1.3" } + }, + "typeforce": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.12.0.tgz", + "integrity": "sha512-fvnkvueAOFLhtAqDgIA/wMP21SMwS/NQESFKZuwVrj5m/Ew6eK2S0z0iB++cwtROPWDOhaT6OUfla8UwMw4Adg==" } } }, @@ -2234,18 +2263,6 @@ } } }, - "bloodhound-js": { - "version": "github:brave/bloodhound#03555132b049adcb5a09138aa911acc3b4d3af7c", - "requires": { - "babel-core": "6.26.0", - "babel-loader": "7.1.2", - "es6-promise": "3.3.1", - "immutable": "3.8.1", - "object-assign": "4.1.1", - "storage2": "0.1.0", - "superagent": "1.8.5" - } - }, "bluebird": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", @@ -2738,14 +2755,11 @@ "integrity": "sha512-QU3oR1dLLVrYGRkb7LU17jMCpIkWtXXW7q71ECXWXkR9vOv37VjykqpvFgs29HgSCNLZHnNKJzdG6RwAW0LwIA==", "dev": true, "requires": { - "7zip-bin-mac": "1.0.1" + "7zip-bin-linux": "1.3.1", + "7zip-bin-mac": "1.0.1", + "7zip-bin-win": "2.1.1" } }, - "7zip-bin-linux": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.3.1.tgz", - "integrity": "sha512-Wv1uEEeHbTiS1+ycpwUxYNuIcyohU6Y6vEqY3NquBkeqy0YhVdsNUGsj0XKSRciHR6LoJSEUuqYUexmws3zH7Q==" - }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -3431,7 +3445,8 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "compact2string": { "version": "1.4.0", @@ -3650,7 +3665,8 @@ "convert-source-map": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true }, "cookie": { "version": "0.3.1", @@ -5059,6 +5075,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, "requires": { "repeating": "2.0.1" } @@ -5733,14 +5750,11 @@ "integrity": "sha512-QU3oR1dLLVrYGRkb7LU17jMCpIkWtXXW7q71ECXWXkR9vOv37VjykqpvFgs29HgSCNLZHnNKJzdG6RwAW0LwIA==", "dev": true, "requires": { - "7zip-bin-mac": "1.0.1" + "7zip-bin-linux": "1.3.1", + "7zip-bin-mac": "1.0.1", + "7zip-bin-win": "2.1.1" } }, - "7zip-bin-linux": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.3.1.tgz", - "integrity": "sha512-Wv1uEEeHbTiS1+ycpwUxYNuIcyohU6Y6vEqY3NquBkeqy0YhVdsNUGsj0XKSRciHR6LoJSEUuqYUexmws3zH7Q==" - }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -6065,6 +6079,14 @@ "nugget": "1.6.2", "path-exists": "1.0.0", "rc": "1.2.1" + }, + "dependencies": { + "home-path": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.5.tgz", + "integrity": "sha1-eIspgVsS1Tus9XVkhHbm+QQdEz8=", + "dev": true + } } }, "electron-osx-sign": { @@ -6172,69 +6194,6 @@ } } }, - "electron-prebuilt": { - "version": "github:brave/electron-prebuilt#e65e72f4bc7a8e7de160667f3eb3c2b22e3e395e", - "dev": true, - "requires": { - "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "extract-zip": "1.6.5" - }, - "dependencies": { - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } - } - }, "electron-squirrel-startup": { "version": "github:brave/electron-squirrel-startup#88d78fee0079d7bfce7e5238658e54e2e75550ef", "requires": { @@ -7315,6 +7274,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, "requires": { "commondir": "1.0.1", "make-dir": "1.0.0", @@ -7337,6 +7297,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { "locate-path": "2.0.0" } @@ -7543,23 +7504,6 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, - "form-data": { - "version": "1.0.0-rc3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz", - "integrity": "sha1-01vGLn+8KTeuePlIqqDTjZBgdXc=", - "requires": { - "async": "1.5.2", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - } - } - }, "formatio": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", @@ -7569,11 +7513,6 @@ "samsam": "1.1.2" } }, - "formidable": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.17.tgz", - "integrity": "sha1-71SRSQ+UM7cF+qdyScmQKa40hVk=" - }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -7716,13 +7655,15 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "dev": true, "optional": true }, "ajv": { "version": "4.11.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "dev": true, "optional": true, "requires": { @@ -7732,18 +7673,21 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, "requires": { @@ -7753,42 +7697,49 @@ }, "asn1": { "version": "0.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", "dev": true, "optional": true }, "assert-plus": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "dev": true, "optional": true }, "asynckit": { "version": "0.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true, "optional": true }, "aws-sign2": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", "dev": true, "optional": true }, "aws4": { "version": "1.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "dev": true, "optional": true }, "balanced-match": { "version": "0.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", "dev": true }, "bcrypt-pbkdf": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "dev": true, "optional": true, "requires": { @@ -7797,7 +7748,8 @@ }, "block-stream": { "version": "0.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { "inherits": "2.0.3" @@ -7805,7 +7757,8 @@ }, "boom": { "version": "2.10.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { "hoek": "2.16.3" @@ -7813,7 +7766,8 @@ }, "brace-expansion": { "version": "1.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", "dev": true, "requires": { "balanced-match": "0.4.2", @@ -7822,29 +7776,34 @@ }, "buffer-shims": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, "caseless": { "version": "0.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true, "optional": true }, "co": { "version": "4.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "combined-stream": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, "requires": { "delayed-stream": "1.0.0" @@ -7852,22 +7811,26 @@ }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "cryptiles": { "version": "2.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "optional": true, "requires": { @@ -7876,7 +7839,8 @@ }, "dashdash": { "version": "1.14.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "optional": true, "requires": { @@ -7885,7 +7849,8 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } @@ -7893,7 +7858,8 @@ }, "debug": { "version": "2.6.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", "dev": true, "optional": true, "requires": { @@ -7902,24 +7868,28 @@ }, "deep-extend": { "version": "0.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", "dev": true, "optional": true }, "delayed-stream": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "ecc-jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "dev": true, "optional": true, "requires": { @@ -7928,24 +7898,28 @@ }, "extend": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true, "optional": true }, "extsprintf": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, "forever-agent": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true, "optional": true }, "form-data": { "version": "2.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "dev": true, "optional": true, "requires": { @@ -7956,12 +7930,14 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fstream": { "version": "1.0.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, "requires": { "graceful-fs": "4.1.11", @@ -7972,7 +7948,8 @@ }, "fstream-ignore": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "dev": true, "optional": true, "requires": { @@ -7983,7 +7960,8 @@ }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -7999,7 +7977,8 @@ }, "getpass": { "version": "0.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "optional": true, "requires": { @@ -8008,7 +7987,8 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } @@ -8016,7 +7996,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -8029,18 +8010,21 @@ }, "graceful-fs": { "version": "4.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "har-schema": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", "dev": true, "optional": true }, "har-validator": { "version": "4.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "dev": true, "optional": true, "requires": { @@ -8050,13 +8034,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "hawk": { "version": "3.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "optional": true, "requires": { @@ -8068,12 +8054,14 @@ }, "hoek": { "version": "2.16.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", "dev": true }, "http-signature": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "optional": true, "requires": { @@ -8084,7 +8072,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "1.4.0", @@ -8093,18 +8082,21 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "1.0.1" @@ -8112,24 +8104,28 @@ }, "is-typedarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true, "optional": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isstream": { "version": "0.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true, "optional": true }, "jodid25519": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", "dev": true, "optional": true, "requires": { @@ -8138,19 +8134,22 @@ }, "jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true, "optional": true }, "json-schema": { "version": "0.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true, "optional": true }, "json-stable-stringify": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "optional": true, "requires": { @@ -8159,19 +8158,22 @@ }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true, "optional": true }, "jsonify": { "version": "0.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true, "optional": true }, "jsprim": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", "dev": true, "optional": true, "requires": { @@ -8183,7 +8185,8 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } @@ -8191,12 +8194,14 @@ }, "mime-db": { "version": "1.27.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", "dev": true }, "mime-types": { "version": "2.1.15", - "bundled": true, + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", "dev": true, "requires": { "mime-db": "1.27.0" @@ -8204,7 +8209,8 @@ }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "1.1.7" @@ -8212,12 +8218,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -8225,13 +8233,15 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "node-pre-gyp": { "version": "0.6.36", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", "dev": true, "optional": true, "requires": { @@ -8248,7 +8258,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -8258,7 +8269,8 @@ }, "npmlog": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", + "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==", "dev": true, "optional": true, "requires": { @@ -8270,24 +8282,28 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "oauth-sign": { "version": "0.8.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1.0.2" @@ -8295,19 +8311,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", "dev": true, "optional": true, "requires": { @@ -8317,35 +8336,41 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "performance-now": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", "dev": true, "optional": true }, "process-nextick-args": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "punycode": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true, "optional": true }, "qs": { "version": "6.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", "dev": true, "optional": true }, "rc": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", "dev": true, "optional": true, "requires": { @@ -8357,7 +8382,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -8365,7 +8391,8 @@ }, "readable-stream": { "version": "2.2.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", "dev": true, "requires": { "buffer-shims": "1.0.0", @@ -8379,7 +8406,8 @@ }, "request": { "version": "2.81.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "dev": true, "optional": true, "requires": { @@ -8409,7 +8437,8 @@ }, "rimraf": { "version": "2.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "dev": true, "requires": { "glob": "7.1.2" @@ -8417,30 +8446,35 @@ }, "safe-buffer": { "version": "5.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", "dev": true }, "semver": { "version": "5.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "sntp": { "version": "1.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "optional": true, "requires": { @@ -8449,7 +8483,8 @@ }, "sshpk": { "version": "1.13.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=", "dev": true, "optional": true, "requires": { @@ -8466,23 +8501,17 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } } }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "1.1.0", @@ -8490,15 +8519,26 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, "stringstream": { "version": "0.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", "dev": true, "optional": true }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "2.1.1" @@ -8506,13 +8546,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { "block-stream": "0.0.9", @@ -8522,7 +8564,8 @@ }, "tar-pack": { "version": "3.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", + "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", "dev": true, "optional": true, "requires": { @@ -8538,7 +8581,8 @@ }, "tough-cookie": { "version": "2.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "dev": true, "optional": true, "requires": { @@ -8547,7 +8591,8 @@ }, "tunnel-agent": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "optional": true, "requires": { @@ -8556,30 +8601,35 @@ }, "tweetnacl": { "version": "0.14.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true, "optional": true }, "uid-number": { "version": "0.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true, "optional": true }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "uuid": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", "dev": true, "optional": true }, "verror": { "version": "1.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "dev": true, "optional": true, "requires": { @@ -8588,7 +8638,8 @@ }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, "requires": { @@ -8597,7 +8648,8 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true } } @@ -8978,7 +9030,8 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true }, "globby": { "version": "5.0.0", @@ -9437,17 +9490,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" } }, - "home-path": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.5.tgz", - "integrity": "sha1-eIspgVsS1Tus9XVkhHbm+QQdEz8=", - "dev": true - }, "homedir-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", @@ -10085,6 +10133,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, "requires": { "number-is-nan": "1.0.1" } @@ -10724,7 +10773,8 @@ "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true }, "json-loader": { "version": "0.5.7", @@ -11194,6 +11244,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "requires": { "p-locate": "2.0.0", "path-exists": "3.0.0" @@ -11587,6 +11638,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", + "dev": true, "requires": { "pify": "2.3.0" } @@ -11962,6 +12014,12 @@ } } }, + "meteor-dapp-wallet-prebuilt": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/meteor-dapp-wallet-prebuilt/-/meteor-dapp-wallet-prebuilt-0.2.1.tgz", + "integrity": "sha512-8jbIPfDrv7LDvtuWYD85wHC1VOkOiqTOfDml6JI1Bmok7PLV6eErFOud/heopnSPqWf1m3Yn7NlPL2kvvAuQpg==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -14971,14 +15029,6 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -14989,6 +15039,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -15618,12 +15676,14 @@ "p-limit": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { "p-limit": "1.1.0" } @@ -15914,7 +15974,8 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", @@ -16071,6 +16132,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, "requires": { "find-up": "2.1.0" } @@ -16733,7 +16795,8 @@ "private": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=", + "dev": true }, "process": { "version": "0.11.10", @@ -17014,11 +17077,6 @@ "resolved": "https://registry.npmjs.org/qr-image/-/qr-image-3.2.0.tgz", "integrity": "sha1-n6gpW+rlDEoUnPn5CaHbRkqGcug=" }, - "qs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=" - }, "query-string": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", @@ -17475,17 +17533,6 @@ } } }, - "readable-stream": { - "version": "1.0.27-1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", - "integrity": "sha1-a2eYPCA1fO/QfwFlABoW1xDZEHg=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", @@ -17585,11 +17632,6 @@ } } }, - "reduce-component": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", - "integrity": "sha1-4Mk1QsV0UhvqE98PlIjtgqt3xdo=" - }, "reduce-css-calc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", @@ -17760,6 +17802,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, "requires": { "is-finite": "1.0.2" } @@ -18535,7 +18578,8 @@ "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true }, "slice-ansi": { "version": "0.0.4", @@ -18701,6 +18745,7 @@ "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, "requires": { "source-map": "0.5.7" } @@ -19169,11 +19214,6 @@ "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, - "storage2": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/storage2/-/storage2-0.1.0.tgz", - "integrity": "sha512-HNGFQFOr0+paYBbsAl9XO+YzM/LdS6CI9xI5aAfIu+9wL5NO3DK2YN8K0ha6LLJeYckSfyOA7jxWKHpyHF9zZw==" - }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", @@ -19377,11 +19417,6 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -19411,6 +19446,11 @@ "ipaddr.js": "1.4.0" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -19541,24 +19581,6 @@ "debug": "2.6.9" } }, - "superagent": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-1.8.5.tgz", - "integrity": "sha1-HA3cOvMOgOuE68BcshItqP6UC1U=", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.0.6", - "debug": "2.6.9", - "extend": "3.0.0", - "form-data": "1.0.0-rc3", - "formidable": "1.0.17", - "methods": "1.1.2", - "mime": "1.3.4", - "qs": "2.3.3", - "readable-stream": "1.0.27-1", - "reduce-component": "1.0.1" - } - }, "superagent-proxy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.2.tgz", @@ -19993,7 +20015,8 @@ "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true }, "to-iso-string": { "version": "0.0.2", @@ -20119,7 +20142,8 @@ "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true }, "truncate-utf8-bytes": { "version": "1.0.2", @@ -20191,11 +20215,6 @@ "is-typedarray": "1.0.0" } }, - "typeforce": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.11.5.tgz", - "integrity": "sha512-Glwf7h3CW1YaQrLVeNnMg6KumszBe4adBccF4Ukc8J3nkdgapEkpiMdoPTv3APoqMva3mNN4ZFklGaPNvRfiMQ==" - }, "ua-parser-js": { "version": "0.7.14", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.14.tgz", diff --git a/package.json b/package.json index a97bf798d65..c41361febb7 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,13 @@ "clean-session-store": "node ./tools/clean.js userData session-store-1", "clean-tp-data": "node ./tools/clean.js userData TrackingProtection.dat", "download-languages": "node ./tools/downloadLanguages", + "download-ethwallet": "node ./tools/downloadEthwallet", "download-sync-client": "node ./tools/downloadSyncClient", "electron-rebuild": "electron-rebuild", "flow": "flow; test $? -eq 0 -o $? -eq 2", "lint": "standard --verbose | snazzy", "lint-standard": "standard", - "postinstall": "npm run download-sync-client && webpack", + "postinstall": "npm run download-sync-client && npm run download-ethwallet && webpack", "pre-push-tests": "if [ -z $NO_PUSH_TESTS ]; then npm run unittest; fi", "start-log": "node ./tools/start.js --user-data-dir-name=brave-development --enable-logging=stderr --v=1 --enable-extension-activity-logging --enable-sandbox-logging --enable-dcheck", "start": "node ./tools/start.js --user-data-dir-name=brave-development --enable-logging --v=0 --enable-extension-activity-logging --enable-sandbox-logging --enable-dcheck", @@ -174,6 +175,7 @@ "less": "^2.5.3", "less-loader": "^2.2.1", "level": "^1.7.0", + "meteor-dapp-wallet-prebuilt": "^0.2.1", "mkdirp": "^0.5.1", "mocha": "^2.3.4", "mockery": "^2.1.0", diff --git a/test/unit/lib/appUrlUtilTest.js b/test/unit/lib/appUrlUtilTest.js index 12d13044ad3..a2bbec51568 100644 --- a/test/unit/lib/appUrlUtilTest.js +++ b/test/unit/lib/appUrlUtilTest.js @@ -37,6 +37,57 @@ describe('appUrlUtil test', function () { 'chrome-extension://fmdpfempfmekjkcfdehndghogpnpjeno/') }) }) + describe('getEthwalletExtUrl', function () { + it('arg', function () { + assert.equal(appUrlUtil.getEthwalletExtUrl('index.html'), + 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') + }) + it('no arg', function () { + assert.equal(appUrlUtil.getEthwalletExtUrl(), + 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/') + }) + }) + describe('getBaseUrl', function () { + it('no arg', function () { + assert.equal(appUrlUtil.getBaseUrl(), '') + }) + it('builtin URL', function () { + assert.equal(appUrlUtil.getBaseUrl('about:preferences#security?abc=123'), 'about:preferences') + assert.equal(appUrlUtil.getBaseUrl('about:preferences?abc=123'), 'about:preferences') + }) + it('ethwallet URL', function () { + assert.equal(appUrlUtil.getBaseUrl('about:ethwallet/test'), 'about:ethwallet') + assert.equal(appUrlUtil.getBaseUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/') + }) + }) + describe('getSourceAboutUrl', function () { + it('no arg', function () { + assert.equal(appUrlUtil.getSourceAboutUrl(), undefined) + }) + it('basic URL', function () { + assert.equal(appUrlUtil.getSourceAboutUrl('https://brave.com'), undefined) + }) + it('about URLs', function () { + assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html'), 'about:ethwallet/index.html') + assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/'), 'about:ethwallet') + assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html'), 'about:preferences') + assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html#security'), 'about:preferences#security') + }) + }) + describe('getTargetAboutUrl', function () { + it('no arg', function () { + assert.equal(appUrlUtil.getTargetAboutUrl(), undefined) + }) + it('basic URL', function () { + assert.equal(appUrlUtil.getTargetAboutUrl('https://brave.com'), undefined) + }) + it('aboutURLs', function () { + assert.equal(appUrlUtil.getTargetAboutUrl('about:blank'), 'chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-blank.html') + assert.equal(appUrlUtil.getTargetAboutUrl('about:preferences#test?123'), 'chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html#test?123') + assert.equal(appUrlUtil.getTargetAboutUrl('about:ethwallet'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') + assert.equal(appUrlUtil.getTargetAboutUrl('about:ethwallet/index.html'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') + }) + }) describe('aboutUrls', function () { it('about:about', function () { assert.equal(appUrlUtil.aboutUrls.get('about:about'), diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js new file mode 100644 index 00000000000..9f4c099cbd6 --- /dev/null +++ b/tools/downloadEthwallet.js @@ -0,0 +1,11 @@ +'use strict' + +const path = require('path') +const {removeSync, ensureDirSync, copySync} = require('fs-extra') + +const targetDirectory = path.resolve('app/extensions/ethwallet') + +removeSync(targetDirectory) +ensureDirSync(targetDirectory) +require('meteor-dapp-wallet-prebuilt').init(targetDirectory) +copySync(path.resolve('img/ethereum/'), targetDirectory) From 99fa4520bf72617d21c007fbf5acea76dcf43d31 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Fri, 16 Feb 2018 22:38:18 -0800 Subject: [PATCH 02/46] geth runs when wallet is enabled --- app/extensions.js | 5 +++++ package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index 1b4235d9ffd..1658b101250 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -17,6 +17,7 @@ const path = require('path') const l10n = require('../js/l10n') const {bravifyText} = require('./renderer/lib/extensionsUtil') const {componentUpdater, session} = require('electron') +const {spawn} = require('child_process'); // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' @@ -560,6 +561,10 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { + var geth = spawn('geth', ['--rpc', '--rpccorsdomain', '"chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp"']); + geth.stdout.on('data', (data) => { + console.warn(data.toString()); + }); extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') } else { diff --git a/package.json b/package.json index c41361febb7..f7e30464701 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,8 @@ "bat-client": "^2.0.7", "bat-publisher": "^2.0.3", "bignumber.js": "^4.0.4", - "bloodhound-js": "brave/bloodhound", + "bloodhound-js": "github:brave/bloodhound", + "child_process": "^1.0.2", "clipboard-copy": "^1.0.0", "compare-versions": "^3.0.1", "date-fns": "^1.29.0", From 7c46a0bef322d5f5e931e497855e9d0b49359316 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Fri, 16 Feb 2018 22:43:35 -0800 Subject: [PATCH 03/46] lint errors --- app/extensions.js | 8 ++++---- js/lib/appUrlUtil.js | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 1658b101250..da3e692104c 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -17,7 +17,7 @@ const path = require('path') const l10n = require('../js/l10n') const {bravifyText} = require('./renderer/lib/extensionsUtil') const {componentUpdater, session} = require('electron') -const {spawn} = require('child_process'); +const {spawn} = require('child_process') // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' @@ -561,10 +561,10 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { - var geth = spawn('geth', ['--rpc', '--rpccorsdomain', '"chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp"']); + var geth = spawn('geth', ['--rpc', '--rpccorsdomain', '"chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp"']) geth.stdout.on('data', (data) => { - console.warn(data.toString()); - }); + console.warn(data.toString()) + }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') } else { diff --git a/js/lib/appUrlUtil.js b/js/lib/appUrlUtil.js index f695ec5f2ba..e44d20bad58 100644 --- a/js/lib/appUrlUtil.js +++ b/js/lib/appUrlUtil.js @@ -6,7 +6,6 @@ const Immutable = require('immutable') const path = require('path') const UrlUtil = require('./urlutil') const config = require('../constants/config') -const urlParse = require('../../app/common/urlParse') const ethwalletOrigin = 'chrome-extension://' + config.ethwalletExtensionId + '/' @@ -285,7 +284,6 @@ function getPath (input) { } } - module.exports.navigatableTypes = ['http:', 'https:', 'about:', 'chrome:', 'chrome-extension:', 'chrome-devtools:', 'file:', 'view-source:', 'ftp:', 'magnet:'] /** From 00cdfdd884cf4ba23e141b0693cb7ae940b80ce1 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 16 Feb 2018 22:57:48 -0800 Subject: [PATCH 04/46] move UI into a browserAction --- app/browser/tabs.js | 2 +- app/extensions.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/browser/tabs.js b/app/browser/tabs.js index b5e0da8b6c4..067d4d7fbdc 100644 --- a/app/browser/tabs.js +++ b/app/browser/tabs.js @@ -626,7 +626,7 @@ const api = { // forget last active trail in window tab // is detaching from const oldTab = getTabValue(oldTabId) - const detachedFromWindowId = oldTab.get('windowId') + const detachedFromWindowId = oldTab ? oldTab.get('windowId') : undefined if (detachedFromWindowId != null) { activeTabHistory.clearTabFromWindow(detachedFromWindowId, oldTabId) } diff --git a/app/extensions.js b/app/extensions.js index da3e692104c..509b6382b28 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -294,6 +294,14 @@ let generateEthwalletManifest = () => { 48: 'ethereum-48.png', 16: 'ethereum-16.png' }, + browser_action: { + default_icon: { + 38: 'ethereum-48.png', + 19: 'ethereum-16.png' + }, + default_popup: 'index.html', + default_title: 'Ethereum Wallet' + }, incognito: 'split', key: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzrdMUtpj4PkN7uoeRC7pXsJyNC65iCWJObISzDQ/mCXerD3ATL54Y8TCkE1mS9O2tiZFY+og4g0GqLjT/M9GJ/Rjlj6cQqIaa9MnQ65H789V6rqPlTQyrd3udIylPJbr5aJ9RvuMcX8BKpT7SKcYvRSwZblKQ/OZ/a/5ylfM+QPyS5ZzooEq921I8eB4JF80aic/3cdU+Xmpyo/jdEe804/MemQ6kqlErXdNaFVU7fQ3lvCzWWcI+I3A1QbKSC2+G1HiToxllxU1gv+rAOsoHYwSkL2ZBTPkvnVBuV5vTS91GF3jGF9TMbw4m3TRNPJZkU32nfJy2JNaa1Ssnws+bQIDAQAB' } From aebc91e5147fcdfb334dea461aef849617b58734 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Fri, 16 Feb 2018 23:07:13 -0800 Subject: [PATCH 05/46] fixed args for spawn --- app/extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index da3e692104c..32925a92a1b 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -561,7 +561,7 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { - var geth = spawn('geth', ['--rpc', '--rpccorsdomain', '"chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp"']) + var geth = spawn('geth', ['--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp']) geth.stdout.on('data', (data) => { console.warn(data.toString()) }) From 9e09bb3b3d9def326319fb7b26dfc0319b64507b Mon Sep 17 00:00:00 2001 From: eV Date: Sat, 17 Feb 2018 07:18:28 +0000 Subject: [PATCH 06/46] Add tooling for upgrading geth, bundling --- .gitignore | 3 + app/extensions.js | 2 +- gethBinaries.json | 115 +++++++++++ package-lock.json | 399 +++++++++++++++++++++++++++++++------ package.json | 1 + tools/downloadEthwallet.js | 12 ++ tools/updateGeth.py | 158 +++++++++++++++ 7 files changed, 626 insertions(+), 64 deletions(-) create mode 100644 gethBinaries.json create mode 100644 tools/updateGeth.py diff --git a/.gitignore b/.gitignore index 97f128815fa..61e75f9e3de 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,6 @@ app/extensions/brave/content/scripts/sync.js # script used for signing for widevine signature_generator.py + +# geth binary download +app/Geth diff --git a/app/extensions.js b/app/extensions.js index b505cf4eeef..d7c0345f37a 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -569,7 +569,7 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { - var geth = spawn('geth', ['--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp']) + var geth = spawn(path.join(__dirname, 'Geth/unpacked/geth'), ['--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp']) geth.stdout.on('data', (data) => { console.warn(data.toString()) }) diff --git a/gethBinaries.json b/gethBinaries.json new file mode 100644 index 00000000000..5488bd30f72 --- /dev/null +++ b/gethBinaries.json @@ -0,0 +1,115 @@ +{ + "clients": { + "Geth": { + "platforms": { + "linux": { + "ia32": { + "bin": "geth", + "commands": { + "sanity": { + "args": [ + "version" + ], + "output": [ + "Geth", + "1.8.0" + ] + } + }, + "download": { + "bin": "geth-linux-386-1.8.0-5f540757/geth", + "sha256": "0e93dc1a730cfea24f3b33c151b515055b450e70552e069bd7337f865f0aceb5", + "type": "tar", + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-1.8.0-5f540757.tar.gz" + } + }, + "x64": { + "bin": "geth", + "commands": { + "sanity": { + "args": [ + "version" + ], + "output": [ + "Geth", + "1.8.0" + ] + } + }, + "download": { + "bin": "geth-linux-amd64-1.8.0-5f540757/geth", + "sha256": "58b4264340eb8aac496cca284f25525620f35292e388f4d4b2961a1e9b062315", + "type": "tar", + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.0-5f540757.tar.gz" + } + } + }, + "mac": { + "x64": { + "bin": "geth", + "commands": { + "sanity": { + "args": [ + "version" + ], + "output": [ + "Geth", + "1.8.0" + ] + } + }, + "download": { + "bin": "geth-darwin-amd64-1.8.0-5f540757/geth", + "sha256": "4d5cf36f64b9e131b9b550144abe0b82dc57028da2e97bf435583f2091d790ea", + "type": "tar", + "url": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.8.0-5f540757.tar.gz" + } + } + }, + "win": { + "ia32": { + "bin": "geth.exe", + "commands": { + "sanity": { + "args": [ + "version" + ], + "output": [ + "Geth", + "1.8.0" + ] + } + }, + "download": { + "bin": "geth-windows-386-1.8.0-5f540757\\geth.exe", + "sha256": "efd7174fb624b4633a1a4185c6cbed9d9db03e4b9169d66379a3e9d79883d0f0", + "type": "zip", + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-1.8.0-5f540757.zip" + } + }, + "x64": { + "bin": "geth.exe", + "commands": { + "sanity": { + "args": [ + "version" + ], + "output": [ + "Geth", + "1.8.0" + ] + } + }, + "download": { + "bin": "geth-windows-amd64-1.8.0-5f540757\\geth.exe", + "sha256": "34c00bd6764880f737ea6550b7602d97e33fd75b4d08661366f7c507912f6106", + "type": "zip", + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.8.0-5f540757.zip" + } + } + } + }, + "version": "1.8.0" + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 20080138394..39864c2e95c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -722,7 +722,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", - "dev": true, "requires": { "babel-code-frame": "6.26.0", "babel-generator": "6.26.0", @@ -761,7 +760,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", - "dev": true, "requires": { "babel-messages": "6.23.0", "babel-runtime": "6.26.0", @@ -915,7 +913,6 @@ "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, "requires": { "babel-runtime": "6.26.0", "babel-template": "6.26.0" @@ -925,7 +922,6 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz", "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==", - "dev": true, "requires": { "find-cache-dir": "1.0.0", "loader-utils": "1.1.0", @@ -936,7 +932,6 @@ "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, "requires": { "babel-runtime": "6.26.0" } @@ -1443,7 +1438,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, "requires": { "babel-core": "6.26.0", "babel-runtime": "6.26.0", @@ -1467,7 +1461,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, "requires": { "babel-runtime": "6.26.0", "babel-traverse": "6.26.0", @@ -1480,7 +1473,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, "requires": { "babel-code-frame": "6.26.0", "babel-messages": "6.23.0", @@ -1497,7 +1489,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", @@ -1508,8 +1499,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, "balanced-match": { "version": "1.0.0", @@ -2263,6 +2253,18 @@ } } }, + "bloodhound-js": { + "version": "github:brave/bloodhound#03555132b049adcb5a09138aa911acc3b4d3af7c", + "requires": { + "babel-core": "6.26.0", + "babel-loader": "7.1.2", + "es6-promise": "3.3.1", + "immutable": "3.8.1", + "object-assign": "4.1.1", + "storage2": "0.1.0", + "superagent": "1.8.5" + } + }, "bluebird": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", @@ -2696,6 +2698,37 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, + "buffered-spawn": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/buffered-spawn/-/buffered-spawn-3.3.2.tgz", + "integrity": "sha1-l7mEbE5EaqIzILSpTFIJ7dMtrLs=", + "dev": true, + "requires": { + "cross-spawn": "4.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "which": "1.3.0" + } + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + } + } + }, "buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", @@ -3445,8 +3478,7 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "compact2string": { "version": "1.4.0", @@ -3665,8 +3697,7 @@ "convert-source-map": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", - "dev": true + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" }, "cookie": { "version": "0.3.1", @@ -5075,7 +5106,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, "requires": { "repeating": "2.0.1" } @@ -6023,6 +6053,25 @@ "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-0.6.1.tgz", "integrity": "sha1-xOJow4puQvQN5WGPyQbR7WCPEao=" }, + "electron-osx-sign": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.3.2.tgz", + "integrity": "sha1-iPp9brrbXZx5NouWSRoNjEYwFG4=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "run-series": "1.1.4" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "electron-packager": { "version": "github:brave/electron-packager#0dcbc2d5b56b058e8ee9a2ec1f43f96d94f4925e", "dev": true, @@ -6079,25 +6128,6 @@ "nugget": "1.6.2", "path-exists": "1.0.0", "rc": "1.2.1" - }, - "dependencies": { - "home-path": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.5.tgz", - "integrity": "sha1-eIspgVsS1Tus9XVkhHbm+QQdEz8=", - "dev": true - } - } - }, - "electron-osx-sign": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.3.2.tgz", - "integrity": "sha1-iPp9brrbXZx5NouWSRoNjEYwFG4=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "run-series": "1.1.4" } }, "fs-extra": { @@ -6194,6 +6224,69 @@ } } }, + "electron-prebuilt": { + "version": "github:brave/electron-prebuilt#e65e72f4bc7a8e7de160667f3eb3c2b22e3e395e", + "dev": true, + "requires": { + "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "extract-zip": "1.6.5" + }, + "dependencies": { + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } + } + }, "electron-squirrel-startup": { "version": "github:brave/electron-squirrel-startup#88d78fee0079d7bfce7e5238658e54e2e75550ef", "requires": { @@ -6820,6 +6913,33 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "ethereum-client-binaries": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/ethereum-client-binaries/-/ethereum-client-binaries-1.6.2.tgz", + "integrity": "sha1-f6ZfZV+HBkPvXiAu6ZAeQXnToT0=", + "dev": true, + "requires": { + "buffered-spawn": "3.3.2", + "got": "6.7.1", + "lodash.get": "4.4.2", + "lodash.isempty": "4.4.0", + "lodash.values": "4.3.0", + "mkdirp": "0.5.1", + "node-unzip-2": "0.2.1", + "tmp": "0.0.29" + }, + "dependencies": { + "tmp": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + } + } + }, "ethereumjs-abi": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.4.tgz", @@ -7274,7 +7394,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, "requires": { "commondir": "1.0.1", "make-dir": "1.0.0", @@ -7297,7 +7416,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, "requires": { "locate-path": "2.0.0" } @@ -7504,6 +7622,23 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, + "form-data": { + "version": "1.0.0-rc3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz", + "integrity": "sha1-01vGLn+8KTeuePlIqqDTjZBgdXc=", + "requires": { + "async": "1.5.2", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + } + } + }, "formatio": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", @@ -7513,6 +7648,11 @@ "samsam": "1.1.2" } }, + "formidable": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.17.tgz", + "integrity": "sha1-71SRSQ+UM7cF+qdyScmQKa40hVk=" + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -8136,8 +8276,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true + "dev": true }, "json-schema": { "version": "0.2.3", @@ -9030,8 +9169,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" }, "globby": { "version": "5.0.0", @@ -9490,12 +9628,17 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" } }, + "home-path": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.5.tgz", + "integrity": "sha1-eIspgVsS1Tus9XVkhHbm+QQdEz8=", + "dev": true + }, "homedir-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", @@ -10133,7 +10276,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, "requires": { "number-is-nan": "1.0.1" } @@ -10773,8 +10915,7 @@ "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" }, "json-loader": { "version": "0.5.7", @@ -11244,7 +11385,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, "requires": { "p-locate": "2.0.0", "path-exists": "3.0.0" @@ -11453,6 +11593,12 @@ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", "dev": true }, + "lodash.isempty": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", + "dev": true + }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", @@ -11568,6 +11714,12 @@ "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", "dev": true }, + "lodash.values": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-4.3.0.tgz", + "integrity": "sha1-o6bCsOvsxcLLocF+bmIP6BtT00c=", + "dev": true + }, "loglevel": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.5.0.tgz", @@ -11638,7 +11790,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", - "dev": true, "requires": { "pify": "2.3.0" } @@ -11687,6 +11838,16 @@ "node-emoji": "1.8.1" } }, + "match-stream": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", + "integrity": "sha1-mesFAJOzTf+t5CG5rAtBCpz6F88=", + "dev": true, + "requires": { + "buffers": "0.1.1", + "readable-stream": "1.0.34" + } + }, "math-expression-evaluator": { "version": "1.2.17", "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", @@ -12866,6 +13027,43 @@ "optimist": "0.6.1" } }, + "node-unzip-2": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-unzip-2/-/node-unzip-2-0.2.1.tgz", + "integrity": "sha1-jkoOWmj3sD0zuNxSuDqT0dADzdg=", + "dev": true, + "requires": { + "binary": "0.3.0", + "fstream": "0.1.31", + "match-stream": "0.0.2", + "pullstream": "0.4.1", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5" + }, + "dependencies": { + "fstream": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", + "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", + "dev": true, + "requires": { + "graceful-fs": "3.0.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "1.1.0" + } + } + } + }, "noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", @@ -15667,6 +15865,12 @@ "os-tmpdir": "1.0.2" } }, + "over": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz", + "integrity": "sha1-8phS5w/X4l82DgE6jsRMgq7bVwg=", + "dev": true + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -15676,14 +15880,12 @@ "p-limit": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", - "dev": true + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, "requires": { "p-limit": "1.1.0" } @@ -15974,8 +16176,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -16132,7 +16333,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, "requires": { "find-up": "2.1.0" } @@ -16795,8 +16995,7 @@ "private": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=", - "dev": true + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" }, "process": { "version": "0.11.10", @@ -17034,6 +17233,18 @@ "randombytes": "2.0.5" } }, + "pullstream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz", + "integrity": "sha1-1vs79a7Wl+gxFQ6xACwlo/iuExQ=", + "dev": true, + "requires": { + "over": "0.0.5", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5", + "slice-stream": "1.0.0" + } + }, "pump": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", @@ -17077,6 +17288,11 @@ "resolved": "https://registry.npmjs.org/qr-image/-/qr-image-3.2.0.tgz", "integrity": "sha1-n6gpW+rlDEoUnPn5CaHbRkqGcug=" }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=" + }, "query-string": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", @@ -17533,6 +17749,18 @@ } } }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", @@ -17632,6 +17860,11 @@ } } }, + "reduce-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", + "integrity": "sha1-4Mk1QsV0UhvqE98PlIjtgqt3xdo=" + }, "reduce-css-calc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", @@ -17802,7 +18035,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, "requires": { "is-finite": "1.0.2" } @@ -18578,8 +18810,7 @@ "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, "slice-ansi": { "version": "0.0.4", @@ -18587,6 +18818,15 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, + "slice-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", + "integrity": "sha1-WzO9ZvATsaf4ZGCwPUY97DmtPqA=", + "dev": true, + "requires": { + "readable-stream": "1.0.34" + } + }, "smart-buffer": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", @@ -18745,7 +18985,6 @@ "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, "requires": { "source-map": "0.5.7" } @@ -19214,6 +19453,11 @@ "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, + "storage2": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/storage2/-/storage2-0.1.0.tgz", + "integrity": "sha512-HNGFQFOr0+paYBbsAl9XO+YzM/LdS6CI9xI5aAfIu+9wL5NO3DK2YN8K0ha6LLJeYckSfyOA7jxWKHpyHF9zZw==" + }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", @@ -19581,6 +19825,37 @@ "debug": "2.6.9" } }, + "superagent": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-1.8.5.tgz", + "integrity": "sha1-HA3cOvMOgOuE68BcshItqP6UC1U=", + "requires": { + "component-emitter": "1.2.1", + "cookiejar": "2.0.6", + "debug": "2.6.9", + "extend": "3.0.0", + "form-data": "1.0.0-rc3", + "formidable": "1.0.17", + "methods": "1.1.2", + "mime": "1.3.4", + "qs": "2.3.3", + "readable-stream": "1.0.27-1", + "reduce-component": "1.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.27-1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "integrity": "sha1-a2eYPCA1fO/QfwFlABoW1xDZEHg=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, "superagent-proxy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.2.tgz", @@ -20015,8 +20290,7 @@ "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" }, "to-iso-string": { "version": "0.0.2", @@ -20142,8 +20416,7 @@ "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "truncate-utf8-bytes": { "version": "1.0.2", diff --git a/package.json b/package.json index f7e30464701..eedba8f846c 100644 --- a/package.json +++ b/package.json @@ -163,6 +163,7 @@ "empty-port": "0.0.2", "enzyme": "^2.9.1", "eslint-plugin-flowtype": "^2.40.1", + "ethereum-client-binaries": "^1.6.2", "flow-bin": "^0.53.1", "font-awesome-webpack": "~0.0.4", "git-rev-sync": "^1.8.0", diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js index 9f4c099cbd6..198a300e82b 100644 --- a/tools/downloadEthwallet.js +++ b/tools/downloadEthwallet.js @@ -1,5 +1,6 @@ 'use strict' +const fs = require('fs') const path = require('path') const {removeSync, ensureDirSync, copySync} = require('fs-extra') @@ -9,3 +10,14 @@ removeSync(targetDirectory) ensureDirSync(targetDirectory) require('meteor-dapp-wallet-prebuilt').init(targetDirectory) copySync(path.resolve('img/ethereum/'), targetDirectory) + +const Manager = require('ethereum-client-binaries').Manager +const clientBinaries = fs.readFileSync('gethBinaries.json') +const config = JSON.parse(clientBinaries) +const mgr = new Manager(config) +mgr.init() +.then(() => { + mgr.download('Geth', { + downloadFolder: './app/' + }) +}) diff --git a/tools/updateGeth.py b/tools/updateGeth.py new file mode 100644 index 00000000000..42f7ae647d7 --- /dev/null +++ b/tools/updateGeth.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python + +import hashlib +import json +import os +import subprocess +import tempfile +import urllib2 + +GETH_MANAGER_CONFIG_PATH = 'gethBinaries.json' +RELEASE_URL = 'https://api.github.com/repos/ethereum/go-ethereum/releases/latest' +COMMIT_URL = 'https://api.github.com/repos/ethereum/go-ethereum/commits/%s' +PLATFORMS_TEMPLATE = { + "linux": { + "x64": { + "download": { + "baseurl": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-{version}-{sha}.{suffix}", + "type": "tar" + }, + "bin": "geth" + }, + "ia32": { + "download": { + "baseurl": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-{version}-{sha}.{suffix}", + "type": "tar" + }, + "bin": "geth" + } + }, + "mac": { + "x64": { + "download": { + "baseurl": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-{version}-{sha}.{suffix}", + "type": "tar" + }, + "bin": "geth" + } + }, + "win": { + "x64": { + "download": { + "baseurl": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-{version}-{sha}.{suffix}", + "type": "zip" + }, + "bin": "geth.exe" + }, + "ia32": { + "download": { + "baseurl": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-{version}-{sha}.{suffix}", + "type": "zip" + }, + "bin": "geth.exe" + } + } +} +SUFFIX = { + 'tar': 'tar.gz', + 'zip': 'zip' +} + +# key_ids = ['0xA61A13569BA28146', '0x558915E17B9E2481', '0x9417309ED2A67EAC'] +# for key_id in key_ids: + # subprocess.check_call(['gpg', '--keyserver', 'keyserver.ubuntu.com', '--recv', key_id]) +# os.exit() + +print('Fetching latest release...') + +req = urllib2.Request(RELEASE_URL) +resp = urllib2.urlopen(req) +latest = json.load(resp) +tag = latest['tag_name'] + +if tag[0] != 'v': + os.exit("Invalid tag") +version = tag[1:] + +print('Version %s available' % version) +print('Fetching associated commit sha') + +req = urllib2.Request(COMMIT_URL % tag) +resp = urllib2.urlopen(req) +commit = json.load(resp) +sha = commit['sha'][:8] + +print('Version %s has sha %s' % (version, sha)) + +platform_config = PLATFORMS_TEMPLATE +for platform in platform_config.keys(): + ossep = '/' + if platform == 'win': + ossep = '\\' + + for arch in platform_config[platform].keys(): + plat_arch_template = platform_config[platform][arch] + + download_info = { 'type': plat_arch_template['download']['type'] } + + download_info['url'] = plat_arch_template['download']['baseurl'].format( + version=version, + sha=sha, + suffix=SUFFIX[plat_arch_template['download']['type']] + ) + + archive_name = download_info['url'].split('/')[-1] + archive_folder, ext = os.path.splitext(archive_name) + if ext == '.gz': + archive_folder, _ = os.path.splitext(archive_folder) + download_info['bin'] = ossep.join((archive_folder, plat_arch_template['bin'])) + + outfd, temp_geth_path = tempfile.mkstemp() + with os.fdopen(outfd, 'w') as temp_geth: + print('Downloading %s...' % download_info['url']) + + req = urllib2.Request(download_info['url']) + resp = urllib2.urlopen(req) + geth_body = resp.read() + + sha256 = hashlib.sha256() + sha256.update(geth_body) + geth_sha256 = sha256.hexdigest() + + temp_geth.write(geth_body) + temp_geth.flush() + + outfd2, temp_geth_asc_path = tempfile.mkstemp() + with os.fdopen(outfd2, 'w') as temp_geth_asc: + asc_url = '%s.asc' % download_info['url'] + print('Downloading %s...' % asc_url) + + req = urllib2.Request(asc_url) + resp = urllib2.urlopen(req) + geth_asc_body = resp.read() + + temp_geth_asc.write(geth_asc_body) + temp_geth_asc.flush() + + print('Verifying signature...') + subprocess.check_call(['gpg', '--verify', temp_geth_asc_path, temp_geth_path]) + download_info['sha256'] = geth_sha256 + + platform_config[platform][arch]['download'] = download_info + platform_config[platform][arch]['commands'] = { + 'sanity': { + 'args': [ 'version' ], + 'output': [ 'Geth', version ] + } + } + +print("Writing %s" % GETH_MANAGER_CONFIG_PATH) +with open(GETH_MANAGER_CONFIG_PATH, 'w') as f: + json.dump( + { 'clients': { 'Geth': { 'platforms': platform_config, 'version': version } } }, + f, + sort_keys=True, + indent=4, + separators=(',', ': '), + ) +print("Done!") From 166cc16d797c69990f0c76172cdff204211cfb1a Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 16 Feb 2018 23:51:25 -0800 Subject: [PATCH 07/46] style fixes --- app/renderer/components/main/popupWindow.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/renderer/components/main/popupWindow.js b/app/renderer/components/main/popupWindow.js index a3c0723de49..1ba02124c9b 100644 --- a/app/renderer/components/main/popupWindow.js +++ b/app/renderer/components/main/popupWindow.js @@ -47,8 +47,22 @@ class PopupWindow extends React.Component { }) webview.addEventListener('did-attach', () => { webview.enablePreferredSizeMode(true) + if (this.isWalletPopup) { + webview.style.height = '750px' + webview.style.width = '800px' + windowActions.setPopupWindowDetail(Immutable.fromJS({ + left: this.props.left, + top: this.props.top, + height: 750, + width: 800, + src: this.props.src + })) + } }) webview.addEventListener('preferred-size-changed', () => { + if (this.isWalletPopup) { + return + } webview.getPreferredSize((preferredSize) => { const width = preferredSize.width const height = preferredSize.height @@ -74,6 +88,10 @@ class PopupWindow extends React.Component { } } + get isWalletPopup () { + return this.props.src && this.props.src.startsWith('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/') + } + mergeProps (state, ownProps) { const currentWindow = state.get('currentWindow') const detail = currentWindow.get('popupWindowDetail', Immutable.Map()) @@ -142,6 +160,7 @@ const styles = StyleSheet.create({ padding: 0, position: 'absolute', userSelect: 'none', + overflowY: 'auto', zIndex: globalStyles.zindex.zindexPopupWindow }, From e94bb0ff9f80b152c69490c2605c3481b058f42d Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 00:30:44 -0800 Subject: [PATCH 08/46] exit issue --- app/extensions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/extensions.js b/app/extensions.js index d7c0345f37a..7dd9bbffb29 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -573,6 +573,13 @@ module.exports.init = () => { geth.stdout.on('data', (data) => { console.warn(data.toString()) }) + geth.on('exit', function (code, signal) { + geth.stdout.destroy(); + }); + geth.on('close', function (code, signal) { + geth.stdout.destroy(); + }); + extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') } else { From 84628d152831f84be4bc60726c86fc64e46202b6 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 00:32:17 -0800 Subject: [PATCH 09/46] lint issue --- app/extensions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 7dd9bbffb29..dbe2631c6f7 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -574,11 +574,11 @@ module.exports.init = () => { console.warn(data.toString()) }) geth.on('exit', function (code, signal) { - geth.stdout.destroy(); - }); + geth.stdout.destroy() + }) geth.on('close', function (code, signal) { - geth.stdout.destroy(); - }); + geth.stdout.destroy() + }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') From 821fcde3492f0d58ca2f5b0500aaa9691e1cbbc1 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 00:33:00 -0800 Subject: [PATCH 10/46] lint issue --- app/extensions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index dbe2631c6f7..8d511ac4e3d 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -578,8 +578,7 @@ module.exports.init = () => { }) geth.on('close', function (code, signal) { geth.stdout.destroy() - }) - + }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') } else { From b66ce0ee4af3cf684a8391b33a712a89f6e6a47d Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 00:33:36 -0800 Subject: [PATCH 11/46] lint issue --- app/extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index 8d511ac4e3d..09d6f5bb3b2 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -578,7 +578,7 @@ module.exports.init = () => { }) geth.on('close', function (code, signal) { geth.stdout.destroy() - }) + }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') } else { From d54b1139e6551e8cfc572636d07651a8e0f26b9c Mon Sep 17 00:00:00 2001 From: eV Date: Sat, 17 Feb 2018 19:27:05 +0000 Subject: [PATCH 12/46] add ETHEREUM_NETWORK env var to launch geth with --testnet --- app/extensions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index 09d6f5bb3b2..956760ad723 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -569,7 +569,11 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { - var geth = spawn(path.join(__dirname, 'Geth/unpacked/geth'), ['--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp']) + var gethArgs = ['--light', '--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp'] + if (process.env.ETHEREUM_NETWORK === 'ropsten') { + gethArgs.push('--testnet') + } + var geth = spawn(path.join(__dirname, 'Geth/unpacked/geth'), gethArgs) geth.stdout.on('data', (data) => { console.warn(data.toString()) }) From f4edf6448b9ffb12db9faf5b3d0359840091246c Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 11:08:28 -0800 Subject: [PATCH 13/46] update package-lock.json --- package-lock.json | 118 ++++++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39864c2e95c..f73de1e65ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3163,6 +3163,11 @@ "lodash.some": "4.6.0" } }, + "child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha1-sffn/HPSXn/R1FWtyU4UODAYK1o=" + }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", @@ -5980,6 +5985,61 @@ } } }, + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } + } + }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6230,61 +6290,6 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" - }, - "dependencies": { - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } } }, "electron-squirrel-startup": { @@ -8276,7 +8281,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "dev": true, + "optional": true }, "json-schema": { "version": "0.2.3", From 61a91a8dd0c2d5b5e841786ed74c4f9ae145f18c Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 12:06:46 -0800 Subject: [PATCH 14/46] add buttons to browserAction --- app/extensions.js | 2 +- app/extensions/brave/ethwallet-popup.html | 33 +++++++++++++++++++++ app/extensions/brave/ethwallet-popup.js | 14 +++++++++ app/renderer/components/main/popupWindow.js | 10 ++++--- tools/downloadEthwallet.js | 2 ++ 5 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 app/extensions/brave/ethwallet-popup.html create mode 100644 app/extensions/brave/ethwallet-popup.js diff --git a/app/extensions.js b/app/extensions.js index 956760ad723..22e2dc29c9b 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -299,7 +299,7 @@ let generateEthwalletManifest = () => { 38: 'ethereum-48.png', 19: 'ethereum-16.png' }, - default_popup: 'index.html', + default_popup: 'ethwallet-popup.html', default_title: 'Ethereum Wallet' }, incognito: 'split', diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html new file mode 100644 index 00000000000..00cc9550c6a --- /dev/null +++ b/app/extensions/brave/ethwallet-popup.html @@ -0,0 +1,33 @@ + + + + + + + + +

+
+ +
+
+ +
+
+ + diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js new file mode 100644 index 00000000000..c1554956593 --- /dev/null +++ b/app/extensions/brave/ethwallet-popup.js @@ -0,0 +1,14 @@ +const ipc = window.chrome.ipcRenderer + +const doAction = (message, args) => { + args.actionType = message + ipc.send('dispatch-action', JSON.stringify([args])) +} + +document.getElementById('openEthwallet').onclick = () => { + doAction('app-create-tab-requested', { + createProperties: { + url: window.location.origin + '/index.html' + } + }) +} diff --git a/app/renderer/components/main/popupWindow.js b/app/renderer/components/main/popupWindow.js index 1ba02124c9b..01a462ce34b 100644 --- a/app/renderer/components/main/popupWindow.js +++ b/app/renderer/components/main/popupWindow.js @@ -48,13 +48,15 @@ class PopupWindow extends React.Component { webview.addEventListener('did-attach', () => { webview.enablePreferredSizeMode(true) if (this.isWalletPopup) { - webview.style.height = '750px' - webview.style.width = '800px' + const height = 120 + const width = 280 + webview.style.height = height + 'px' + webview.style.width = width + 'px' windowActions.setPopupWindowDetail(Immutable.fromJS({ left: this.props.left, top: this.props.top, - height: 750, - width: 800, + height, + width, src: this.props.src })) } diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js index 198a300e82b..b0381e46277 100644 --- a/tools/downloadEthwallet.js +++ b/tools/downloadEthwallet.js @@ -10,6 +10,8 @@ removeSync(targetDirectory) ensureDirSync(targetDirectory) require('meteor-dapp-wallet-prebuilt').init(targetDirectory) copySync(path.resolve('img/ethereum/'), targetDirectory) +copySync(path.resolve('app/extensions/brave/ethwallet-popup.html'), path.join(targetDirectory, 'ethwallet-popup.html')) +copySync(path.resolve('app/extensions/brave/ethwallet-popup.js'), path.join(targetDirectory, 'ethwallet-popup.js')) const Manager = require('ethereum-client-binaries').Manager const clientBinaries = fs.readFileSync('gethBinaries.json') From 9a8da0c73176b5cfa228b566ca1ea4dec666eb10 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 12:47:10 -0800 Subject: [PATCH 15/46] fix about:ethwallet paths with more than one slash --- js/lib/appUrlUtil.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/lib/appUrlUtil.js b/js/lib/appUrlUtil.js index e44d20bad58..db79d6e5870 100644 --- a/js/lib/appUrlUtil.js +++ b/js/lib/appUrlUtil.js @@ -126,7 +126,7 @@ module.exports.aboutUrls = new Immutable.Map({ 'about:styles': module.exports.getBraveExtUrl('about-styles.html'), 'about:contributions': module.exports.getBraveExtUrl('about-contributions.html'), 'about:welcome': module.exports.getBraveExtUrl('about-welcome.html'), - 'about:ethwallet': module.exports.getEthwalletExtUrl('') + 'about:ethwallet': ethwalletOrigin }) module.exports.isIntermediateAboutPage = (location) => @@ -277,8 +277,8 @@ function getPath (input) { if (typeof input !== 'string') { return '' } - if (input.startsWith('about:ethwallet')) { - return input.split('/')[1] + if (input.startsWith('about:ethwallet/')) { + return input.split('about:ethwallet/')[1] } else if (input.startsWith(ethwalletOrigin)) { return input.split(ethwalletOrigin)[1] } From 994baaabe40ad25c5b18f7cddfef894b4d7019ba Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 13:49:10 -0800 Subject: [PATCH 16/46] separate geth download from tools/downloadEthwallet --- package.json | 3 ++- tools/downloadEthwallet.js | 11 ----------- tools/downloadGeth.js | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 tools/downloadGeth.js diff --git a/package.json b/package.json index eedba8f846c..4cfe0fcb260 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,13 @@ "clean-tp-data": "node ./tools/clean.js userData TrackingProtection.dat", "download-languages": "node ./tools/downloadLanguages", "download-ethwallet": "node ./tools/downloadEthwallet", + "download-geth": "node ./tools/downloadGeth", "download-sync-client": "node ./tools/downloadSyncClient", "electron-rebuild": "electron-rebuild", "flow": "flow; test $? -eq 0 -o $? -eq 2", "lint": "standard --verbose | snazzy", "lint-standard": "standard", - "postinstall": "npm run download-sync-client && npm run download-ethwallet && webpack", + "postinstall": "npm run download-sync-client && npm run download-ethwallet && npm run download-geth && webpack", "pre-push-tests": "if [ -z $NO_PUSH_TESTS ]; then npm run unittest; fi", "start-log": "node ./tools/start.js --user-data-dir-name=brave-development --enable-logging=stderr --v=1 --enable-extension-activity-logging --enable-sandbox-logging --enable-dcheck", "start": "node ./tools/start.js --user-data-dir-name=brave-development --enable-logging --v=0 --enable-extension-activity-logging --enable-sandbox-logging --enable-dcheck", diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js index b0381e46277..de1560cbd43 100644 --- a/tools/downloadEthwallet.js +++ b/tools/downloadEthwallet.js @@ -12,14 +12,3 @@ require('meteor-dapp-wallet-prebuilt').init(targetDirectory) copySync(path.resolve('img/ethereum/'), targetDirectory) copySync(path.resolve('app/extensions/brave/ethwallet-popup.html'), path.join(targetDirectory, 'ethwallet-popup.html')) copySync(path.resolve('app/extensions/brave/ethwallet-popup.js'), path.join(targetDirectory, 'ethwallet-popup.js')) - -const Manager = require('ethereum-client-binaries').Manager -const clientBinaries = fs.readFileSync('gethBinaries.json') -const config = JSON.parse(clientBinaries) -const mgr = new Manager(config) -mgr.init() -.then(() => { - mgr.download('Geth', { - downloadFolder: './app/' - }) -}) diff --git a/tools/downloadGeth.js b/tools/downloadGeth.js new file mode 100644 index 00000000000..205a746bf91 --- /dev/null +++ b/tools/downloadGeth.js @@ -0,0 +1,14 @@ +'use strict' + +const fs = require('fs') + +const Manager = require('ethereum-client-binaries').Manager +const clientBinaries = fs.readFileSync('gethBinaries.json') +const config = JSON.parse(clientBinaries) +const mgr = new Manager(config) +mgr.init() +.then(() => { + mgr.download('Geth', { + downloadFolder: './app/' + }) +}) From d3729f49fb7ae1a19a2cedd8d0952d71f965b851 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 15:08:59 -0800 Subject: [PATCH 17/46] update meteor-dapp-wallet-prebuilt --- package-lock.json | 116 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index f73de1e65ad..669b3c0ae0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5985,61 +5985,6 @@ } } }, - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } - } - }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6290,6 +6235,61 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" + }, + "dependencies": { + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } } }, "electron-squirrel-startup": { @@ -12182,9 +12182,9 @@ } }, "meteor-dapp-wallet-prebuilt": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/meteor-dapp-wallet-prebuilt/-/meteor-dapp-wallet-prebuilt-0.2.1.tgz", - "integrity": "sha512-8jbIPfDrv7LDvtuWYD85wHC1VOkOiqTOfDml6JI1Bmok7PLV6eErFOud/heopnSPqWf1m3Yn7NlPL2kvvAuQpg==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/meteor-dapp-wallet-prebuilt/-/meteor-dapp-wallet-prebuilt-0.2.2.tgz", + "integrity": "sha512-NpMzazshCKGMx2qm4JdBtUjxEbyXLywxWfCNB85mBRiWU817kjkFdOX7SONKsIcJYpqTsVwtkrCp6VQn+A+/Wg==", "dev": true }, "methods": { diff --git a/package.json b/package.json index 4cfe0fcb260..3c9b2da144d 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "less": "^2.5.3", "less-loader": "^2.2.1", "level": "^1.7.0", - "meteor-dapp-wallet-prebuilt": "^0.2.1", + "meteor-dapp-wallet-prebuilt": "0.2.2", "mkdirp": "^0.5.1", "mocha": "^2.3.4", "mockery": "^2.1.0", From daab0dd2c058efe4eb2eb27a14ef167ea8b66c96 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 15:12:19 -0800 Subject: [PATCH 18/46] remove ethwallet about: url mapping --- js/lib/appUrlUtil.js | 56 ++++----------------------------- test/unit/lib/appUrlUtilTest.js | 18 ----------- 2 files changed, 6 insertions(+), 68 deletions(-) diff --git a/js/lib/appUrlUtil.js b/js/lib/appUrlUtil.js index db79d6e5870..3543b9c83f3 100644 --- a/js/lib/appUrlUtil.js +++ b/js/lib/appUrlUtil.js @@ -7,8 +7,6 @@ const path = require('path') const UrlUtil = require('./urlutil') const config = require('../constants/config') -const ethwalletOrigin = 'chrome-extension://' + config.ethwalletExtensionId + '/' - module.exports.fileUrl = (filePath) => { // It's preferrable to call path.resolve but it's not available // because process.cwd doesn't exist in renderers like in file URL @@ -57,14 +55,6 @@ module.exports.getTorrentExtUrl = function (relativeUrl) { return 'chrome-extension://' + config.torrentExtensionId + '/' + relativeUrl } -module.exports.getEthwalletExtUrl = function (relativeUrl) { - if (relativeUrl === undefined) { - relativeUrl = '' - } - - return ethwalletOrigin + relativeUrl -} - module.exports.getExtensionsPath = function (extensionDir) { return (process.env.NODE_ENV !== 'development' && process.env.NODE_ENV !== 'test') // the path is different for release builds because extensions are not in the asar file @@ -125,8 +115,7 @@ module.exports.aboutUrls = new Immutable.Map({ 'about:safebrowsing': module.exports.getBraveExtUrl('about-safebrowsing.html'), 'about:styles': module.exports.getBraveExtUrl('about-styles.html'), 'about:contributions': module.exports.getBraveExtUrl('about-contributions.html'), - 'about:welcome': module.exports.getBraveExtUrl('about-welcome.html'), - 'about:ethwallet': ethwalletOrigin + 'about:welcome': module.exports.getBraveExtUrl('about-welcome.html') }) module.exports.isIntermediateAboutPage = (location) => @@ -150,18 +139,12 @@ const aboutUrlsReverse = new Immutable.Map(module.exports.aboutUrls.reduce((obj, * about:blank -> http://localhost:8000/about-blank/index.html */ module.exports.getTargetAboutUrl = function (input) { - let url = module.exports.aboutUrls.get(getBaseUrl(input)) + const url = module.exports.aboutUrls.get(getBaseUrl(input)) if (!url) { return url } - const path = getPath(input) - url = path ? [url, path].join('') : url const hash = getHash(input) - url = hash ? [url, hash].join('#') : url - if (url === ethwalletOrigin) { - url = url + 'index.html' - } - return url + return hash && url ? [url, hash].join('#') : url } /** @@ -170,15 +153,12 @@ module.exports.getTargetAboutUrl = function (input) { * http://localhost:8000/about-blank.html -> about:blank */ module.exports.getSourceAboutUrl = function (input) { - let url = aboutUrlsReverse.get(getBaseUrl(input)) + const url = aboutUrlsReverse.get(getBaseUrl(input)) if (!url) { return url } - const path = getPath(input) - url = path ? [url, path].join('/') : url const hash = getHash(input) - url = hash ? [url, hash].join('#') : url - return url + return hash ? [url, hash].join('#') : url } /** @@ -249,18 +229,8 @@ module.exports.isUrl = function (input) { * Gets base url from an about: url or its target mapping. */ function getBaseUrl (input) { - if (typeof input !== 'string') { - return '' - } - input = input.split(/#|\?/)[0] - if (input.startsWith('about:ethwallet')) { - input = 'about:ethwallet' - } else if (input.startsWith(ethwalletOrigin)) { - input = ethwalletOrigin - } - return input + return (typeof input === 'string') ? input.split(/#|\?/)[0] : '' } - module.exports.getBaseUrl = getBaseUrl /** @@ -270,20 +240,6 @@ function getHash (input) { return (typeof input === 'string') ? input.split('#')[1] : '' } -/** - * Gets path for ethwallet URLs - */ -function getPath (input) { - if (typeof input !== 'string') { - return '' - } - if (input.startsWith('about:ethwallet/')) { - return input.split('about:ethwallet/')[1] - } else if (input.startsWith(ethwalletOrigin)) { - return input.split(ethwalletOrigin)[1] - } -} - module.exports.navigatableTypes = ['http:', 'https:', 'about:', 'chrome:', 'chrome-extension:', 'chrome-devtools:', 'file:', 'view-source:', 'ftp:', 'magnet:'] /** diff --git a/test/unit/lib/appUrlUtilTest.js b/test/unit/lib/appUrlUtilTest.js index a2bbec51568..060544a5ddf 100644 --- a/test/unit/lib/appUrlUtilTest.js +++ b/test/unit/lib/appUrlUtilTest.js @@ -37,16 +37,6 @@ describe('appUrlUtil test', function () { 'chrome-extension://fmdpfempfmekjkcfdehndghogpnpjeno/') }) }) - describe('getEthwalletExtUrl', function () { - it('arg', function () { - assert.equal(appUrlUtil.getEthwalletExtUrl('index.html'), - 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') - }) - it('no arg', function () { - assert.equal(appUrlUtil.getEthwalletExtUrl(), - 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/') - }) - }) describe('getBaseUrl', function () { it('no arg', function () { assert.equal(appUrlUtil.getBaseUrl(), '') @@ -55,10 +45,6 @@ describe('appUrlUtil test', function () { assert.equal(appUrlUtil.getBaseUrl('about:preferences#security?abc=123'), 'about:preferences') assert.equal(appUrlUtil.getBaseUrl('about:preferences?abc=123'), 'about:preferences') }) - it('ethwallet URL', function () { - assert.equal(appUrlUtil.getBaseUrl('about:ethwallet/test'), 'about:ethwallet') - assert.equal(appUrlUtil.getBaseUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/') - }) }) describe('getSourceAboutUrl', function () { it('no arg', function () { @@ -68,8 +54,6 @@ describe('appUrlUtil test', function () { assert.equal(appUrlUtil.getSourceAboutUrl('https://brave.com'), undefined) }) it('about URLs', function () { - assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html'), 'about:ethwallet/index.html') - assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/'), 'about:ethwallet') assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html'), 'about:preferences') assert.equal(appUrlUtil.getSourceAboutUrl('chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html#security'), 'about:preferences#security') }) @@ -84,8 +68,6 @@ describe('appUrlUtil test', function () { it('aboutURLs', function () { assert.equal(appUrlUtil.getTargetAboutUrl('about:blank'), 'chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-blank.html') assert.equal(appUrlUtil.getTargetAboutUrl('about:preferences#test?123'), 'chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-preferences.html#test?123') - assert.equal(appUrlUtil.getTargetAboutUrl('about:ethwallet'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') - assert.equal(appUrlUtil.getTargetAboutUrl('about:ethwallet/index.html'), 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp/index.html') }) }) describe('aboutUrls', function () { From a96012930f71c1b8e72e31f1498b7d5388d4f450 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 15:12:40 -0800 Subject: [PATCH 19/46] remove unused fs require --- tools/downloadEthwallet.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js index de1560cbd43..9c02c2f696a 100644 --- a/tools/downloadEthwallet.js +++ b/tools/downloadEthwallet.js @@ -1,6 +1,5 @@ 'use strict' -const fs = require('fs') const path = require('path') const {removeSync, ensureDirSync, copySync} = require('fs-extra') From b4a5bcd0a1f166643f727cb0e5927de75e2d6543 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 15:28:20 -0800 Subject: [PATCH 20/46] Fix ethereum wallet title display in titleMode --- app/renderer/components/navigation/urlBar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/renderer/components/navigation/urlBar.js b/app/renderer/components/navigation/urlBar.js index 014cb93f492..3af5a1e740c 100644 --- a/app/renderer/components/navigation/urlBar.js +++ b/app/renderer/components/navigation/urlBar.js @@ -21,6 +21,7 @@ const appActions = require('../../../../js/actions/appActions') const messages = require('../../../../js/constants/messages') const settings = require('../../../../js/constants/settings') const KeyCodes = require('../../../common/constants/keyCodes') +const {ethwalletExtensionId} = require('../../../../js/constants/config') // State const frameStateUtil = require('../../../../js/state/frameStateUtil') @@ -453,7 +454,7 @@ class UrlBar extends React.Component { props.isWideURLbarEnabled = getSetting(settings.WIDE_URL_BAR) props.publisherButtonVisible = publisherUtil.shouldShowAddPublisherButton(state, location, publisherKey) props.titleMode = ownProps.titleMode - props.hostValue = hostValue + props.hostValue = hostValue === ethwalletExtensionId ? null : hostValue props.urlbarLocation = urlbarLocation props.title = activeFrame.get('title', '') props.displayURL = displayURL From 28386ec08ac0ef5f90077921bb98a4115a738c49 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 16:48:29 -0800 Subject: [PATCH 21/46] WIP: adding BAT balance display --- app/extensions.js | 8 +++++++- app/extensions/brave/ethwallet-popup.html | 1 + app/extensions/brave/ethwallet-popup.js | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index 22e2dc29c9b..bb711ab99fe 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -16,8 +16,9 @@ const fs = require('fs') const path = require('path') const l10n = require('../js/l10n') const {bravifyText} = require('./renderer/lib/extensionsUtil') -const {componentUpdater, session} = require('electron') +const {componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') +const ledgerState = require('./common/state/ledgerState') // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' @@ -585,6 +586,11 @@ module.exports.init = () => { }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') + ipcMain.on('get-popup-bat-balance', (e) => { + const appState = appStore.getState() + const ledgerInfo = ledgerState.getInfoProps(appState) + e.sender.send('popup-bat-balance', ledgerInfo.get('balance')) + }) } else { extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) extensionActions.extensionDisabled(config.ethwalletExtensionId) diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html index 00cc9550c6a..ef2a38e22d3 100644 --- a/app/extensions/brave/ethwallet-popup.html +++ b/app/extensions/brave/ethwallet-popup.html @@ -22,6 +22,7 @@
+
diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index c1554956593..290aacc0b0b 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -1,5 +1,12 @@ const ipc = window.chrome.ipcRenderer +ipc.send('get-popup-bat-balance') +ipc.on('popup-bat-balance', (e, amount) => { + if (amount) { + document.getElementById('batBalance').innerText = `Brave Wallet Balance: ${amount} BAT` + } +}) + const doAction = (message, args) => { args.actionType = message ipc.send('dispatch-action', JSON.stringify([args])) From d403826325d2cbc70821495ff916fe53c26ed06a Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 02:16:01 +0000 Subject: [PATCH 22/46] fixup geth downloader, only dl once plus updates, change bin path --- .gitignore | 2 +- app/extensions.js | 7 ++++++- tools/downloadGeth.js | 37 ++++++++++++++++++++++++++++++++----- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 61e75f9e3de..f17cb78be48 100644 --- a/.gitignore +++ b/.gitignore @@ -83,4 +83,4 @@ app/extensions/brave/content/scripts/sync.js signature_generator.py # geth binary download -app/Geth +app/bin/geth* diff --git a/app/extensions.js b/app/extensions.js index bb711ab99fe..d9a34c66c10 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -574,7 +574,12 @@ module.exports.init = () => { if (process.env.ETHEREUM_NETWORK === 'ropsten') { gethArgs.push('--testnet') } - var geth = spawn(path.join(__dirname, 'Geth/unpacked/geth'), gethArgs) + var geth + if (process.platform === "win32") { + geth = spawn(path.join(__dirname, 'bin/geth.exe'), gethArgs) + } else { + geth = spawn(path.join(__dirname, 'bin/geth'), gethArgs) + } geth.stdout.on('data', (data) => { console.warn(data.toString()) }) diff --git a/tools/downloadGeth.js b/tools/downloadGeth.js index 205a746bf91..cdbaa3b1727 100644 --- a/tools/downloadGeth.js +++ b/tools/downloadGeth.js @@ -1,14 +1,41 @@ 'use strict' +const Manager = require('ethereum-client-binaries').Manager const fs = require('fs') +const path = require('path') -const Manager = require('ethereum-client-binaries').Manager const clientBinaries = fs.readFileSync('gethBinaries.json') const config = JSON.parse(clientBinaries) const mgr = new Manager(config) -mgr.init() + +const GETH_BIN_PATH = path.join('app', 'bin') + +mgr.init({ folders: [ GETH_BIN_PATH ] }) .then(() => { - mgr.download('Geth', { - downloadFolder: './app/' - }) + if (!mgr.clients.Geth.state.available) { + console.log("Geth is missing or out of date, starting download...") + mgr.download('Geth') + .then((result) => { + console.log("Done") + const fullPath = result.client.activeCli.fullPath + if (fullPath) { + if (!fs.existsSync(GETH_BIN_PATH)) { + fs.mkdirSync(GETH_BIN_PATH) + } + const outPath = path.join(GETH_BIN_PATH, result.client.activeCli.bin) + if (fs.existsSync(outPath)) { + fs.unlinkSync(outPath) + } + var is = fs.createReadStream(fullPath) + var os = fs.createWriteStream(outPath) + is.pipe(os) + is.on('end',function() { + fs.unlinkSync(fullPath) + fs.chmodSync(outPath, '755') + }) + } + }) + } else { + console.log("Geth is up to date") + } }) From 3a2c479f1d956a56ec0ae50a0d1e75b7ab8a0f99 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 02:20:16 +0000 Subject: [PATCH 23/46] missing lint --- app/extensions.js | 4 ++-- tools/downloadGeth.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index d9a34c66c10..3d27ddc02a2 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -574,8 +574,8 @@ module.exports.init = () => { if (process.env.ETHEREUM_NETWORK === 'ropsten') { gethArgs.push('--testnet') } - var geth - if (process.platform === "win32") { + var geth + if (process.platform === 'win32') { geth = spawn(path.join(__dirname, 'bin/geth.exe'), gethArgs) } else { geth = spawn(path.join(__dirname, 'bin/geth'), gethArgs) diff --git a/tools/downloadGeth.js b/tools/downloadGeth.js index cdbaa3b1727..e156936d053 100644 --- a/tools/downloadGeth.js +++ b/tools/downloadGeth.js @@ -13,10 +13,10 @@ const GETH_BIN_PATH = path.join('app', 'bin') mgr.init({ folders: [ GETH_BIN_PATH ] }) .then(() => { if (!mgr.clients.Geth.state.available) { - console.log("Geth is missing or out of date, starting download...") + console.log('Geth is missing or out of date, starting download...') mgr.download('Geth') .then((result) => { - console.log("Done") + console.log('Done') const fullPath = result.client.activeCli.fullPath if (fullPath) { if (!fs.existsSync(GETH_BIN_PATH)) { @@ -29,13 +29,13 @@ mgr.init({ folders: [ GETH_BIN_PATH ] }) var is = fs.createReadStream(fullPath) var os = fs.createWriteStream(outPath) is.pipe(os) - is.on('end',function() { - fs.unlinkSync(fullPath) - fs.chmodSync(outPath, '755') + is.on('end', () => { + fs.unlinkSync(fullPath) + fs.chmodSync(outPath, '755') }) } }) } else { - console.log("Geth is up to date") + console.log('Geth is up to date') } }) From f1d0d12a19077751710257f57185efea3200eba7 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 18:28:12 -0800 Subject: [PATCH 24/46] add hacky way to load transfer funds URL --- app/browser/tabs.js | 3 +++ app/extensions.js | 4 +++- app/extensions/brave/ethwallet-popup.js | 22 ++++++++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/browser/tabs.js b/app/browser/tabs.js index 067d4d7fbdc..9ecbb9041a0 100644 --- a/app/browser/tabs.js +++ b/app/browser/tabs.js @@ -804,6 +804,9 @@ const api = { }, loadURLInActiveTab: (state, windowId, url) => { + if (windowId == null) { + windowId = BrowserWindow.getActiveWindow().id + } const tabValue = tabState.getActiveTab(state, windowId) if (tabValue) { api.loadURLInTab(state, tabValue.get('tabId'), url) diff --git a/app/extensions.js b/app/extensions.js index 3d27ddc02a2..aeb2c470b2c 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -594,7 +594,9 @@ module.exports.init = () => { ipcMain.on('get-popup-bat-balance', (e) => { const appState = appStore.getState() const ledgerInfo = ledgerState.getInfoProps(appState) - e.sender.send('popup-bat-balance', ledgerInfo.get('balance')) + e.sender.send('popup-bat-balance', + ledgerInfo.get('balance'), + ledgerInfo.getIn(['addresses', 'BAT'])) }) } else { extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index 290aacc0b0b..285bfe81746 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -1,10 +1,13 @@ const ipc = window.chrome.ipcRenderer +let batAddress = null +const indexUrl = `${window.location.origin}/index.html` ipc.send('get-popup-bat-balance') -ipc.on('popup-bat-balance', (e, amount) => { +ipc.on('popup-bat-balance', (e, amount, walletAddress) => { if (amount) { document.getElementById('batBalance').innerText = `Brave Wallet Balance: ${amount} BAT` } + batAddress = walletAddress }) const doAction = (message, args) => { @@ -15,7 +18,22 @@ const doAction = (message, args) => { document.getElementById('openEthwallet').onclick = () => { doAction('app-create-tab-requested', { createProperties: { - url: window.location.origin + '/index.html' + url: indexUrl } }) } + +document.getElementById('transferFunds').onclick = () => { + const sendUrl = `${window.location.origin}/#!send/${batAddress || ''}` + doAction('app-create-tab-requested', { + createProperties: { + url: indexUrl + } + }) + // Meteor can't load sendUrl until indexUrl has already been loaded :( + setTimeout(() => { + doAction('app-load-url-in-active-tab-requested', { + url: sendUrl + }) + }, 1000) +} From 8d77930efcb2cac148d35dba2eadb96b85da8eaa Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 18:37:55 -0800 Subject: [PATCH 25/46] resized ethereum logo --- app/extensions.js | 4 ++-- img/ethereum/ethereum-19.png | Bin 0 -> 553 bytes img/ethereum/ethereum-38.png | Bin 0 -> 1002 bytes 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 img/ethereum/ethereum-19.png create mode 100644 img/ethereum/ethereum-38.png diff --git a/app/extensions.js b/app/extensions.js index aeb2c470b2c..f46aa666072 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -297,8 +297,8 @@ let generateEthwalletManifest = () => { }, browser_action: { default_icon: { - 38: 'ethereum-48.png', - 19: 'ethereum-16.png' + 38: 'ethereum-38.png', + 19: 'ethereum-19.png' }, default_popup: 'ethwallet-popup.html', default_title: 'Ethereum Wallet' diff --git a/img/ethereum/ethereum-19.png b/img/ethereum/ethereum-19.png new file mode 100644 index 0000000000000000000000000000000000000000..4581d2e343d65a3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K$mJ@IE?YRQ@*^q`gYOwJ@53- zSH<1DZMV9=Ky?xqAXH%cA zl`cEGBUmk^@Su0Jch7mAuqAJ&Oft*ZuJEbn`5V#Bn6GU&e`xl!U)9-tTHwUa+sS>W zIF&-v_vGuEt$OOaJL}ve4o9!Jkn^e6stfOWwSAmjY5sag!29>2?|&>!bzxeQcF}3_ zpNX%}&3NpW@aM7iezP?X*6@eC7dbZn*%}YUO%Jx*7v6jOKvTEgiY^`Nx7OR37r)x$ zy~?hqy4Gy{xB9;9yhqC6x2wvwTmdK II;Vst02%_ay#N3J literal 0 HcmV?d00001 From 08713f30c9fb0f35355b2d0cdbc4b8fb4555e595 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 18:41:33 -0800 Subject: [PATCH 26/46] resized ethereum logo --- img/ethereum/ethereum-16.png | Bin 1023 -> 509 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/img/ethereum/ethereum-16.png b/img/ethereum/ethereum-16.png index becdbed9dc3641e49dacf5730c7c275a48733dfa..95bc8259217917c3a0f1a828afcf99d2eac7b186 100644 GIT binary patch delta 451 zcmey*{+D@zqy!5C1H;x|=C6PhOS+@4BLl<6e(pbstP}P0>zR_g-CY%w)xFm4p!tns#pbM801UXWl-41y8dy?&8 z%MWw@TgueWYuWLv<=&!W4moo+rW)@PWMw*iYTMa=>{E2OLf?3NWoBFJ#T~f)8vhLQ zwb>3D+1GEZpZnuwu8JlimE)wFY`<-cB_?^R1&BT7;dOH!?p zi&B9UgOP!ug|2~-uAzB|k)f55rIn$Xu7RnQfr0eerwdRtgTe~DWM4fB@V2w literal 1023 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|6p}rHd>I(3 z)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!u!z$3Dlfq`2Xgc%uT&5-~a z7MU3mQ4-h?X&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+1Qs2Nx-^fT8s6w~6GOr}DLN~8i8Da>`9GBGMyia4R(RN}svc!pHA8T=+74X<&k4B>f7p*afAS=&`uo4XH44H@-q}xK z3*u-(t7{1A!;XT1-5VyOG_lXZ%W#!QtIXSt#`tkez{QUa* zy1bZJ*hGGLyDLpk_+%^?KFQhG%y4W{VAy19ZT&mm+q?Vd^!4%LwpCvyynJ+&yZ-&X zork|Xe;?1Lrl#gxS^4v}|9rc>JVi&F+4=u9emOW-SWJv<+uw(W+jp7g-~ILZ+uLX{ zg@nJqzrX*_|Ng#l-S1yh9V0?Qn3r#YMOFN2wbqvOLJU7L#T?yvtJW^80+#BjKA z;>_06=`&_T^tQ~n;WvRXfFX?EoI#=@p}w=D!{*wBOF`Y8eYI*jNi`lHsau~6w+_-md>XoZ^Ki|K8{=L1yhp2^Ij_X>EGkEa4V_m^C zVgG@J(UFm6?+^dxUmX#7!;g`9o0JNFiIs=#jrR(6ehi Date: Sat, 17 Feb 2018 19:17:31 -0800 Subject: [PATCH 27/46] make transfer funds button slightly less hacky --- app/extensions.js | 8 ++ app/extensions/brave/ethwallet-main.js | 7 ++ app/extensions/brave/ethwallet-popup.js | 6 +- package-lock.json | 116 ++++++++++++------------ package.json | 2 +- tools/downloadEthwallet.js | 1 + 6 files changed, 79 insertions(+), 61 deletions(-) create mode 100644 app/extensions/brave/ethwallet-main.js diff --git a/app/extensions.js b/app/extensions.js index f46aa666072..6225713f479 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -591,13 +591,21 @@ module.exports.init = () => { }) extensionInfo.setState(config.ethwalletExtensionId, extensionStates.REGISTERED) loadExtension(config.ethwalletExtensionId, getExtensionsPath('ethwallet'), generateEthwalletManifest(), 'component') + let popupWebContents = null ipcMain.on('get-popup-bat-balance', (e) => { const appState = appStore.getState() const ledgerInfo = ledgerState.getInfoProps(appState) + popupWebContents = e.sender e.sender.send('popup-bat-balance', ledgerInfo.get('balance'), ledgerInfo.getIn(['addresses', 'BAT'])) }) + // Forward index load messages to the popup + ipcMain.on('ethwallet-index-loaded', () => { + if (popupWebContents) { + popupWebContents.send('ethwallet-index-loaded') + } + }) } else { extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) extensionActions.extensionDisabled(config.ethwalletExtensionId) diff --git a/app/extensions/brave/ethwallet-main.js b/app/extensions/brave/ethwallet-main.js new file mode 100644 index 00000000000..c2c23d99cd0 --- /dev/null +++ b/app/extensions/brave/ethwallet-main.js @@ -0,0 +1,7 @@ +'use strict' + +const ipc = window.chrome.ipcRenderer + +window.addEventListener('load', () => { + ipc.send('ethwallet-index-loaded') +}) diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index 285bfe81746..07f6bb237e5 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -1,3 +1,5 @@ +'use strict' + const ipc = window.chrome.ipcRenderer let batAddress = null const indexUrl = `${window.location.origin}/index.html` @@ -31,9 +33,9 @@ document.getElementById('transferFunds').onclick = () => { } }) // Meteor can't load sendUrl until indexUrl has already been loaded :( - setTimeout(() => { + ipc.once('ethwallet-index-loaded', () => { doAction('app-load-url-in-active-tab-requested', { url: sendUrl }) - }, 1000) + }) } diff --git a/package-lock.json b/package-lock.json index 669b3c0ae0d..c0b07b5ccaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5985,6 +5985,61 @@ } } }, + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } + } + }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6235,61 +6290,6 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" - }, - "dependencies": { - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } } }, "electron-squirrel-startup": { @@ -12182,9 +12182,9 @@ } }, "meteor-dapp-wallet-prebuilt": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/meteor-dapp-wallet-prebuilt/-/meteor-dapp-wallet-prebuilt-0.2.2.tgz", - "integrity": "sha512-NpMzazshCKGMx2qm4JdBtUjxEbyXLywxWfCNB85mBRiWU817kjkFdOX7SONKsIcJYpqTsVwtkrCp6VQn+A+/Wg==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/meteor-dapp-wallet-prebuilt/-/meteor-dapp-wallet-prebuilt-0.2.3.tgz", + "integrity": "sha512-ee62CY0WTGsMjYgsgFstVjN/24i6EPVD2T4yOD0E1aAYelJz5WtuvNAG4GaizpjpSJ4fVBk5qq4pRh71IHS2Eg==", "dev": true }, "methods": { diff --git a/package.json b/package.json index 3c9b2da144d..595b9638010 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "less": "^2.5.3", "less-loader": "^2.2.1", "level": "^1.7.0", - "meteor-dapp-wallet-prebuilt": "0.2.2", + "meteor-dapp-wallet-prebuilt": "0.2.3", "mkdirp": "^0.5.1", "mocha": "^2.3.4", "mockery": "^2.1.0", diff --git a/tools/downloadEthwallet.js b/tools/downloadEthwallet.js index 9c02c2f696a..83de12a0ffa 100644 --- a/tools/downloadEthwallet.js +++ b/tools/downloadEthwallet.js @@ -11,3 +11,4 @@ require('meteor-dapp-wallet-prebuilt').init(targetDirectory) copySync(path.resolve('img/ethereum/'), targetDirectory) copySync(path.resolve('app/extensions/brave/ethwallet-popup.html'), path.join(targetDirectory, 'ethwallet-popup.html')) copySync(path.resolve('app/extensions/brave/ethwallet-popup.js'), path.join(targetDirectory, 'ethwallet-popup.js')) +copySync(path.resolve('app/extensions/brave/ethwallet-main.js'), path.join(targetDirectory, 'ethwallet-main.js')) From 0eb968679ce22523266ac44b66594c4b1fb39130 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 19:27:43 -0800 Subject: [PATCH 28/46] fix geth download on macos --- tools/downloadGeth.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/downloadGeth.js b/tools/downloadGeth.js index e156936d053..6a4597f70be 100644 --- a/tools/downloadGeth.js +++ b/tools/downloadGeth.js @@ -10,10 +10,15 @@ const mgr = new Manager(config) const GETH_BIN_PATH = path.join('app', 'bin') +const oldPath = process.env.PATH + +process.env.PATH = '' + mgr.init({ folders: [ GETH_BIN_PATH ] }) .then(() => { if (!mgr.clients.Geth.state.available) { console.log('Geth is missing or out of date, starting download...') + process.env.PATH = oldPath mgr.download('Geth') .then((result) => { console.log('Done') From fd18cc7298b3d0292fd519fb2d3a962fbba4b844 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 03:49:50 +0000 Subject: [PATCH 29/46] fix launching geth for packaged builds --- .gitignore | 2 +- app/extensions.js | 4 ++-- tools/downloadGeth.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f17cb78be48..7847c8655b1 100644 --- a/.gitignore +++ b/.gitignore @@ -83,4 +83,4 @@ app/extensions/brave/content/scripts/sync.js signature_generator.py # geth binary download -app/bin/geth* +app/extensions/bin/geth* diff --git a/app/extensions.js b/app/extensions.js index 6225713f479..020d45245f8 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -576,9 +576,9 @@ module.exports.init = () => { } var geth if (process.platform === 'win32') { - geth = spawn(path.join(__dirname, 'bin/geth.exe'), gethArgs) + geth = spawn(path.join(getExtensionsPath('bin'), 'geth.exe'), gethArgs) } else { - geth = spawn(path.join(__dirname, 'bin/geth'), gethArgs) + geth = spawn(path.join(getExtensionsPath('bin'), 'geth'), gethArgs) } geth.stdout.on('data', (data) => { console.warn(data.toString()) diff --git a/tools/downloadGeth.js b/tools/downloadGeth.js index 6a4597f70be..4d57dd582b8 100644 --- a/tools/downloadGeth.js +++ b/tools/downloadGeth.js @@ -8,7 +8,7 @@ const clientBinaries = fs.readFileSync('gethBinaries.json') const config = JSON.parse(clientBinaries) const mgr = new Manager(config) -const GETH_BIN_PATH = path.join('app', 'bin') +const GETH_BIN_PATH = path.join('app', 'extensions', 'bin') const oldPath = process.env.PATH From 4560cbfbb7b4a9ad40a317791930e20e4f814088 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 04:42:40 +0000 Subject: [PATCH 30/46] store geth data in user data dir --- app/extensions.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 020d45245f8..aeabd794765 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -16,7 +16,7 @@ const fs = require('fs') const path = require('path') const l10n = require('../js/l10n') const {bravifyText} = require('./renderer/lib/extensionsUtil') -const {componentUpdater, session, ipcMain} = require('electron') +const {app, componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') const ledgerState = require('./common/state/ledgerState') @@ -570,7 +570,14 @@ module.exports.init = () => { loadExtension(config.syncExtensionId, getExtensionsPath('brave'), generateSyncManifest(), 'unpacked') if (getSetting(settings.ETHWALLET_ENABLED)) { - var gethArgs = ['--light', '--rpc', '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp'] + var gethArgs = [ + '--light', + '--rpc', + '--rpccorsdomain', + 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp', + '--datadir', + path.join(app.getPath('userData'), 'ethereum') + ] if (process.env.ETHEREUM_NETWORK === 'ropsten') { gethArgs.push('--testnet') } From fb55f53fce36a02c9522d6c51c85ff19c569f065 Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 22:01:33 -0800 Subject: [PATCH 31/46] remove BAT balance for now --- app/extensions/brave/ethwallet-popup.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index 07f6bb237e5..b7da3032f43 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -6,9 +6,11 @@ const indexUrl = `${window.location.origin}/index.html` ipc.send('get-popup-bat-balance') ipc.on('popup-bat-balance', (e, amount, walletAddress) => { + /* if (amount) { document.getElementById('batBalance').innerText = `Brave Wallet Balance: ${amount} BAT` } + */ batAddress = walletAddress }) From 352dcca5d2230ac3ded45d9df7b654981b9881a9 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 22:52:45 -0800 Subject: [PATCH 32/46] resolving conflicts --- app/extensions.js | 15 +++++++ app/extensions/brave/ethwallet-popup.html | 19 +++++++++ app/extensions/brave/ethwallet-popup.js | 5 +++ app/renderer/components/main/popupWindow.js | 2 +- package-lock.json | 47 --------------------- 5 files changed, 40 insertions(+), 48 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index aeabd794765..8235cff20e2 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -20,6 +20,8 @@ const {app, componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') const ledgerState = require('./common/state/ledgerState') +const tmpFile = "/tmp/test" + // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' let concatCSP = (cspDirectives) => { @@ -613,6 +615,19 @@ module.exports.init = () => { popupWebContents.send('ethwallet-index-loaded') } }) + ipcMain.on('create-wallet', (e, args) => { + var pwd = JSON.parse(args)[0]; + fs.writeFileSync(tmpFile, pwd); + var createAccountArgs = ['account', 'new', '--password', tmpFile] + if (process.env.ETHEREUM_NETWORK === 'ropsten') { + createAccountArgs.unshift('--testnet') + } + if (process.platform === 'win32') { + geth = spawn(path.join(__dirname, 'bin/geth.exe'), createAccountArgs) + } else { + geth = spawn(path.join(__dirname, 'bin/geth'), createAccountArgs) + } + }) } else { extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) extensionActions.extensionDisabled(config.ethwalletExtensionId) diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html index ef2a38e22d3..ef48dd382ea 100644 --- a/app/extensions/brave/ethwallet-popup.html +++ b/app/extensions/brave/ethwallet-popup.html @@ -17,6 +17,16 @@ text-align: center; width: 250px; } + input { + font-size: 14px; + margin-left: 8px; + margin-top: 5px; + width: 130px; + } + #label { + font-size: 14px; + color: white; + } @@ -29,6 +39,15 @@
+
+ +
+ Password: + + +
+
+
diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index b7da3032f43..5c6c5abe6be 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -19,6 +19,11 @@ const doAction = (message, args) => { ipc.send('dispatch-action', JSON.stringify([args])) } +document.getElementById('createEthWallet').onclick = () => { + var pwd = document.getElementById("pwd").value; + ipc.send('create-wallet', JSON.stringify([pwd])); +} + document.getElementById('openEthwallet').onclick = () => { doAction('app-create-tab-requested', { createProperties: { diff --git a/app/renderer/components/main/popupWindow.js b/app/renderer/components/main/popupWindow.js index 01a462ce34b..4698f5ed919 100644 --- a/app/renderer/components/main/popupWindow.js +++ b/app/renderer/components/main/popupWindow.js @@ -48,7 +48,7 @@ class PopupWindow extends React.Component { webview.addEventListener('did-attach', () => { webview.enablePreferredSizeMode(true) if (this.isWalletPopup) { - const height = 120 + const height = 260 const width = 280 webview.style.height = height + 'px' webview.style.width = width + 'px' diff --git a/package-lock.json b/package-lock.json index c0b07b5ccaa..476ef633908 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6176,20 +6176,6 @@ "integrity": "sha1-HUixB9ghJqLz4hHC6iX4A7pVGyE=", "dev": true }, - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - } - }, "fs-extra": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.28.0.tgz", @@ -6228,27 +6214,6 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, "plist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", @@ -6261,18 +6226,6 @@ "xmldom": "0.1.27" } }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - }, "xmlbuilder": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", From d4cb3b7735d71c3192c0fbe59ac54647d68f05a8 Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 22:43:21 -0800 Subject: [PATCH 33/46] lint --- app/extensions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 8235cff20e2..038671ccb24 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -20,7 +20,7 @@ const {app, componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') const ledgerState = require('./common/state/ledgerState') -const tmpFile = "/tmp/test" +const tmpFile = '/tmp/test' // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' @@ -616,8 +616,8 @@ module.exports.init = () => { } }) ipcMain.on('create-wallet', (e, args) => { - var pwd = JSON.parse(args)[0]; - fs.writeFileSync(tmpFile, pwd); + var pwd = JSON.parse(args)[0] + fs.writeFileSync(tmpFile, pwd) var createAccountArgs = ['account', 'new', '--password', tmpFile] if (process.env.ETHEREUM_NETWORK === 'ropsten') { createAccountArgs.unshift('--testnet') From 1fd6668229e13c32956ba28474ce800294ddca27 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 07:03:05 +0000 Subject: [PATCH 34/46] add bat contract on first load --- app/extensions/brave/ethwallet-main.js | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/app/extensions/brave/ethwallet-main.js b/app/extensions/brave/ethwallet-main.js index c2c23d99cd0..5973bda3ff0 100644 --- a/app/extensions/brave/ethwallet-main.js +++ b/app/extensions/brave/ethwallet-main.js @@ -5,3 +5,42 @@ const ipc = window.chrome.ipcRenderer window.addEventListener('load', () => { ipc.send('ethwallet-index-loaded') }) + +Meteor.startup(function() { + Tracker.autorun(function(){ + // If on ropsten, add the testnet BAT token, only once. + if (!localStorage['dapp_hasBAT'] && Session.get('network') === 'ropsten'){ + localStorage.setItem('dapp_hasBAT', true) + + // wait 5s, to allow the tokens to be loaded from the localstorage first + Meteor.setTimeout(function(){ + const batToken = '0x60b10c134088ebd63f80766874e2cade05fc987b' + const tokenId = Helpers.makeId('token', batToken) + Tokens.upsert(tokenId, {$set: { + address: batToken, + name: 'BAT Ropsten', + symbol: 'BATr', + balances: {}, + decimals: 18 + }}) + }, 5000) + + // If on main net, add the BAT token, only once. + } else if (!localStorage['dapp_hasBAT'] && Session.get('network') === 'main'){ + localStorage.setItem('dapp_hasBAT', true) + + // wait 5s, to allow the tokens to be loaded from the localstorage first + Meteor.setTimeout(function(){ + const batToken = '0x0D8775F648430679A709E98d2b0Cb6250d2887EF' + const tokenId = Helpers.makeId('token', batToken) + Tokens.upsert(tokenId, {$set: { + address: batToken, + name: 'Basic Attention Token', + symbol: 'BAT', + balances: {}, + decimals: 18 + }}) + }, 5000) + } + }) +}) From 771b53cc5e33473b944aaa5cb3091010041a20ea Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Sat, 17 Feb 2018 23:32:32 -0800 Subject: [PATCH 35/46] style --- app/extensions/brave/ethwallet-popup.html | 24 +-- app/extensions/brave/ethwallet-popup.js | 14 ++ app/renderer/components/main/popupWindow.js | 2 +- package-lock.json | 157 +++++++++++++------- 4 files changed, 132 insertions(+), 65 deletions(-) diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html index ef48dd382ea..4b5fe658e23 100644 --- a/app/extensions/brave/ethwallet-popup.html +++ b/app/extensions/brave/ethwallet-popup.html @@ -20,18 +20,24 @@ input { font-size: 14px; margin-left: 8px; - margin-top: 5px; + margin-bottom: 5px; width: 130px; } #label { font-size: 14px; color: white; } + .hidden { + display: none; + } + .visible { + display: block; + } -
+
@@ -40,14 +46,14 @@
- -
- Password: - - -
-
+
+ diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index 5c6c5abe6be..2f63f8d8ac1 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -24,6 +24,20 @@ document.getElementById('createEthWallet').onclick = () => { ipc.send('create-wallet', JSON.stringify([pwd])); } +document.getElementById('createWallet').onclick = () => { + document.getElementById("create").classList.add('visible'); + document.getElementById("create").classList.remove('hidden'); + document.getElementById("appContainer").classList.add('hidden'); + document.getElementById("appContainer").classList.remove('visible'); +} + +document.getElementById('back').onclick = () => { + document.getElementById("create").classList.remove('visible'); + document.getElementById("create").classList.add('hidden'); + document.getElementById("appContainer").classList.remove('hidden'); + document.getElementById("appContainer").classList.add('visible'); +} + document.getElementById('openEthwallet').onclick = () => { doAction('app-create-tab-requested', { createProperties: { diff --git a/app/renderer/components/main/popupWindow.js b/app/renderer/components/main/popupWindow.js index 4698f5ed919..35f46f3c72a 100644 --- a/app/renderer/components/main/popupWindow.js +++ b/app/renderer/components/main/popupWindow.js @@ -48,7 +48,7 @@ class PopupWindow extends React.Component { webview.addEventListener('did-attach', () => { webview.enablePreferredSizeMode(true) if (this.isWalletPopup) { - const height = 260 + const height = 180 const width = 280 webview.style.height = height + 'px' webview.style.width = width + 'px' diff --git a/package-lock.json b/package-lock.json index 476ef633908..5c10c1c4e17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5985,61 +5985,6 @@ } } }, - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } - } - }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6176,6 +6121,20 @@ "integrity": "sha1-HUixB9ghJqLz4hHC6iX4A7pVGyE=", "dev": true }, + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + } + }, "fs-extra": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.28.0.tgz", @@ -6214,6 +6173,27 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, "plist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", @@ -6226,6 +6206,18 @@ "xmldom": "0.1.27" } }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + }, "xmlbuilder": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", @@ -6243,6 +6235,61 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" + }, + "dependencies": { + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } } }, "electron-squirrel-startup": { From 964537a50b932ac7bd0d7383e79d9bbd55db8f3f Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 07:37:33 +0000 Subject: [PATCH 36/46] invert colors --- app/extensions/brave/ethwallet-main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/extensions/brave/ethwallet-main.js b/app/extensions/brave/ethwallet-main.js index 5973bda3ff0..26067337cfe 100644 --- a/app/extensions/brave/ethwallet-main.js +++ b/app/extensions/brave/ethwallet-main.js @@ -44,3 +44,7 @@ Meteor.startup(function() { } }) }) + + +var sheet = document.styleSheets[0] +sheet.insertRule('body { filter: invert(100%) }', 1) From 4bedfcaee1983b9ff38c8d8939fcb7a4879b99fb Mon Sep 17 00:00:00 2001 From: yan Date: Sat, 17 Feb 2018 23:55:19 -0800 Subject: [PATCH 37/46] More style fixes, simplify create-wallet IPC --- app/extensions.js | 3 +- app/extensions/brave/ethwallet-popup.html | 26 +++-- app/extensions/brave/ethwallet-popup.js | 24 ++--- package-lock.json | 110 +++++++++++----------- 4 files changed, 85 insertions(+), 78 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 038671ccb24..08686c07543 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -615,8 +615,7 @@ module.exports.init = () => { popupWebContents.send('ethwallet-index-loaded') } }) - ipcMain.on('create-wallet', (e, args) => { - var pwd = JSON.parse(args)[0] + ipcMain.on('create-wallet', (e, pwd) => { fs.writeFileSync(tmpFile, pwd) var createAccountArgs = ['account', 'new', '--password', tmpFile] if (process.env.ETHEREUM_NETWORK === 'ropsten') { diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html index 4b5fe658e23..d8e559a19c5 100644 --- a/app/extensions/brave/ethwallet-popup.html +++ b/app/extensions/brave/ethwallet-popup.html @@ -13,18 +13,20 @@ padding: 10px; margin: 10px; margin-left: 8px; - margin-top: 5px; + margin-top: 6px; text-align: center; width: 250px; } input { - font-size: 14px; + font-size: 15px; margin-left: 8px; - margin-bottom: 5px; - width: 130px; + margin-bottom: 8px; + margin-top: 8px; + width: 240px; } #label { font-size: 14px; + margin-left: 8px; color: white; } .hidden { @@ -46,14 +48,20 @@
- +
diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index 2f63f8d8ac1..b980d03d7ef 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -20,22 +20,22 @@ const doAction = (message, args) => { } document.getElementById('createEthWallet').onclick = () => { - var pwd = document.getElementById("pwd").value; - ipc.send('create-wallet', JSON.stringify([pwd])); + var pwd = document.getElementById('pwd').value + ipc.send('create-wallet', pwd) } -document.getElementById('createWallet').onclick = () => { - document.getElementById("create").classList.add('visible'); - document.getElementById("create").classList.remove('hidden'); - document.getElementById("appContainer").classList.add('hidden'); - document.getElementById("appContainer").classList.remove('visible'); +document.getElementById('createWallet').onclick = () => { + document.getElementById("create").classList.add('visible') + document.getElementById("create").classList.remove('hidden') + document.getElementById("appContainer").classList.add('hidden') + document.getElementById("appContainer").classList.remove('visible') } -document.getElementById('back').onclick = () => { - document.getElementById("create").classList.remove('visible'); - document.getElementById("create").classList.add('hidden'); - document.getElementById("appContainer").classList.remove('hidden'); - document.getElementById("appContainer").classList.add('visible'); +document.getElementById('back').onclick = () => { + document.getElementById("create").classList.remove('visible') + document.getElementById("create").classList.add('hidden') + document.getElementById("appContainer").classList.remove('hidden') + document.getElementById("appContainer").classList.add('visible') } document.getElementById('openEthwallet').onclick = () => { diff --git a/package-lock.json b/package-lock.json index 5c10c1c4e17..c0b07b5ccaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5985,6 +5985,61 @@ } } }, + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } + } + }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6235,61 +6290,6 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" - }, - "dependencies": { - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } } }, "electron-squirrel-startup": { From 0c2229a921ca7e600d58cae07336fa6c70922dbb Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Feb 2018 00:18:49 -0800 Subject: [PATCH 38/46] use new geth binary, WIP read geth pw from stdin --- app/extensions.js | 26 ++++++++--- package-lock.json | 110 +++++++++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 62 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 08686c07543..c812e89c808 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -20,8 +20,6 @@ const {app, componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') const ledgerState = require('./common/state/ledgerState') -const tmpFile = '/tmp/test' - // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' let concatCSP = (cspDirectives) => { @@ -616,16 +614,30 @@ module.exports.init = () => { } }) ipcMain.on('create-wallet', (e, pwd) => { - fs.writeFileSync(tmpFile, pwd) - var createAccountArgs = ['account', 'new', '--password', tmpFile] + const createAccountArgs = [ + 'account', + 'new', + '--datadir', + path.join(app.getPath('userData'), 'ethereum') + ] if (process.env.ETHEREUM_NETWORK === 'ropsten') { - createAccountArgs.unshift('--testnet') + createAccountArgs.push('--testnet') } + if (process.platform === 'win32') { - geth = spawn(path.join(__dirname, 'bin/geth.exe'), createAccountArgs) + geth = spawn(path.join(getExtensionsPath('bin'), 'geth.exe'), createAccountArgs) } else { - geth = spawn(path.join(__dirname, 'bin/geth'), createAccountArgs) + geth = spawn(path.join(getExtensionsPath('bin'), 'geth'), createAccountArgs) } + + geth.stdin.setEncoding('utf-8') + let count = 0 + geth.stdout.on('data', (data) => { + if (count < 2) { + geth.stdin.write(pwd + '\n') + } + count = count + 1 + }) }) } else { extensionInfo.setState(config.ethwalletExtensionId, extensionStates.DISABLED) diff --git a/package-lock.json b/package-lock.json index c0b07b5ccaa..5c10c1c4e17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5985,61 +5985,6 @@ } } }, - "electron-download": { - "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", - "dev": true, - "requires": { - "debug": "2.6.9", - "home-path": "1.0.5", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "mv": "2.1.1", - "nugget": "1.6.2", - "path-exists": "1.0.0", - "rc": "1.2.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nugget": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", - "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.82.0", - "single-line-log": "0.4.1", - "throttleit": "0.0.2" - } - }, - "path-exists": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "single-line-log": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", - "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - } - } - }, "electron-installer-debian": { "version": "github:brave/electron-installer-debian#5f37713f52437678e5cbf9b17500fba4ae7cb5ad", "optional": true, @@ -6290,6 +6235,61 @@ "requires": { "electron-download": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", "extract-zip": "1.6.5" + }, + "dependencies": { + "electron-download": { + "version": "github:brave/electron-download#409b65caff14edeef1daa36a7445ba6334658d7c", + "dev": true, + "requires": { + "debug": "2.6.9", + "home-path": "1.0.5", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "mv": "2.1.1", + "nugget": "1.6.2", + "path-exists": "1.0.0", + "rc": "1.2.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "nugget": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-1.6.2.tgz", + "integrity": "sha1-iMpuA7pXBqmRc/XaCQJZPWvK4Qc=", + "dev": true, + "requires": { + "debug": "2.6.9", + "minimist": "1.2.0", + "pretty-bytes": "1.0.4", + "progress-stream": "1.2.0", + "request": "2.82.0", + "single-line-log": "0.4.1", + "throttleit": "0.0.2" + } + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "single-line-log": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-0.4.1.tgz", + "integrity": "sha1-h6VWSfdJ14PsDc2AToFA2Yc8fO4=", + "dev": true + }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + } } }, "electron-squirrel-startup": { From 3c5a6d3f774b52428caf6cba67b9cd66ff16b573 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Feb 2018 00:33:38 -0800 Subject: [PATCH 39/46] end geth stdin --- app/extensions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/extensions.js b/app/extensions.js index c812e89c808..587b6859598 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -637,6 +637,9 @@ module.exports.init = () => { geth.stdin.write(pwd + '\n') } count = count + 1 + if (count == 2) { + geth.stdin.end() + } }) }) } else { From 851ae6746fff75f63e3abdcde14b69a472e6e979 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Feb 2018 01:06:28 -0800 Subject: [PATCH 40/46] open ethwallet tab when wallet creation is done --- app/extensions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/extensions.js b/app/extensions.js index 587b6859598..a49fdfa6660 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -639,6 +639,9 @@ module.exports.init = () => { count = count + 1 if (count == 2) { geth.stdin.end() + appActions.createTabRequested({ + url: `chrome-extension://${config.ethwalletExtensionId}/index.html` + }) } }) }) From e56e25f97ce7e61d152a1603f71f76a2ef95fcf7 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 09:16:46 +0000 Subject: [PATCH 41/46] switch to using ipc directly vs shelling out to get for account creation --- app/extensions.js | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index a49fdfa6660..a235568241b 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -19,6 +19,7 @@ const {bravifyText} = require('./renderer/lib/extensionsUtil') const {app, componentUpdater, session, ipcMain} = require('electron') const {spawn} = require('child_process') const ledgerState = require('./common/state/ledgerState') +const net = require('net') // Takes Content Security Policy flags, for example { 'default-src': '*' } // Returns a CSP string, for example 'default-src: *;' @@ -614,35 +615,17 @@ module.exports.init = () => { } }) ipcMain.on('create-wallet', (e, pwd) => { - const createAccountArgs = [ - 'account', - 'new', - '--datadir', - path.join(app.getPath('userData'), 'ethereum') - ] - if (process.env.ETHEREUM_NETWORK === 'ropsten') { - createAccountArgs.push('--testnet') - } + var client = net.createConnection(path.join(app.getPath('userData'), 'ethereum', 'geth.ipc')) - if (process.platform === 'win32') { - geth = spawn(path.join(getExtensionsPath('bin'), 'geth.exe'), createAccountArgs) - } else { - geth = spawn(path.join(getExtensionsPath('bin'), 'geth'), createAccountArgs) - } + client.on('connect', () => { + client.write(JSON.stringify({ 'method': 'personal_newAccount', 'params': [pwd], 'id': 1, 'jsonrpc': '2.0' })) + }) - geth.stdin.setEncoding('utf-8') - let count = 0 - geth.stdout.on('data', (data) => { - if (count < 2) { - geth.stdin.write(pwd + '\n') - } - count = count + 1 - if (count == 2) { - geth.stdin.end() - appActions.createTabRequested({ - url: `chrome-extension://${config.ethwalletExtensionId}/index.html` - }) - } + client.on('data', (data) => { + client.end() + appActions.createTabRequested({ + url: `chrome-extension://${config.ethwalletExtensionId}/index.html` + }) }) }) } else { From f146f5f95d7b2cf2e7f7691f5589f79719d371e9 Mon Sep 17 00:00:00 2001 From: eV Date: Sun, 18 Feb 2018 09:38:56 +0000 Subject: [PATCH 42/46] pass ipcath explicitly --- app/extensions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index a235568241b..55a1e49093a 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -577,7 +577,9 @@ module.exports.init = () => { '--rpccorsdomain', 'chrome-extension://dakeiobolocmlkdebloniehpglcjkgcp', '--datadir', - path.join(app.getPath('userData'), 'ethereum') + path.join(app.getPath('userData'), 'ethereum'), + '--ipcpath', + path.join(app.getPath('userData'), 'ethereum', 'geth.ipc') ] if (process.env.ETHEREUM_NETWORK === 'ropsten') { gethArgs.push('--testnet') From df3e5fedaa348fe9034679158a9d7310899f44fc Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Feb 2018 01:42:23 -0800 Subject: [PATCH 43/46] UI tweaks * make UI bigger * go back after wallet is created --- app/extensions.js | 3 --- app/extensions/brave/ethwallet-main.js | 1 + app/extensions/brave/ethwallet-popup.html | 2 ++ app/extensions/brave/ethwallet-popup.js | 23 +++++++++++++---------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/extensions.js b/app/extensions.js index 55a1e49093a..e1161bbacbb 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -625,9 +625,6 @@ module.exports.init = () => { client.on('data', (data) => { client.end() - appActions.createTabRequested({ - url: `chrome-extension://${config.ethwalletExtensionId}/index.html` - }) }) }) } else { diff --git a/app/extensions/brave/ethwallet-main.js b/app/extensions/brave/ethwallet-main.js index 26067337cfe..406a804c716 100644 --- a/app/extensions/brave/ethwallet-main.js +++ b/app/extensions/brave/ethwallet-main.js @@ -3,6 +3,7 @@ const ipc = window.chrome.ipcRenderer window.addEventListener('load', () => { + document.body.style.zoom = '120%' ipc.send('ethwallet-index-loaded') }) diff --git a/app/extensions/brave/ethwallet-popup.html b/app/extensions/brave/ethwallet-popup.html index d8e559a19c5..cc78e0cef4a 100644 --- a/app/extensions/brave/ethwallet-popup.html +++ b/app/extensions/brave/ethwallet-popup.html @@ -10,6 +10,7 @@ } button { font-size: 14px; + font-weight: bold; padding: 10px; margin: 10px; margin-left: 8px; @@ -26,6 +27,7 @@ } #label { font-size: 14px; + font-weight: bold; margin-left: 8px; color: white; } diff --git a/app/extensions/brave/ethwallet-popup.js b/app/extensions/brave/ethwallet-popup.js index b980d03d7ef..3144b6c7bdc 100644 --- a/app/extensions/brave/ethwallet-popup.js +++ b/app/extensions/brave/ethwallet-popup.js @@ -19,24 +19,27 @@ const doAction = (message, args) => { ipc.send('dispatch-action', JSON.stringify([args])) } +const onBack = () => { + document.getElementById('create').classList.remove('visible') + document.getElementById('create').classList.add('hidden') + document.getElementById('appContainer').classList.remove('hidden') + document.getElementById('appContainer').classList.add('visible') +} + document.getElementById('createEthWallet').onclick = () => { var pwd = document.getElementById('pwd').value ipc.send('create-wallet', pwd) + onBack() } document.getElementById('createWallet').onclick = () => { - document.getElementById("create").classList.add('visible') - document.getElementById("create").classList.remove('hidden') - document.getElementById("appContainer").classList.add('hidden') - document.getElementById("appContainer").classList.remove('visible') + document.getElementById('create').classList.add('visible') + document.getElementById('create').classList.remove('hidden') + document.getElementById('appContainer').classList.add('hidden') + document.getElementById('appContainer').classList.remove('visible') } -document.getElementById('back').onclick = () => { - document.getElementById("create").classList.remove('visible') - document.getElementById("create").classList.add('hidden') - document.getElementById("appContainer").classList.remove('hidden') - document.getElementById("appContainer").classList.add('visible') -} +document.getElementById('back').onclick = onBack document.getElementById('openEthwallet').onclick = () => { doAction('app-create-tab-requested', { From 65820f20fed7799ebdf5d36f88ddcb2f0c17c5ce Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Feb 2018 09:14:35 -0800 Subject: [PATCH 44/46] remove unneccessary console.log --- js/about/preferences.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/about/preferences.js b/js/about/preferences.js index 4ec8839b3ab..d3667b60045 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -836,7 +836,6 @@ class AboutPreferences extends React.Component { settings: this.state.settings.set(key, value) }) aboutActions.changeSetting(key, value) - console.log('on change setting', key, value) const settingsRequiringRestart = [ settings.HARDWARE_ACCELERATION_ENABLED, settings.DO_NOT_TRACK, From b0e9d2e09b5ed58eca3b8477d83b81c23500fbce Mon Sep 17 00:00:00 2001 From: eV Date: Wed, 21 Feb 2018 08:28:32 +0000 Subject: [PATCH 45/46] update Geth to 1.8.1 --- gethBinaries.json | 42 +++++++++++++++++++++--------------------- tools/updateGeth.py | 0 2 files changed, 21 insertions(+), 21 deletions(-) mode change 100644 => 100755 tools/updateGeth.py diff --git a/gethBinaries.json b/gethBinaries.json index 5488bd30f72..600699f6197 100644 --- a/gethBinaries.json +++ b/gethBinaries.json @@ -12,15 +12,15 @@ ], "output": [ "Geth", - "1.8.0" + "1.8.1" ] } }, "download": { - "bin": "geth-linux-386-1.8.0-5f540757/geth", - "sha256": "0e93dc1a730cfea24f3b33c151b515055b450e70552e069bd7337f865f0aceb5", + "bin": "geth-linux-386-1.8.1-1e67410e/geth", + "sha256": "38286d3597fc850d2c2c683d3c674b3242a83c08c1f7644b32181a06a655e2fc", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-1.8.0-5f540757.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-1.8.1-1e67410e.tar.gz" } }, "x64": { @@ -32,15 +32,15 @@ ], "output": [ "Geth", - "1.8.0" + "1.8.1" ] } }, "download": { - "bin": "geth-linux-amd64-1.8.0-5f540757/geth", - "sha256": "58b4264340eb8aac496cca284f25525620f35292e388f4d4b2961a1e9b062315", + "bin": "geth-linux-amd64-1.8.1-1e67410e/geth", + "sha256": "19021b206d5acf13e789a15a87665b308f1382814b228421c22a8ac3e2bec25f", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.0-5f540757.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.1-1e67410e.tar.gz" } } }, @@ -54,15 +54,15 @@ ], "output": [ "Geth", - "1.8.0" + "1.8.1" ] } }, "download": { - "bin": "geth-darwin-amd64-1.8.0-5f540757/geth", - "sha256": "4d5cf36f64b9e131b9b550144abe0b82dc57028da2e97bf435583f2091d790ea", + "bin": "geth-darwin-amd64-1.8.1-1e67410e/geth", + "sha256": "0261d7083566d50b561c4e58441c56ff386256a15b794fe6211cb86f2a7ce786", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.8.0-5f540757.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.8.1-1e67410e.tar.gz" } } }, @@ -76,15 +76,15 @@ ], "output": [ "Geth", - "1.8.0" + "1.8.1" ] } }, "download": { - "bin": "geth-windows-386-1.8.0-5f540757\\geth.exe", - "sha256": "efd7174fb624b4633a1a4185c6cbed9d9db03e4b9169d66379a3e9d79883d0f0", + "bin": "geth-windows-386-1.8.1-1e67410e\\geth.exe", + "sha256": "1498a758dc5fd5b5aaec6ff0742aafb1fd99650209f76bbedb241b87dca6bc3d", "type": "zip", - "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-1.8.0-5f540757.zip" + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-1.8.1-1e67410e.zip" } }, "x64": { @@ -96,20 +96,20 @@ ], "output": [ "Geth", - "1.8.0" + "1.8.1" ] } }, "download": { - "bin": "geth-windows-amd64-1.8.0-5f540757\\geth.exe", - "sha256": "34c00bd6764880f737ea6550b7602d97e33fd75b4d08661366f7c507912f6106", + "bin": "geth-windows-amd64-1.8.1-1e67410e\\geth.exe", + "sha256": "0a51ad0bebba673a3abe160e833ac81c9757724efe030e714eb761cb67a5fd1a", "type": "zip", - "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.8.0-5f540757.zip" + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.8.1-1e67410e.zip" } } } }, - "version": "1.8.0" + "version": "1.8.1" } } } \ No newline at end of file diff --git a/tools/updateGeth.py b/tools/updateGeth.py old mode 100644 new mode 100755 From bfdab47996f4f1f1fdcf24bfeffeee21fdd52c8d Mon Sep 17 00:00:00 2001 From: eV Date: Wed, 11 Jul 2018 19:28:27 +0000 Subject: [PATCH 46/46] update Geth to 1.8.12 --- gethBinaries.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gethBinaries.json b/gethBinaries.json index 600699f6197..6f0f2387638 100644 --- a/gethBinaries.json +++ b/gethBinaries.json @@ -12,15 +12,15 @@ ], "output": [ "Geth", - "1.8.1" + "1.8.12" ] } }, "download": { - "bin": "geth-linux-386-1.8.1-1e67410e/geth", - "sha256": "38286d3597fc850d2c2c683d3c674b3242a83c08c1f7644b32181a06a655e2fc", + "bin": "geth-linux-386-1.8.12-37685930/geth", + "sha256": "fb3673700806e4b45d51d478e3ca53240f3ece51cd1e83d6675b107cb4795d1b", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-1.8.1-1e67410e.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-386-1.8.12-37685930.tar.gz" } }, "x64": { @@ -32,15 +32,15 @@ ], "output": [ "Geth", - "1.8.1" + "1.8.12" ] } }, "download": { - "bin": "geth-linux-amd64-1.8.1-1e67410e/geth", - "sha256": "19021b206d5acf13e789a15a87665b308f1382814b228421c22a8ac3e2bec25f", + "bin": "geth-linux-amd64-1.8.12-37685930/geth", + "sha256": "9aa679d5f060c4d10ce0df55117a17387b12c71bf336b6bf913dd8a71f6b5c78", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.1-1e67410e.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.12-37685930.tar.gz" } } }, @@ -54,15 +54,15 @@ ], "output": [ "Geth", - "1.8.1" + "1.8.12" ] } }, "download": { - "bin": "geth-darwin-amd64-1.8.1-1e67410e/geth", - "sha256": "0261d7083566d50b561c4e58441c56ff386256a15b794fe6211cb86f2a7ce786", + "bin": "geth-darwin-amd64-1.8.12-37685930/geth", + "sha256": "072cd0e4aeb8109beb264685f833d08720c3eed1ad2cdb6b1e36068d575385d6", "type": "tar", - "url": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.8.1-1e67410e.tar.gz" + "url": "https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.8.12-37685930.tar.gz" } } }, @@ -76,15 +76,15 @@ ], "output": [ "Geth", - "1.8.1" + "1.8.12" ] } }, "download": { - "bin": "geth-windows-386-1.8.1-1e67410e\\geth.exe", - "sha256": "1498a758dc5fd5b5aaec6ff0742aafb1fd99650209f76bbedb241b87dca6bc3d", + "bin": "geth-windows-386-1.8.12-37685930\\geth.exe", + "sha256": "8a78d124cd692b86945965b4cc1f0d04a01c8249f0175f185a67bad57934aacf", "type": "zip", - "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-1.8.1-1e67410e.zip" + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-386-1.8.12-37685930.zip" } }, "x64": { @@ -96,20 +96,20 @@ ], "output": [ "Geth", - "1.8.1" + "1.8.12" ] } }, "download": { - "bin": "geth-windows-amd64-1.8.1-1e67410e\\geth.exe", - "sha256": "0a51ad0bebba673a3abe160e833ac81c9757724efe030e714eb761cb67a5fd1a", + "bin": "geth-windows-amd64-1.8.12-37685930\\geth.exe", + "sha256": "13ad985bdcd2c19521439089f8a7f3767aa41914e475f14c1a01e8bdbe29b8d2", "type": "zip", - "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.8.1-1e67410e.zip" + "url": "https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.8.12-37685930.zip" } } } }, - "version": "1.8.1" + "version": "1.8.12" } } } \ No newline at end of file