diff --git a/libs/coin-modules/coin-stellar/.unimportedrc.json b/libs/coin-modules/coin-stellar/.unimportedrc.json index f9162d00a3a6..dad5b54f16c8 100644 --- a/libs/coin-modules/coin-stellar/.unimportedrc.json +++ b/libs/coin-modules/coin-stellar/.unimportedrc.json @@ -1,11 +1,11 @@ { "entry": [ - "src/deviceTransactionConfig.ts", - "src/errors.ts", - "src/hw-getAddress.ts", - "src/serialization.ts", - "src/specs.ts", - "src/transaction.ts" + "src/api/index.ts", + "src/bridge/index.ts", + "src/bridge/deviceTransactionConfig.ts", + "src/signer/index.ts", + "src/test/index.ts", + "src/index.ts" ], "ignorePatterns": [ "**/node_modules/**", @@ -13,22 +13,6 @@ "**/*.mock.ts", "**/*.test.{js,jsx,ts,tsx}" ], - "ignoreUnresolved": [], - "ignoreUnimported": [ - "src/bridge/index.ts", - "src/broadcast.ts", - "src/buildOptimisticOperation.ts", - "src/buildTransaction.ts", - "src/cli.ts", - "src/config.ts", - "src/createTransaction.ts", - "src/estimateMaxSpendable.ts", - "src/getTransactionStatus.ts", - "src/prepareTransaction.ts", - "src/signOperation.ts", - "src/synchronization.ts", - "src/tokens.ts" - ], "ignoreUnused": [ "rxjs" ] diff --git a/libs/coin-modules/coin-stellar/package.json b/libs/coin-modules/coin-stellar/package.json index 399b29f074f0..9a6d4fcc2bcb 100644 --- a/libs/coin-modules/coin-stellar/package.json +++ b/libs/coin-modules/coin-stellar/package.json @@ -81,6 +81,10 @@ "require": "./lib/bridge/deviceTransactionConfig.js", "default": "./lib-es/bridge/deviceTransactionConfig.js" }, + "./errors": { + "require": "./lib/types/errors.js", + "default": "./lib-es/types/errors.js" + }, "./logic": { "require": "./lib/logic/index.js", "default": "./lib-es/logic/index.js" diff --git a/libs/coin-modules/coin-stellar/src/bridge/synchronization.test.ts b/libs/coin-modules/coin-stellar/src/bridge/synchronization.test.ts index e69de29bb2d1..b983c24de357 100644 --- a/libs/coin-modules/coin-stellar/src/bridge/synchronization.test.ts +++ b/libs/coin-modules/coin-stellar/src/bridge/synchronization.test.ts @@ -0,0 +1,3 @@ +describe("getAccountShape", () => { + it.todo("returns an AccountShapeInfo"); +}); diff --git a/libs/coin-modules/coin-stellar/src/logic/estimateFees.ts b/libs/coin-modules/coin-stellar/src/logic/estimateFees.ts index b92d9143ea4e..4cf386aa8e44 100644 --- a/libs/coin-modules/coin-stellar/src/logic/estimateFees.ts +++ b/libs/coin-modules/coin-stellar/src/logic/estimateFees.ts @@ -1,5 +1,9 @@ import { fetchBaseFee } from "../network"; +/** + * Estimate the fees for one transaction + * @see {@link https://developers.stellar.org/docs/learn/fundamentals/fees-resource-limits-metering#inclusion-fee} + */ export async function estimateFees(): Promise { const fees = await fetchBaseFee(); return BigInt(fees.recommendedFee); diff --git a/libs/coin-modules/coin-stellar/src/test/index.ts b/libs/coin-modules/coin-stellar/src/test/index.ts index 8e034a6ecf1f..b4fce0ef353b 100644 --- a/libs/coin-modules/coin-stellar/src/test/index.ts +++ b/libs/coin-modules/coin-stellar/src/test/index.ts @@ -1 +1,6 @@ +import makeCliTools from "./cli"; + export * from "./bridgeDatasetTest"; +export { makeCliTools }; +export * from "./bot-specs"; +export * from "./bot-deviceActions"; diff --git a/libs/ledger-live-common/src/families/stellar/setup.ts b/libs/ledger-live-common/src/families/stellar/setup.ts index 5a2307a0b6e1..c98ad966dc74 100644 --- a/libs/ledger-live-common/src/families/stellar/setup.ts +++ b/libs/ledger-live-common/src/families/stellar/setup.ts @@ -1,16 +1,20 @@ // Goal of this file is to inject all necessary device/signer dependency to coin-modules -import { Transaction, StellarAccount, TransactionStatus } from "@ledgerhq/coin-stellar/types/index"; -import Transport from "@ledgerhq/hw-transport"; -import Stellar from "@ledgerhq/hw-app-str"; -import type { Bridge } from "@ledgerhq/types-live"; -import { StellarCoinConfig } from "@ledgerhq/coin-stellar/config"; -import makeCliTools from "@ledgerhq/coin-stellar/cli"; -import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies"; import { createBridges } from "@ledgerhq/coin-stellar/bridge/index"; +import makeCliTools from "@ledgerhq/coin-stellar/test/cli"; +import { StellarCoinConfig } from "@ledgerhq/coin-stellar/config"; import stellarResolver from "@ledgerhq/coin-stellar/signer/index"; +import type { + StellarAccount, + Transaction, + TransactionStatus, +} from "@ledgerhq/coin-stellar/types/index"; +import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies"; +import Stellar from "@ledgerhq/hw-app-str"; +import Transport from "@ledgerhq/hw-transport"; +import type { Bridge } from "@ledgerhq/types-live"; import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup"; -import { Resolver } from "../../hw/getAddress/types"; import { getCurrencyConfiguration } from "../../config"; +import { Resolver } from "../../hw/getAddress/types"; const createSigner: CreateSigner = (transport: Transport) => { return new Stellar(transport);