Skip to content

Commit 9109b6d

Browse files
committed
lint:fix
1 parent 601eed4 commit 9109b6d

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/sign-typed-data.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { arrToBufArr, ecsign, publicToAddress } from '@ethereumjs/util';
2-
import { keccak256 } from 'ethereum-cryptography/keccak';
32
import { encode, encodePacked } from '@metamask/abi-utils';
3+
import {
4+
getArrayType,
5+
getByteLength,
6+
getLength,
7+
isArrayType,
8+
} from '@metamask/abi-utils/dist/parsers';
9+
import { padStart } from '@metamask/abi-utils/dist/utils';
410
import {
511
add0x,
612
assert,
@@ -13,13 +19,8 @@ import {
1319
signedBigIntToBytes,
1420
stringToBytes,
1521
} from '@metamask/utils';
16-
import {
17-
getArrayType,
18-
getByteLength,
19-
getLength,
20-
isArrayType,
21-
} from '@metamask/abi-utils/dist/parsers';
22-
import { padStart } from '@metamask/abi-utils/dist/utils';
22+
import { keccak256 } from 'ethereum-cryptography/keccak';
23+
2324
import {
2425
concatSig,
2526
isNullish,
@@ -360,7 +361,9 @@ function encodeData(
360361
validateVersion(version, [SignTypedDataVersion.V3, SignTypedDataVersion.V4]);
361362

362363
const encodedTypes = ['bytes32'];
363-
const encodedValues: (string | bigint | boolean | Uint8Array | Buffer)[] = [hashType(primaryType, types)];
364+
const encodedValues: (string | bigint | boolean | Uint8Array | Buffer)[] = [
365+
hashType(primaryType, types),
366+
];
364367

365368
for (const field of types[primaryType]) {
366369
if (version === SignTypedDataVersion.V3 && data[field.name] === undefined) {

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
ToBufferInputTypes,
88
toUnsigned,
99
} from '@ethereumjs/util';
10-
import { intToHex, isHexString, stripHexPrefix } from 'ethjs-util';
1110
import { add0x, bytesToHex, numberToBytes } from '@metamask/utils';
11+
import { intToHex, isHexString, stripHexPrefix } from 'ethjs-util';
1212

1313
/**
1414
* Pads the front of the given hex string with zeroes until it reaches the

0 commit comments

Comments
 (0)