diff --git a/VERSIONS.md b/VERSIONS.md index 047bf24..32b748c 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -7,6 +7,11 @@ ### Deprecations +## Version 2.2.1 +### Fixes +- allow minus symbols for ens names + + ## Version 2.2.0 ### Fixes - load dev domain from localStorage `evan-dev-dapps-domain` or from `queryParams.dev-domain` diff --git a/package.json b/package.json index 661fbbe..c04be36 100644 --- a/package.json +++ b/package.json @@ -154,5 +154,5 @@ "serve": "gulp --cwd . --gulpfile gulp/serve.js serve", "serve-build": "gulp --cwd . --gulpfile gulp/serve.js serve --build" }, - "version": "2.2.0" + "version": "2.2.1" } \ No newline at end of file diff --git a/src/app/dapp.ts b/src/app/dapp.ts index cf1d746..d867188 100644 --- a/src/app/dapp.ts +++ b/src/app/dapp.ts @@ -116,7 +116,7 @@ function getVersionDBCPHashFromDAppVersion(requiredVersion: string, childENS: st if (childDefinition && childDefinition) { const originalVersion = requiredVersion; const childVersions = childDefinition.versions || { }; - childVersions[childDefinition.version] = childENS.replace(/-/g, ''); + childVersions[childDefinition.version] = childENS; const versionKeys = Object.keys(childVersions); const splittedVersion = getSplittedVersion(requiredVersion); diff --git a/src/app/utils.ts b/src/app/utils.ts index 6176b59..3cb4ac6 100644 --- a/src/app/utils.ts +++ b/src/app/utils.ts @@ -85,7 +85,7 @@ export async function setUpDevMode(): Promise { */ export function isDevAvailable(name): boolean { if (evanGlobals.devMode) { - return evanGlobals.devMode.indexOf(name.replace(/\-/g, '')) !== -1; + return evanGlobals.devMode.indexOf(name) !== -1; } return false; @@ -219,7 +219,7 @@ export async function onDeviceReady(): Promise { * @return {string} dappname including sub ens paths */ export function getDAppName(ensAddress: string) { - let dappName = ensAddress.replace(/\-/g, ''); + let dappName = ensAddress; try { dappName = /^(.*)\.[^.]+$/.exec(dappName)[1]; diff --git a/src/systemjs-plugins/ens.js b/src/systemjs-plugins/ens.js index 7578f29..46fcdf8 100644 --- a/src/systemjs-plugins/ens.js +++ b/src/systemjs-plugins/ens.js @@ -44,11 +44,11 @@ try { */ const getDefinitionFromEns = function(ensAddress, domain) { // remove domain from the end of the ensAddress to get the dapp name - let dappName = ensAddress.replace(/\-/g, '').split('.'); + let dappName = ensAddress.split('.'); dappName = dappName.slice(0, dappName.length - 1).join('.'); // get correct ens address and check if a cached ens is availabled - const validEnsAddress = ensAddress.replace(/-/g, ''); + const validEnsAddress = ensAddress; const cacheAvailable = ensCache[validEnsAddress] && ensCache[validEnsAddress] !== 'invalid'; // loading chain used to reload the ens data after 3 seconds, when cached