File tree 5 files changed +490
-307
lines changed 5 files changed +490
-307
lines changed Original file line number Diff line number Diff line change 43
43
},
44
44
"devDependencies" : {
45
45
"@lavamoat/allow-scripts" : " ^3.2.1" ,
46
+ "@lavamoat/preinstall-always-fail" : " ^2.1.0" ,
46
47
"@metamask/auto-changelog" : " ^3.1.0" ,
47
48
"@metamask/eslint-config" : " ^12.2.0" ,
48
49
"@metamask/eslint-config-jest" : " ^12.1.0" ,
58
59
"@typescript-eslint/parser" : " ^5.33.0" ,
59
60
"eslint" : " ^8.48.0" ,
60
61
"eslint-config-prettier" : " ^8.8.0" ,
61
- "eslint-plugin-import" : " ^2.27.5 " ,
62
+ "eslint-plugin-import" : " ~2.26.0 " ,
62
63
"eslint-plugin-jest" : " ^27.1.5" ,
63
64
"eslint-plugin-jsdoc" : " ^39.2.9" ,
64
65
"eslint-plugin-n" : " ^15.7.0" ,
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ import {
17
17
import nock from 'nock' ;
18
18
import * as sinon from 'sinon' ;
19
19
20
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
21
- // @ts -ignore
20
+ import packageJson from '../package.json' ;
21
+ import { advanceTime , flushPromises , getFakeProvider } from '../tests/helpers' ;
22
22
import { API_BASE_URL , SENTINEL_API_BASE_URL_MAP } from './constants' ;
23
23
import SmartTransactionsController , {
24
24
DEFAULT_INTERVAL ,
@@ -33,8 +33,6 @@ import type {
33
33
import type { SmartTransaction , UnsignedTransaction , Hex } from './types' ;
34
34
import { SmartTransactionStatuses } from './types' ;
35
35
import * as utils from './utils' ;
36
- import packageJson from '../package.json' ;
37
- import { advanceTime , flushPromises , getFakeProvider } from '../tests/helpers' ;
38
36
39
37
jest . mock ( '@ethersproject/bytes' , ( ) => ( {
40
38
...jest . requireActual ( '@ethersproject/bytes' ) ,
Original file line number Diff line number Diff line change 1
1
import { ChainId } from '@metamask/controller-utils' ;
2
2
3
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4
- // @ts -ignore
3
+ import packageJson from '../package.json' ;
5
4
import { API_BASE_URL , SENTINEL_API_BASE_URL_MAP } from './constants' ;
6
5
import {
7
6
SmartTransactionMinedTx ,
@@ -10,7 +9,6 @@ import {
10
9
SmartTransactionCancellationReason ,
11
10
} from './types' ;
12
11
import * as utils from './utils' ;
13
- import packageJson from '../package.json' ;
14
12
15
13
const createSignedTransaction = ( ) => {
16
14
return '0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a02b79f322a625d623a2bb2911e0c6b3e7eaf741a7c7c5d2e8c67ef3ff4acf146ca01ae168fea63dc3391b75b586c8a7c0cb55cdf3b8e2e4d8e097957a3a56c6f2c5' ;
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ import { BigNumber } from 'bignumber.js';
5
5
import jsonDiffer from 'fast-json-patch' ;
6
6
import _ from 'lodash' ;
7
7
8
+ // Ignoring TypeScript errors here because this import is disallowed for production builds, because
9
+ // the `package.json` file is above the root directory.
8
10
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
11
+ // @ts -ignore
12
+ import packageJson from '../package.json' ;
9
13
import { API_BASE_URL , SENTINEL_API_BASE_URL_MAP } from './constants' ;
10
14
import type { SmartTransaction , SmartTransactionsStatus } from './types' ;
11
15
import {
@@ -15,9 +19,6 @@ import {
15
19
SmartTransactionMinedTx ,
16
20
cancellationReasonToStatusMap ,
17
21
} from './types' ;
18
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
19
- // @ts -ignore
20
- import packageJson from '../package.json' ;
21
22
22
23
export function isSmartTransactionPending ( smartTransaction : SmartTransaction ) {
23
24
return smartTransaction . status === SmartTransactionStatuses . PENDING ;
You can’t perform that action at this time.
0 commit comments