From f1911ef153d9aeaf895d5de77ffa03ae1bf1993d Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Thu, 27 May 2021 18:50:39 +0800 Subject: [PATCH 1/3] feat: new domain for testnet faucet (#344) --- app/_locales/bn/messages.json | 2 +- app/manifest.json | 37 ++++++++----------------------- app/scripts/lib/buy-eth-url.js | 8 +++---- test/unit/app/buy-eth-url.spec.js | 2 +- 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index 4ec8cf28fe21..f757cc653e88 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -738,7 +738,7 @@ "message": "আপনার সীড ফ্রেজ বিষয়ে সাবধান থাকুন — এমন ওয়েবসাইটগুলির রিপোর্ট পাওয়া গেছে যেগুলি ConfluxPortal কে অনুকরণ করার চেষ্টা করে। ConfluxPortal কখনও আপনার সীড ফ্রেজ জিজ্ঞাসা করবে না।" }, "protectYourKeysMessage2": { - "message": "আপনার ফ্রেজটিকে নিরাপদে রাখুন।সন্দেহজনক কিছু দেখলে, বা একটি ওয়েবসাইট সম্পর্কে নিশ্চিত না হলে, portal@conflux-chain.org এ ইমেল করুন" + "message": "আপনার ফ্রেজটিকে নিরাপদে রাখুন।সন্দেহজনক কিছু দেখলে, বা একটি ওয়েবসাইট সম্পর্কে নিশ্চিত না হলে, portal@confluxnetwork.org এ ইমেল করুন" }, "rpcUrl": { "message": "নতুন RPC URL" diff --git a/app/manifest.json b/app/manifest.json index f557860b2ca0..1aace59f80ef 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -3,7 +3,7 @@ "short_name": "ConfluxPortal", "version": "0.6.7", "manifest_version": 2, - "author": "https://conflux-chain.org", + "author": "https://confluxnetwork.org", "description": "__MSG_appDescription__", "commands": { "_execute_browser_action": { @@ -32,11 +32,7 @@ }, "default_locale": "en", "background": { - "scripts": [ - "chromereload.js", - "bg-libs.js", - "background.js" - ], + "scripts": ["chromereload.js", "bg-libs.js", "background.js"], "persistent": true }, "browser_action": { @@ -54,24 +50,14 @@ }, "content_scripts": [ { - "matches": [ - "file://*/*", - "http://*/*", - "https://*/*" - ], - "js": [ - "portal-contentscript.js" - ], + "matches": ["file://*/*", "http://*/*", "https://*/*"], + "js": ["portal-contentscript.js"], "run_at": "document_start", "all_frames": true }, { - "matches": [ - "*://connect.trezor.io/*/popup.html" - ], - "js": [ - "vendor/trezor/content-script.js" - ] + "matches": ["*://connect.trezor.io/*/popup.html"], + "js": ["vendor/trezor/content-script.js"] } ], "permissions": [ @@ -84,20 +70,15 @@ "webRequest", "notifications" ], - "web_accessible_resources": [ - "portal-inpage.js", - "phishing.html" - ], + "web_accessible_resources": ["portal-inpage.js", "phishing.html"], "externally_connectable": { "matches": [ "https://confluxscan.io/*", "https://testnet.confluxscan.io/*", - "https://conflux-chain.org/*", + "https://confluxnetwork.org/*", "https://portal-main.confluxrpc.com/*", "https://portal-test.confluxrpc.com/*" ], - "ids": [ - "*" - ] + "ids": ["*"] } } diff --git a/app/scripts/lib/buy-eth-url.js b/app/scripts/lib/buy-eth-url.js index 4e91d012bc4e..732fade62027 100644 --- a/app/scripts/lib/buy-eth-url.js +++ b/app/scripts/lib/buy-eth-url.js @@ -12,7 +12,7 @@ export default getBuyEthUrl * network does not match any of the specified cases, or if no network is given, returns undefined. * */ -function getBuyEthUrl ({ network, /* amount, */ address, service, type }) { +function getBuyEthUrl({ network, /* amount, */ address, service, type }) { // default service by network if not specified if (type && !service) { service = getDefaultServiceForType(type) @@ -26,13 +26,13 @@ function getBuyEthUrl ({ network, /* amount, */ address, service, type }) { case 'conflux-main-faucet': return `https://confluxscan.io/sponsor` case 'conflux-test-faucet': - return `http://test-faucet.conflux-chain.org:18088/dev/ask?address=${address}` + return `http://test-faucet.confluxnetwork.org:18088/dev/ask?address=${address}` default: throw new Error(`Unknown cryptocurrency exchange or faucet: "${service}"`) } } -function getDefaultServiceForNetwork (network) { +function getDefaultServiceForNetwork(network) { switch (network) { case '1029': return 'conflux-main-faucet' @@ -43,7 +43,7 @@ function getDefaultServiceForNetwork (network) { } } -function getDefaultServiceForType (type) { +function getDefaultServiceForType(type) { switch (type) { case 'mainnet': return 'conflux-main-faucet' diff --git a/test/unit/app/buy-eth-url.spec.js b/test/unit/app/buy-eth-url.spec.js index a3b2d299ceaf..81c7ccdf7274 100644 --- a/test/unit/app/buy-eth-url.spec.js +++ b/test/unit/app/buy-eth-url.spec.js @@ -33,7 +33,7 @@ describe('buy-eth-url', function() { const testnetUrl = getBuyEthUrl(testnet) assert.equal( testnetUrl, - 'http://test-faucet.conflux-chain.org:18088/dev/ask?address=0x1dcd5d886577d5081b0c52e242ef29e70be3e7bc' + 'http://test-faucet.confluxnetwork.org:18088/dev/ask?address=0x1dcd5d886577d5081b0c52e242ef29e70be3e7bc' ) }) From 4c9eefa26d8412550b0289c5413fc761c2b04d21 Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Thu, 27 May 2021 21:30:13 +0800 Subject: [PATCH 2/3] docs: changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5957b96b92ca..660c48660486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## Current Develop Branch +- feat: new domain for testnet faucet (#344) + ## 0.6.7 Thu May 27 2021 + - feat: @conflux-chain to @confluxnetwork (#341) ## 0.6.6 Tue May 18 2021 From f70329506ec149ae948d864df4a8c7b4b2a5153f Mon Sep 17 00:00:00 2001 From: Conflux Bot Date: Thu, 27 May 2021 13:31:00 +0000 Subject: [PATCH 3/3] Version v0.6.8 --- CHANGELOG.md | 2 ++ app/manifest.json | 35 +++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 660c48660486..2cdc5ac8fddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Develop Branch +## 0.6.8 Thu May 27 2021 + - feat: new domain for testnet faucet (#344) ## 0.6.7 Thu May 27 2021 diff --git a/app/manifest.json b/app/manifest.json index 1aace59f80ef..d87a42be023b 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "ConfluxPortal", "short_name": "ConfluxPortal", - "version": "0.6.7", + "version": "0.6.8", "manifest_version": 2, "author": "https://confluxnetwork.org", "description": "__MSG_appDescription__", @@ -32,7 +32,11 @@ }, "default_locale": "en", "background": { - "scripts": ["chromereload.js", "bg-libs.js", "background.js"], + "scripts": [ + "chromereload.js", + "bg-libs.js", + "background.js" + ], "persistent": true }, "browser_action": { @@ -50,14 +54,24 @@ }, "content_scripts": [ { - "matches": ["file://*/*", "http://*/*", "https://*/*"], - "js": ["portal-contentscript.js"], + "matches": [ + "file://*/*", + "http://*/*", + "https://*/*" + ], + "js": [ + "portal-contentscript.js" + ], "run_at": "document_start", "all_frames": true }, { - "matches": ["*://connect.trezor.io/*/popup.html"], - "js": ["vendor/trezor/content-script.js"] + "matches": [ + "*://connect.trezor.io/*/popup.html" + ], + "js": [ + "vendor/trezor/content-script.js" + ] } ], "permissions": [ @@ -70,7 +84,10 @@ "webRequest", "notifications" ], - "web_accessible_resources": ["portal-inpage.js", "phishing.html"], + "web_accessible_resources": [ + "portal-inpage.js", + "phishing.html" + ], "externally_connectable": { "matches": [ "https://confluxscan.io/*", @@ -79,6 +96,8 @@ "https://portal-main.confluxrpc.com/*", "https://portal-test.confluxrpc.com/*" ], - "ids": ["*"] + "ids": [ + "*" + ] } }