Skip to content

Commit

Permalink
Cleanup (#198)
Browse files Browse the repository at this point in the history
* Remove unused code

* Pump version
  • Loading branch information
DeRain authored Jan 6, 2022
1 parent 1c68aba commit 7e0e918
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 57 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 7.1.2
- Removed unused code which caused build issues on some environments

## 7.1.0

- Throw `ResolutionErrorCode.InvalidDomainAddress` error if domain contains special characters
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unstoppabledomains/resolution",
"version": "7.1.1",
"version": "7.1.2",
"description": "Domain Resolution for blockchain domains",
"main": "./build/index.js",
"directories": {
Expand Down
4 changes: 1 addition & 3 deletions src/UdApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {toBech32Address} from './utils/znsUtils';
import {ResolutionError, ResolutionErrorCode} from './errors/resolutionError';
import pckg from './package.json';
import {isValidTwitterSignature} from './utils/TwitterSignatureValidator';
import {
CryptoRecords,
Expand Down Expand Up @@ -32,8 +31,7 @@ export default class Udapi extends NamingService {
this.url = api?.url || 'https://unstoppabledomains.com/api/v1';
const DefaultUserAgent =
'cross-fetch/3.1.4 (+https://github.com/lquixada/cross-fetch)';
const version = pckg.version;
const CustomUserAgent = `${DefaultUserAgent} Resolution/${version}`;
const CustomUserAgent = `${DefaultUserAgent} Resolution`;
this.headers = {'X-user-agent': CustomUserAgent};
this.network = api?.network || 1;
}
Expand Down
6 changes: 0 additions & 6 deletions src/errors/configurationError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export enum ConfigurationErrorCode {
IncorrectProvider = 'IncorrectProvider',
UnsupportedNetwork = 'UnsupportedNetwork',
UnspecifiedUrl = 'UnspecifiedUrl',
DependencyMissing = 'DependencyMissing',
NetworkConfigMissing = 'NetworkConfigMissing',
CustomNetworkConfigMissing = 'CustomNetworkConfigMissing',
InvalidConfigurationField = 'InvalidProxyReader',
Expand All @@ -36,11 +35,6 @@ const HandlersByCode = {
[ConfigurationErrorCode.UnspecifiedUrl]: (params: {
method: ResolutionMethod;
}) => `Unspecified url in Resolution ${params.method} configuration`,
[ConfigurationErrorCode.DependencyMissing]: (params: {
dependency: string;
version: string;
}) =>
`Missing dependency for this functionality. Please install ${params.dependency} @ ${params.version} via npm or yarn`,
[ConfigurationErrorCode.NetworkConfigMissing]: (params: {
method: ResolutionMethod;
config: string;
Expand Down
1 change: 0 additions & 1 deletion src/package.json

This file was deleted.

20 changes: 0 additions & 20 deletions src/tests/requireOrFail.test.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/utils/requireOrFail.ts

This file was deleted.

0 comments on commit 7e0e918

Please sign in to comment.