Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Aug 6, 2024
1 parent 8069270 commit fb8f05e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions packages/crypto/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export enum KeyType {
SECP256K1 = 1,
}

export enum KeySize {
SECRET_KEY = 32,
ED25519_PUBLIC_KEY = 32,
SECP256k1_PUBLIC_KEY = 64,
}
export const KeySize = {
SECRET_KEY: 32,
ED25519_PUBLIC_KEY: 32,
SECP256k1_PUBLIC_KEY: 64,
};
2 changes: 1 addition & 1 deletion packages/crypto/src/public_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function resolveEnumKeyName(keyType: KeyType) {
return 'ed25519Key';
}
case KeyType.SECP256K1: {
return 'secp256k1Key'
return 'secp256k1Key';
}
default: {
throw Error(`unknown type ${keyType}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/keystores-browser/test/browser_keystore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Browser keystore', () => {
});

describe('Browser multi keystore', () => {
let ctx: any = {};
const ctx: any = {};

beforeAll(async () => {
ctx.keyStore = new MultiContractBrowserLocalStorageKeyStore(LocalStorageMemory);
Expand Down
2 changes: 1 addition & 1 deletion packages/transactions/src/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function resolveEnumKeyName(keyType: KeyType) {
return 'ed25519Signature';
}
case KeyType.SECP256K1: {
return 'secp256k1Signature'
return 'secp256k1Signature';
}
default: {
throw Error(`unknown type ${keyType}`);
Expand Down
14 changes: 7 additions & 7 deletions packages/utils/test/rpc-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('rpc-errors', () => {
});

test('test ShardCongested error', async () => {
let rpc_error = {
const rpc_error = {
TxExecutionError: {
InvalidTxError: {
ShardCongested: {
Expand All @@ -56,7 +56,7 @@ describe('rpc-errors', () => {
}
}
};
let error: any = parseRpcError(rpc_error);
const error: any = parseRpcError(rpc_error);
expect(error.type === 'ShardCongested').toBe(true);
expect(error.shard_id).toBe(2);
expect(error.congestion_level).toBe(0.4);
Expand All @@ -66,7 +66,7 @@ describe('rpc-errors', () => {
});

test('test ShardStuck error', async () => {
let rpc_error = {
const rpc_error = {
TxExecutionError: {
InvalidTxError: {
ShardStuck: {
Expand All @@ -76,7 +76,7 @@ describe('rpc-errors', () => {
}
}
};
let error: any = parseRpcError(rpc_error);
const error: any = parseRpcError(rpc_error);
expect(error.type === 'ShardStuck').toBe(true);
expect(error.shard_id).toBe(2);
expect(error.missed_chunks).toBe(5);
Expand All @@ -86,7 +86,7 @@ describe('rpc-errors', () => {
});

test('test ReceiptSizeExceeded error', async () => {
let rpc_error = {
const rpc_error = {
TxExecutionError: {
InvalidTxError: {
ReceiptValidationError: {
Expand All @@ -98,12 +98,12 @@ describe('rpc-errors', () => {
}
}
};
let error: any = parseRpcError(rpc_error);
const error: any = parseRpcError(rpc_error);
expect(error.type === 'ReceiptSizeExceeded').toBe(true);
expect(error.limit).toBe(100);
expect(error.size).toBe(101);
expect(formatError(error.type, error)).toBe(
'{\"type\":\"ReceiptSizeExceeded\",\"limit\":100,\"size\":101,\"kind\":{\"limit\":100,\"size\":101}}'
'{"type":"ReceiptSizeExceeded","limit":100,"size":101,"kind":{"limit":100,"size":101}}'
);
});

Expand Down

0 comments on commit fb8f05e

Please sign in to comment.