File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
1
import { arrToBufArr , ecsign , publicToAddress } from '@ethereumjs/util' ;
2
- import { keccak256 } from 'ethereum-cryptography/keccak' ;
3
2
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' ;
4
10
import {
5
11
add0x ,
6
12
assert ,
@@ -13,13 +19,8 @@ import {
13
19
signedBigIntToBytes ,
14
20
stringToBytes ,
15
21
} 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
+
23
24
import {
24
25
concatSig ,
25
26
isNullish ,
@@ -360,7 +361,9 @@ function encodeData(
360
361
validateVersion ( version , [ SignTypedDataVersion . V3 , SignTypedDataVersion . V4 ] ) ;
361
362
362
363
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
+ ] ;
364
367
365
368
for ( const field of types [ primaryType ] ) {
366
369
if ( version === SignTypedDataVersion . V3 && data [ field . name ] === undefined ) {
Original file line number Diff line number Diff line change 7
7
ToBufferInputTypes ,
8
8
toUnsigned ,
9
9
} from '@ethereumjs/util' ;
10
- import { intToHex , isHexString , stripHexPrefix } from 'ethjs-util' ;
11
10
import { add0x , bytesToHex , numberToBytes } from '@metamask/utils' ;
11
+ import { intToHex , isHexString , stripHexPrefix } from 'ethjs-util' ;
12
12
13
13
/**
14
14
* Pads the front of the given hex string with zeroes until it reaches the
You can’t perform that action at this time.
0 commit comments