From 22b3d08e8e908198f6e9c750c5422cff538fa1a1 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 12 Oct 2023 09:45:58 +0200 Subject: [PATCH 01/15] chore: initial package and config changes to build both cjs and esm --- package.json | 6 ++++-- tsconfig-base.json | 26 ++++++++++++++++++++++++++ tsconfig-cjs.json | 8 ++++++++ tsconfig.json | 28 +++------------------------- 4 files changed, 41 insertions(+), 27 deletions(-) create mode 100644 tsconfig-base.json create mode 100644 tsconfig-cjs.json diff --git a/package.json b/package.json index 04c4d3af..f8a9cbbf 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,10 @@ "kBTC" ], "scripts": { - "build": "run-s generate:defs generate:meta build:tsc", - "build:tsc": "tsc -p tsconfig.json", + "build": "run-s generate:defs generate:meta build:clean build:tsc:esm build:tsc:cjs", + "build:clean": "rm -fr build/*", + "build:tsc:esm": "tsc -p tsconfig.json", + "build:tsc:cjs": "tsc -p tsconfig-cjs.json", "fix": "run-s fix:*", "fix:prettier": "prettier \"src/**/*.ts\" --write", "fix:lint": "eslint --fix src --ext .ts", diff --git a/tsconfig-base.json b/tsconfig-base.json new file mode 100644 index 00000000..5ff8fbd4 --- /dev/null +++ b/tsconfig-base.json @@ -0,0 +1,26 @@ +{ + "ts-node": { + "experimentalSpecifierResolution": "node" + }, + "compilerOptions": { + "skipLibCheck": true, + "declaration": true, + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "baseUrl": "./", + "resolveJsonModule": true, + "sourceMap": true, + "moduleResolution": "node", + "lib": ["ES2019"], + "paths": { + "@polkadot/api/augment": ["src/interfaces/augment-api.ts"], + "@polkadot/types/augment": ["src/interfaces/augment-types.ts"], + "@polkadot/types/lookup": ["src/interfaces/types-lookup.ts"], + "bitcoinjs-lib/src/bufferutils": ["node_modules/bitcoinjs-lib/types/bufferutils"], + "@interlay/interbtc-api/*": ["src/*"] + } + }, + "include": ["src/**/*", "scripts/**/*.ts"], + "exclude": ["./node_modules/*"] +} diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json new file mode 100644 index 00000000..9f85b881 --- /dev/null +++ b/tsconfig-cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "build/cjs", + "target": "es2015" + } +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 32e359b1..a9c4daef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,30 +1,8 @@ { - "ts-node": { - "experimentalSpecifierResolution": "node" - }, + "extends": "./tsconfig-base.json", "compilerOptions": { - "skipLibCheck": true, "target": "ES6", "module": "ES6", - "outDir": "build", - "declaration": true, - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "baseUrl": "./", - "resolveJsonModule": true, - // Generate files for debugging - "sourceMap": true, - "moduleResolution": "node", - "lib": ["ES2019"], - "paths": { - "@polkadot/api/augment": ["src/interfaces/augment-api.ts"], - "@polkadot/types/augment": ["src/interfaces/augment-types.ts"], - "@polkadot/types/lookup": ["src/interfaces/types-lookup.ts"], - "bitcoinjs-lib/src/bufferutils": ["node_modules/bitcoinjs-lib/types/bufferutils"], - "@interlay/interbtc-api/*": ["src/*"] - } - }, - "include": ["src/**/*", "scripts/**/*.ts"], - "exclude": ["./node_modules/*"] + "outDir": "build/esm", + } } From 5fe0d7ac034b48add077c3103389e40736868d23 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 12 Oct 2023 10:12:20 +0200 Subject: [PATCH 02/15] chore: add separate types declaration build folder --- package.json | 13 +++++++------ tsconfig-base.json | 1 - tsconfig-types.json | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 tsconfig-types.json diff --git a/package.json b/package.json index f8a9cbbf..8e56c083 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "@interlay/interbtc-api", "version": "2.5.2", "description": "JavaScript library to interact with interBTC", - "main": "build/src/index.js", - "type": "module", - "typings": "build/src/index.d.ts", + "main": "build/cjs/src/index.js", + "module": "build/esm/src/index.js", + "types": "build/types/src/index.d.ts", "repository": "https://github.com/interlay/interbtc-api", "license": "Apache-2.0", "keywords": [ @@ -17,10 +17,11 @@ "kBTC" ], "scripts": { - "build": "run-s generate:defs generate:meta build:clean build:tsc:esm build:tsc:cjs", + "build": "run-s generate:defs generate:meta build:clean build:types build:esm build:cjs", "build:clean": "rm -fr build/*", - "build:tsc:esm": "tsc -p tsconfig.json", - "build:tsc:cjs": "tsc -p tsconfig-cjs.json", + "build:esm": "tsc -p tsconfig.json", + "build:cjs": "tsc -p tsconfig-cjs.json", + "build:types": "tsc -p tsconfig-types.json", "fix": "run-s fix:*", "fix:prettier": "prettier \"src/**/*.ts\" --write", "fix:lint": "eslint --fix src --ext .ts", diff --git a/tsconfig-base.json b/tsconfig-base.json index 5ff8fbd4..6cf17ac2 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -4,7 +4,6 @@ }, "compilerOptions": { "skipLibCheck": true, - "declaration": true, "strict": true, "noImplicitAny": true, "esModuleInterop": true, diff --git a/tsconfig-types.json b/tsconfig-types.json new file mode 100644 index 00000000..eaaa621c --- /dev/null +++ b/tsconfig-types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "build/types", + "declaration": true, + "emitDeclarationOnly": true + } +} \ No newline at end of file From 609de8f98870c0af16539bd3d30c93d83a0cdf47 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 12 Oct 2023 10:16:24 +0200 Subject: [PATCH 03/15] chore: add exports declaration to package.json --- package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package.json b/package.json index 8e56c083..8fe294a4 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,14 @@ "update-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/json/parachain.json", "update-metadata-kintnet": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' https://api-dev-kintsugi.interlay.io/parachain > src/json/parachain.json" }, + "exports": { + "./*": { + "types": "./build/types/*.d.ts", + "require": "./build/cjs/*.js", + "import": "./build/esm/*.js", + "default": "./build/esm/*.js" + } + }, "engines": { "node": ">=11" }, From eacdb1f94b97798d651daaebed7a7e68fb7bb264 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 12 Oct 2023 11:00:33 +0200 Subject: [PATCH 04/15] fix: declare interfaces folder explicitly as ESM code for ts-node to avoid incomplete polkadot types generation after removing type=module from package.json --- tsconfig-base.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tsconfig-base.json b/tsconfig-base.json index 6cf17ac2..85187333 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,6 +1,9 @@ { "ts-node": { - "experimentalSpecifierResolution": "node" + "experimentalSpecifierResolution": "node", + "moduleTypes": { + "src/interfaces/**/*": "esm" + } }, "compilerOptions": { "skipLibCheck": true, From 19cec8bc7861c60cfefafd564e600ca4d4463702 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 12 Oct 2023 11:38:40 +0200 Subject: [PATCH 05/15] chore: add script to insert correct package json with module type in build subfolders --- create-build-package-json.sh | 12 ++++++++++++ package.json | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 create-build-package-json.sh diff --git a/create-build-package-json.sh b/create-build-package-json.sh new file mode 100644 index 00000000..dce45146 --- /dev/null +++ b/create-build-package-json.sh @@ -0,0 +1,12 @@ +#!/bin/sh +cat >build/cjs/package.json <build/esm/package.json < Date: Wed, 25 Oct 2023 09:44:59 +0200 Subject: [PATCH 06/15] fix: move methods imported by UI from test utils back to src utils --- src/utils/issueRedeem.ts | 50 +++++++++++++++++++++++++++++++++++- test/utils/issue-redeem.ts | 52 +++----------------------------------- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/src/utils/issueRedeem.ts b/src/utils/issueRedeem.ts index f478290f..38bcddea 100644 --- a/src/utils/issueRedeem.ts +++ b/src/utils/issueRedeem.ts @@ -1,8 +1,14 @@ +import { Hash, EventRecord } from "@polkadot/types/interfaces"; +import { ApiTypes, AugmentedEvent } from "@polkadot/api/types"; +import { ISubmittableResult } from "@polkadot/types/types"; +import type { AnyTuple } from "@polkadot/types/types"; +import { ApiPromise } from "@polkadot/api"; import { MonetaryAmount } from "@interlay/monetary-js"; import { InterbtcPrimitivesVaultId } from "@polkadot/types/lookup"; -import { WrappedCurrency } from "../types"; +import { Issue, Redeem, WrappedCurrency } from "../types"; import { newMonetaryAmount } from "./currency"; +import { InterBtcApi } from "../interbtc-api"; /** * Given a list of vaults with availabilities (e.g. collateral for issue, tokens @@ -51,3 +57,45 @@ export function allocateAmountsToVaults( } return allocations; } + +/** + * @param events The EventRecord array returned after sending a transaction + * @param methodToCheck The name of the event method whose existence to check + * @returns The id associated with the transaction. If the EventRecord array does not + * contain required events, the function throws an error. + */ +export function getRequestIdsFromEvents( + events: EventRecord[], + eventToFind: AugmentedEvent, + api: ApiPromise +): Hash[] { + const ids = new Array(); + for (const { event } of events) { + if (eventToFind.is(event)) { + // the redeem id has type H256 and is the first item of the event data array + const id = api.createType("Hash", event.data[0]); + ids.push(id); + } + } + + if (ids.length > 0) return ids; + throw new Error("Transaction failed"); +} + +export const getIssueRequestsFromExtrinsicResult = async ( + interBtcApi: InterBtcApi, + result: ISubmittableResult +): Promise> => { + const ids = getRequestIdsFromEvents(result.events, interBtcApi.api.events.issue.RequestIssue, interBtcApi.api); + const issueRequests = await interBtcApi.issue.getRequestsByIds(ids); + return issueRequests; +}; + +export const getRedeemRequestsFromExtrinsicResult = async ( + interBtcApi: InterBtcApi, + result: ISubmittableResult +): Promise> => { + const ids = getRequestIdsFromEvents(result.events, interBtcApi.api.events.redeem.RequestRedeem, interBtcApi.api); + const redeemRequests = await interBtcApi.redeem.getRequestsByIds(ids); + return redeemRequests; +}; diff --git a/test/utils/issue-redeem.ts b/test/utils/issue-redeem.ts index acee630a..a74bd461 100644 --- a/test/utils/issue-redeem.ts +++ b/test/utils/issue-redeem.ts @@ -1,13 +1,9 @@ -import { Hash, EventRecord } from "@polkadot/types/interfaces"; -import { ApiTypes, AugmentedEvent } from "@polkadot/api/types"; -import type { AnyTuple } from "@polkadot/types/types"; -import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@polkadot/keyring/types"; import { Bitcoin, BitcoinAmount, InterBtcAmount, MonetaryAmount } from "@interlay/monetary-js"; -import { InterbtcPrimitivesVaultId } from "@polkadot/types/lookup"; -import { ISubmittableResult } from "@polkadot/types/types"; +import { InterbtcPrimitivesVaultId } from "../../src/parachain"; -import { newAccountId } from "../../src/utils"; + +import { getIssueRequestsFromExtrinsicResult, getRedeemRequestsFromExtrinsicResult, newAccountId } from "../../src/utils"; import { BitcoinCoreClient } from "./bitcoin-core-client"; import { stripHexPrefix } from "../../src/utils/encoding"; import { Issue, IssueStatus, Redeem, RedeemStatus, WrappedCurrency } from "../../src/types"; @@ -28,48 +24,6 @@ export enum ExecuteRedeem { Auto, } -/** - * @param events The EventRecord array returned after sending a transaction - * @param methodToCheck The name of the event method whose existence to check - * @returns The id associated with the transaction. If the EventRecord array does not - * contain required events, the function throws an error. - */ -export function getRequestIdsFromEvents( - events: EventRecord[], - eventToFind: AugmentedEvent, - api: ApiPromise -): Hash[] { - const ids = new Array(); - for (const { event } of events) { - if (eventToFind.is(event)) { - // the redeem id has type H256 and is the first item of the event data array - const id = api.createType("Hash", event.data[0]); - ids.push(id); - } - } - - if (ids.length > 0) return ids; - throw new Error("Transaction failed"); -} - -export const getIssueRequestsFromExtrinsicResult = async ( - interBtcApi: InterBtcApi, - result: ISubmittableResult -): Promise> => { - const ids = getRequestIdsFromEvents(result.events, interBtcApi.api.events.issue.RequestIssue, interBtcApi.api); - const issueRequests = await interBtcApi.issue.getRequestsByIds(ids); - return issueRequests; -}; - -export const getRedeemRequestsFromExtrinsicResult = async ( - interBtcApi: InterBtcApi, - result: ISubmittableResult -): Promise> => { - const ids = getRequestIdsFromEvents(result.events, interBtcApi.api.events.redeem.RequestRedeem, interBtcApi.api); - const redeemRequests = await interBtcApi.redeem.getRequestsByIds(ids); - return redeemRequests; -}; - export async function issueSingle( interBtcApi: InterBtcApi, bitcoinCoreClient: BitcoinCoreClient, From 14d80b050b32f981d2df3c720013cc651c01fa51 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 09:45:39 +0200 Subject: [PATCH 07/15] chore: export IssueLimits type for easier inclusion in UI --- src/parachain/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parachain/index.ts b/src/parachain/index.ts index e90f4087..6c772262 100644 --- a/src/parachain/index.ts +++ b/src/parachain/index.ts @@ -1,5 +1,5 @@ export { VaultsAPI, DefaultVaultsAPI } from "./vaults"; -export { IssueAPI, DefaultIssueAPI } from "./issue"; +export { IssueAPI, DefaultIssueAPI, IssueLimits } from "./issue"; export { RedeemAPI, DefaultRedeemAPI } from "./redeem"; export { OracleAPI, DefaultOracleAPI } from "./oracle"; export { BTCRelayAPI, DefaultBTCRelayAPI } from "./btc-relay"; From f521ab95168c344f517b25c3709f37ef19970e7d Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 09:46:38 +0200 Subject: [PATCH 08/15] chore: add extensions to import statements --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index ca614621..4c7fd3c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -import "./interfaces/augment-api"; -import "./interfaces/augment-types"; +import "./interfaces/augment-api.js"; +import "./interfaces/augment-types.js"; export * from "./factory"; export * from "./interbtc-api"; From f43c02b5c0b1b9e438955844f0d1573a31e899b7 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 11:21:55 +0200 Subject: [PATCH 09/15] chore: replace selective exports with export * --- src/parachain/index.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/parachain/index.ts b/src/parachain/index.ts index 6c772262..8be5af74 100644 --- a/src/parachain/index.ts +++ b/src/parachain/index.ts @@ -1,19 +1,19 @@ -export { VaultsAPI, DefaultVaultsAPI } from "./vaults"; -export { IssueAPI, DefaultIssueAPI, IssueLimits } from "./issue"; -export { RedeemAPI, DefaultRedeemAPI } from "./redeem"; -export { OracleAPI, DefaultOracleAPI } from "./oracle"; -export { BTCRelayAPI, DefaultBTCRelayAPI } from "./btc-relay"; -export { TokensAPI, DefaultTokensAPI } from "./tokens"; -export { SystemAPI, DefaultSystemAPI } from "./system"; -export { ConstantsAPI, DefaultConstantsAPI } from "./constants"; -export { ReplaceAPI, DefaultReplaceAPI } from "./replace"; -export { FeeAPI, DefaultFeeAPI } from "./fee"; -export { RewardsAPI, DefaultRewardsAPI } from "./rewards"; -export { NominationAPI, DefaultNominationAPI } from "./nomination"; -export { EscrowAPI, DefaultEscrowAPI } from "./escrow"; -export { AssetRegistryAPI, DefaultAssetRegistryAPI } from "./asset-registry"; -export { LoansAPI, DefaultLoansAPI } from "./loans"; -export { AMMAPI, DefaultAMMAPI } from "./amm"; +export * from "./vaults"; +export * from "./issue"; +export * from "./redeem"; +export * from "./oracle"; +export * from "./btc-relay"; +export * from "./tokens"; +export * from "./system"; +export * from "./constants"; +export * from "./replace"; +export * from "./fee"; +export * from "./rewards"; +export * from "./nomination"; +export * from "./escrow"; +export * from "./asset-registry"; +export * from "./loans"; +export * from "./amm"; export * from "./transaction"; export * from "./amm/"; From 39739106e8b9525d9454b1f9c6f7f9fd40c75028 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 11:22:37 +0200 Subject: [PATCH 10/15] chore: enable declarations in base tsconfig --- tsconfig-base.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig-base.json b/tsconfig-base.json index 85187333..f84cb0fc 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -6,6 +6,7 @@ } }, "compilerOptions": { + "declaration": true, "skipLibCheck": true, "strict": true, "noImplicitAny": true, From 1c5535b193a29525870da855b261764f65716c47 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 11:23:47 +0200 Subject: [PATCH 11/15] chore: remove "exports" declarations from package.json - if needed, this should probably be generated --- package.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package.json b/package.json index bd4c411e..a8fe3aff 100644 --- a/package.json +++ b/package.json @@ -53,14 +53,6 @@ "update-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/json/parachain.json", "update-metadata-kintnet": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' https://api-dev-kintsugi.interlay.io/parachain > src/json/parachain.json" }, - "exports": { - "./*": { - "types": "./build/types/*.d.ts", - "require": "./build/cjs/*.js", - "import": "./build/esm/*.js", - "default": "./build/esm/*.js" - } - }, "engines": { "node": ">=11" }, From cd357cc3a14af1a213e203c05f1b864e8c2d141b Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 12:03:54 +0200 Subject: [PATCH 12/15] chore: bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8fe3aff..47d58e5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@interlay/interbtc-api", - "version": "2.5.2", + "version": "2.6.0", "description": "JavaScript library to interact with interBTC", "main": "build/cjs/src/index.js", "module": "build/esm/src/index.js", From 362fbfaf08efac3d0e998e567ca629844c8952fa Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 25 Oct 2023 16:26:39 +0200 Subject: [PATCH 13/15] chore: mark as release candidate 0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7a9c479..adf491a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@interlay/interbtc-api", - "version": "2.6.0", + "version": "2.6.0-rc.0", "description": "JavaScript library to interact with interBTC", "main": "build/cjs/src/index.js", "module": "build/esm/src/index.js", From 144e772d85885caff2566f650003473b8ee0e9a2 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 26 Oct 2023 10:08:32 +0200 Subject: [PATCH 14/15] chore: tighten yarn/npm pack scope --- .npmignore | 28 ++++++++++++++++++++++++++++ package.json | 5 +---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..0a8cf479 --- /dev/null +++ b/.npmignore @@ -0,0 +1,28 @@ +.cache +.idea +.chglog +.github +.husky +.DS_Store +*.log +.nyc_output +.vscode +.yarn +.eslintignore +.gitignore +.editorconfig +.env.staging +.eslintrc.json +.nvmrc +.prettierignore +.prettierrc +.yarnrc.yml +node_modules +local-setup +test +coverage +src +yarn.lock +*.sh +generate_docs +typedoc.json \ No newline at end of file diff --git a/package.json b/package.json index adf491a9..c4e43b0a 100644 --- a/package.json +++ b/package.json @@ -96,10 +96,7 @@ "bn.js": "4.12.0" }, "files": [ - "build/main", - "build/module", - "!**/*.spec.*", - "!**/*.json", + "build", "CHANGELOG.md", "LICENSE", "README.md" From 87be8bcae7161f0b4de8111246aaedebef2d2cd0 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Thu, 26 Oct 2023 10:18:42 +0200 Subject: [PATCH 15/15] test: fix broken import after moving util method --- test/integration/parachain/staging/sequential/issue.partial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/parachain/staging/sequential/issue.partial.ts b/test/integration/parachain/staging/sequential/issue.partial.ts index b3e871ee..d40da29a 100644 --- a/test/integration/parachain/staging/sequential/issue.partial.ts +++ b/test/integration/parachain/staging/sequential/issue.partial.ts @@ -5,6 +5,7 @@ import { CollateralCurrencyExt, currencyIdToMonetaryCurrency, DefaultInterBtcApi, + getIssueRequestsFromExtrinsicResult, InterBtcApi, InterbtcPrimitivesVaultId, IssueStatus, @@ -25,7 +26,6 @@ import { PARACHAIN_ENDPOINT, ESPLORA_BASE_PATH, } from "../../../../config"; -import { getIssueRequestsFromExtrinsicResult } from "../../../../utils/issue-redeem"; import { BitcoinCoreClient } from "../../../../utils/bitcoin-core-client"; import { issueSingle } from "../../../../utils/issue-redeem"; import { newVaultId, WrappedCurrency } from "../../../../../src";