aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/ens-ipfs/setup.js
diff options
context:
space:
mode:
authorAlessandro Ricottone <ricott2@gmail.com>2019-07-24 03:29:20 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-07-24 03:29:20 +0800
commite81aa6073d30d5a93fce9a2414203e8367ae16b9 (patch)
tree2c3d44a8bedc97fd68ac63a7480ef75bc0f48eda /app/scripts/lib/ens-ipfs/setup.js
parent2788a9463f4bbf4cc670eaaec62ae84de64cafed (diff)
downloadtangerine-wallet-browser-e81aa6073d30d5a93fce9a2414203e8367ae16b9.tar.gz
tangerine-wallet-browser-e81aa6073d30d5a93fce9a2414203e8367ae16b9.tar.zst
tangerine-wallet-browser-e81aa6073d30d5a93fce9a2414203e8367ae16b9.zip
Resolve onion addresses (#6869)
* Resolve onion address * npm i content-hash@latest
Diffstat (limited to 'app/scripts/lib/ens-ipfs/setup.js')
-rw-r--r--app/scripts/lib/ens-ipfs/setup.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/scripts/lib/ens-ipfs/setup.js b/app/scripts/lib/ens-ipfs/setup.js
index 82679db5d..86f3e7d47 100644
--- a/app/scripts/lib/ens-ipfs/setup.js
+++ b/app/scripts/lib/ens-ipfs/setup.js
@@ -51,6 +51,8 @@ function setupEnsIpfsResolver ({ provider }) {
}
} else if (type === 'swarm-ns') {
url = `https://swarm-gateways.net/bzz:/${hash}${path}${search || ''}`
+ } else if (type === 'onion' || type === 'onion3') {
+ url = `http://${hash}.onion${path}${search || ''}`
}
} catch (err) {
console.warn(err)