Skip to content

Commit

Permalink
refactor: rename variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
eum602 committed May 26, 2023
1 parent 73c7a56 commit 0adab43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { DidServiceWebLac } from './services/did-lac/didWebLac.service';
export { DidLac1Service } from './services/did-lac/didLac1.service';
export {
didWelLacAttributes,
didLacAttributes,
DidLacService
} from './services/did-lac/interfaces/did-lac.service';
export { DidService, did as DidType } from './services/interfaces/did.service';
Expand Down
7 changes: 2 additions & 5 deletions src/services/did-lac/did.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ import {
import { Interface, keccak256, toUtf8Bytes } from 'ethers/lib/utils';
import DIDRegistryContractInterface from './did-registry';
import { BadRequestError } from 'routing-controllers';
import {
DidLacService,
didWelLacAttributes
} from './interfaces/did-lac.service';
import { DidLacService, didLacAttributes } from './interfaces/did-lac.service';
import { ErrorsMessages } from '../../constants/errorMessages';
import {
IJwkAttribute,
Expand Down Expand Up @@ -196,7 +193,7 @@ export abstract class DidService implements DidLacService {
return { did: did.did };
}

decodeDid(did: string): didWelLacAttributes {
decodeDid(did: string): didLacAttributes {
const trimmed = did.replace(this.didIdentifier, '');
const data = Buffer.from(this.base58.decode(trimmed));
const len = data.length;
Expand Down
4 changes: 2 additions & 2 deletions src/services/did-lac/interfaces/did-lac.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from 'src/interfaces/did-web-lac/did-web-lac.interface';
import { DidService } from '../../interfaces/did.service';

export type didWelLacAttributes = {
export type didLacAttributes = {
address: string;
didRegistryAddress: string;
chainId: string;
Expand All @@ -14,5 +14,5 @@ export interface DidLacService extends DidService {
addRsaJwkAttribute(jwkRsaAttribute: IJwkRsaAttribute): Promise<any>;
addEcJwkAttribute(ecJwkAttribute: IJwkEcAttribute): Promise<any>;
getController(did: string): Promise<any>;
decodeDid(did: string): didWelLacAttributes;
decodeDid(did: string): didLacAttributes;
}

0 comments on commit 0adab43

Please sign in to comment.