Skip to content

Commit cd3f434

Browse files
fix: refactor import paths to fix generated types (#1130)
Co-authored-by: Jimmy Hardwick <[email protected]>
1 parent 8f5983d commit cd3f434

File tree

8 files changed

+16
-17
lines changed

8 files changed

+16
-17
lines changed

packages/internal/dex/sdk/src/config/config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Environment, ImmutableConfiguration } from '@imtbl/config';
22
import { ChainNotSupportedError, InvalidConfigurationError } from 'errors';
33
import * as test from 'test/utils';
44
import { ERC20 } from 'types';
5-
import { ExchangeModuleConfiguration, ExchangeOverrides } from '../types';
6-
import { ExchangeConfiguration, ExchangeContracts } from './index';
5+
import { ExchangeContracts, ExchangeModuleConfiguration, ExchangeOverrides } from '../types';
6+
import { ExchangeConfiguration } from './index';
77
import { IMMUTABLE_TESTNET_CHAIN_ID } from '../constants/chains';
88

99
describe('ExchangeConfiguration', () => {

packages/internal/dex/sdk/src/config/index.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Environment, ImmutableConfiguration } from '@imtbl/config';
22
import { ChainNotSupportedError, InvalidConfigurationError } from 'errors';
33
import { isValidNonZeroAddress } from 'lib';
4-
import { ExchangeModuleConfiguration, ExchangeOverrides, SecondaryFee, Chain } from '../types';
4+
import { ExchangeContracts, ExchangeModuleConfiguration, ExchangeOverrides, SecondaryFee, Chain } from '../types';
55
import {
66
IMMUTABLE_TESTNET_CHAIN_ID,
77
IMMUTABLE_TESTNET_COMMON_ROUTING_TOKENS,
@@ -10,14 +10,6 @@ import {
1010
TIMX_IMMUTABLE_TESTNET,
1111
} from '../constants';
1212

13-
export type ExchangeContracts = {
14-
multicall: string;
15-
coreFactory: string;
16-
quoterV2: string;
17-
peripheryRouter: string;
18-
secondaryFee: string;
19-
};
20-
2113
export const CONTRACTS_FOR_CHAIN_ID: Record<number, ExchangeContracts> = {
2214
[IMMUTABLE_TESTNET_CHAIN_ID]: {
2315
multicall: '0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92',

packages/internal/dex/sdk/src/types/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import { ethers } from 'ethers';
22
import { ModuleConfiguration } from '@imtbl/config';
3-
import { ExchangeContracts } from 'config';
3+
4+
export type ExchangeContracts = {
5+
multicall: string;
6+
coreFactory: string;
7+
quoterV2: string;
8+
peripheryRouter: string;
9+
secondaryFee: string;
10+
};
411

512
/**
613
* Type representing a Chain

packages/provider/src/genericImxProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ProviderConfiguration } from 'config';
21
import {
32
AnyToken,
43
RegisterUserResponse,
@@ -19,6 +18,7 @@ import {
1918
EthSigner,
2019
} from '@imtbl/core-sdk';
2120
import { TransactionResponse } from '@ethersproject/providers';
21+
import { ProviderConfiguration } from './config';
2222
import { IMXProvider } from './imxProvider';
2323
import { Signers } from './signable-actions/types';
2424
import { batchTransfer, transfer } from './signable-actions/transfer';

packages/provider/src/l1-providers/metaMaskWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ProviderConfiguration } from 'config';
1+
import { ProviderConfiguration } from '../config';
22
import { connect } from './metaMask';
33
import {
44
connect as buildImxSigner,

packages/provider/src/signable-actions/withdrawal-actions/completeERC721Withdrawal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@imtbl/core-sdk';
99
import * as encUtils from 'enc-utils';
1010
import { TransactionResponse } from '@ethersproject/providers';
11-
import { ProviderConfiguration } from 'config';
11+
import { ProviderConfiguration } from '../../config';
1212
import { getEncodeAssetInfo } from './getEncodeAssetInfo';
1313
import {
1414
getSignableRegistrationOnchain,

packages/provider/src/signable-actions/withdrawal-actions/completeEthWithdrawal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Signer } from '@ethersproject/abstract-signer';
22
import { TransactionResponse } from '@ethersproject/providers';
33
import { Contracts, ImmutableXConfiguration, UsersApi } from '@imtbl/core-sdk';
4-
import { ProviderConfiguration } from 'config';
4+
import { ProviderConfiguration } from '../../config';
55
import {
66
getSignableRegistrationOnchain,
77
isRegisteredOnChain,

packages/provider/src/signable-actions/withdrawal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TokenAmount, AnyToken } from '@imtbl/core-sdk';
2-
import { ProviderConfiguration } from 'config';
2+
import { ProviderConfiguration } from '../config';
33
import { Signers } from './types';
44
import {
55
prepareWithdrawalAction,

0 commit comments

Comments
 (0)