Skip to content

Commit 5986f4c

Browse files
fix: Enable lib checks (#1275)
Co-authored-by: Mikhala <mikhala.kurtjak@immutable.com>
1 parent ff12430 commit 5986f4c

20 files changed

Lines changed: 83 additions & 82 deletions

File tree

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
"*": "yarn scan:secrets",
3131
"*.{js,jsx,ts,tsx}": "eslint"
3232
},
33-
"overrides": {
34-
"@openzeppelin/contracts": "3.4.2-solc-0.7"
35-
},
3633
"packageManager": "yarn@3.6.1",
3734
"private": true,
3835
"repository": "immutable/ts-immutable-sdk.git",
3936
"resolutions": {
40-
"@openzeppelin/contracts": "3.4.2-solc-0.7"
37+
"responselike": "^2.0.0"
4138
},
4239
"scripts": {
4340
"build": "NODE_OPTIONS=--max-old-space-size=14366 wsrun -y 4 -p @imtbl/sdk -p @imtbl/checkout-widgets-lib -e -r --serial build && yarn syncpack:format && yarn wsrun -p @imtbl/sdk -a -m copyBrowserBundles",

packages/blockchain-data/sample-app/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function Home() {
2828
const client = new BlockchainData(config);
2929

3030
try {
31-
const request: ChainsTypes.ListChainsRequest = {};
31+
const request: ChainsTypes.ListChainsRequestParams = {};
3232
const response = await client.listChains(request);
3333
setResponse(response);
3434
} catch (error) {

packages/checkout/sdk/src/smartCheckout/routing/bridge/getBridgeFeeEstimate.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const getBridgeFeeEstimate = async (
2121
);
2222

2323
try {
24-
const fee = await bridge.getFee(
24+
const bridgeFeeResponse = await bridge.getFee(
2525
{
2626
action: BridgeFeeActions.DEPOSIT,
2727
gasMultiplier: 1.1,
@@ -30,9 +30,10 @@ export const getBridgeFeeEstimate = async (
3030
},
3131
);
3232

33-
fee.approvalGas = BigNumber.from(0);
34-
35-
return fee;
33+
return {
34+
...bridgeFeeResponse,
35+
approvalGas: BigNumber.from(0),
36+
};
3637
} catch (err: any) {
3738
throw new CheckoutError(
3839
'Error estimating gas for bridge',

packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ export function BridgeForm(props: BridgeFormProps) {
232232
const gasEstimate = await tokenBridge!.getFee({
233233
action: bridgeFeeAction,
234234
gasMultiplier: 1.1,
235-
sourceChainId: from?.network.toString(),
236-
destinationChainId: to?.network.toString(),
235+
sourceChainId: from?.network.toString() ?? '',
236+
destinationChainId: to?.network.toString() ?? '',
237237
});
238238

239239
const gasEstimateResult = {

packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeReviewSummary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ export function BridgeReviewSummary() {
113113
const [unsignedApproveTransaction, unsignedTransaction] = await Promise.all([
114114
tokenBridge!.getUnsignedApproveBridgeTx({
115115
senderAddress: fromAddress,
116-
token: token?.address,
116+
token: token.address ?? '',
117117
amount: utils.parseUnits(amount, token.decimals),
118118
sourceChainId: from?.network.toString(),
119119
destinationChainId: to?.network.toString(),
120120
}),
121121
tokenBridge!.getUnsignedBridgeTx({
122122
senderAddress: fromAddress,
123123
recipientAddress: toAddress,
124-
token: token?.address,
124+
token: token.address ?? '',
125125
amount: utils.parseUnits(amount, token.decimals),
126126
sourceChainId: from?.network.toString(),
127127
destinationChainId: to?.network.toString(),

packages/internal/bridge/sdk/src/constants/bridges.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22

3-
import { AxelarChainDetails, BridgeInstance } from 'types';
3+
import { AxelarChainDetails, BridgeInstance } from '../types';
44

55
/**
66
* @constant {string} ETH_SEPOLIA_CHAIN_ID - The chain ID for the Ethereum Sepolia testnet (EIP-155 compatible format).

packages/internal/bridge/sdk/src/tokenBridge.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import axios, { AxiosResponse } from 'axios';
33
import {
44
ETH_MAINNET_TO_ZKEVM_MAINNET, ETH_SEPOLIA_TO_ZKEVM_TESTNET, axelarAPIEndpoints, axelarChains, bridgeMethods,
55
} from 'constants/bridges';
6-
import { BridgeConfiguration } from 'config';
76
import { ethers } from 'ethers';
7+
import { ROOT_ERC20_BRIDGE_FLOW_RATE } from 'contracts/ABIs/RootERC20BridgeFlowRate';
8+
import { ERC20 } from 'contracts/ABIs/ERC20';
9+
import { BridgeError, BridgeErrorType, withBridgeError } from 'errors';
10+
import { CHILD_ERC20_BRIDGE } from 'contracts/ABIs/ChildERC20Bridge';
11+
import { getGasPriceInWei } from 'lib/gasPriceInWei';
12+
import { BridgeConfiguration } from './config';
813
import {
914
BridgeFeeRequest,
1015
BridgeFeeResponse,
@@ -28,12 +33,7 @@ import {
2833
FlowRateWithdrawResponse,
2934
FlowRateInfoRequest,
3035
CalculateBridgeFeeResponse,
31-
} from 'types';
32-
import { ROOT_ERC20_BRIDGE_FLOW_RATE } from 'contracts/ABIs/RootERC20BridgeFlowRate';
33-
import { ERC20 } from 'contracts/ABIs/ERC20';
34-
import { BridgeError, BridgeErrorType, withBridgeError } from 'errors';
35-
import { CHILD_ERC20_BRIDGE } from 'contracts/ABIs/ChildERC20Bridge';
36-
import { getGasPriceInWei } from 'lib/gasPriceInWei';
36+
} from './types';
3737

3838
/**
3939
* Represents a token bridge, which manages asset transfers between two chains.

packages/internal/dex/sdk/src/constants/tokens/immutable-testnet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IMMUTABLE_TESTNET_CHAIN_ID } from 'constants/chains';
2-
import { ERC20, Native } from 'types';
2+
import { ERC20, Native } from '../../types';
33

44
export const NATIVE_IMX_IMMUTABLE_TESTNET: Native = {
55
chainId: IMMUTABLE_TESTNET_CHAIN_ID,

packages/internal/generated-clients/src/multi-rollup/domain/activities-api-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export { ListActivitiesResult } from '../models';
4343
* @export
4444
* @interface GetActivityRequest
4545
*/
46-
export interface GetActivityRequest {
46+
export interface GetActivityRequestParams {
4747
/**
4848
* The name of chain
4949
* @type {string}
@@ -64,7 +64,7 @@ export interface GetActivityRequest {
6464
* @export
6565
* @interface ListActivitiesRequest
6666
*/
67-
export interface ListActivitiesRequest {
67+
export interface ListActivitiesRequestParams {
6868
/**
6969
* The name of chain
7070
* @type {string}
@@ -127,7 +127,7 @@ export interface ListActivitiesRequest {
127127
* @export
128128
* @interface ListActivityHistoryRequest
129129
*/
130-
export interface ListActivityHistoryRequest {
130+
export interface ListActivityHistoryRequestParams {
131131
/**
132132
* The name of chain
133133
* @type {string}

packages/internal/generated-clients/src/multi-rollup/domain/chains-api-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export { ListChainsResult } from '../models';
3535
* @export
3636
* @interface ListChainsRequest
3737
*/
38-
export interface ListChainsRequest {
38+
export interface ListChainsRequestParams {
3939
/**
4040
* Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
4141
* @type {string}

0 commit comments

Comments
 (0)