Skip to content

Commit

Permalink
refactor: remove duplicated Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
gtsonevv committed Jul 12, 2024
1 parent 7ce5bda commit 2af0435
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/crypto/src/public_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ function str_to_key_type(keyType: string): KeyType {
}
}

export abstract class Enum {
enum: string;

constructor(properties: any) {
if (Object.keys(properties).length !== 1) {
throw new Error('Enum can only take single value');
}
Object.keys(properties).map((key: string) => {
(this as any)[key] = properties[key];
this.enum = key;
});
}
}

class ED25519PublicKey extends Assignable { keyType: KeyType = KeyType.ED25519; data: Uint8Array; }
class SECP256K1PublicKey extends Assignable { keyType: KeyType = KeyType.ED25519; data: Uint8Array; }

Expand Down

0 comments on commit 2af0435

Please sign in to comment.