@ledgerhq/coin-tester-solana 1.7.0 → 1.8.0-nightly.20251210114107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-tester-solana",
3
- "version": "1.7.0",
3
+ "version": "1.8.0-nightly.20251210114107",
4
4
  "description": "Ledger Solana Coin Tester",
5
5
  "main": "src/scenarii.test.ts",
6
6
  "keywords": [
@@ -49,14 +49,14 @@
49
49
  "bignumber.js": "^9",
50
50
  "docker-compose": "^1",
51
51
  "msw": "^2",
52
- "@ledgerhq/coin-framework": "^6.10.0",
53
- "@ledgerhq/coin-tester": "^0.13.0",
54
- "@ledgerhq/live-env": "^2.22.0",
55
- "@ledgerhq/coin-solana": "^0.38.0",
56
- "@ledgerhq/cryptoassets": "^13.34.0",
57
- "@ledgerhq/types-cryptoassets": "^7.30.0",
58
- "@ledgerhq/types-live": "^6.90.0",
59
- "@ledgerhq/live-signer-solana": "^0.7.0"
52
+ "@ledgerhq/coin-framework": "^6.11.0-nightly.20251210114107",
53
+ "@ledgerhq/coin-tester": "^0.14.0-nightly.20251210114107",
54
+ "@ledgerhq/coin-solana": "^0.39.0-nightly.20251210114107",
55
+ "@ledgerhq/cryptoassets": "^13.35.0-nightly.20251210114107",
56
+ "@ledgerhq/live-env": "^2.23.0-nightly.20251210114107",
57
+ "@ledgerhq/live-signer-solana": "^0.8.0-nightly.20251210114107",
58
+ "@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251210114107",
59
+ "@ledgerhq/types-live": "^6.91.0-nightly.20251210114107"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/jest": "^29",
package/src/fixtures.ts CHANGED
@@ -256,6 +256,9 @@ export function initMSW() {
256
256
  http.get("https://earn.api.live.ledger.com/v0/network/solana/validator-details", () =>
257
257
  HttpResponse.json([]),
258
258
  ),
259
+ http.get("https://earn-dashboard.aws.stg.ldg-tech.com/figment/solana/validators_summary", () =>
260
+ HttpResponse.json([]),
261
+ ),
259
262
  http.get("https://crypto-assets-service.api.ledger.com/v1/tokens", ({ request }) => {
260
263
  const url = new URL(request.url);
261
264
  switch (url.searchParams.get("id")) {
@@ -302,7 +305,7 @@ export function initMSW() {
302
305
  mockServer.listen({
303
306
  onUnhandledRequest: request => {
304
307
  const hostname = new URL(request.url).hostname;
305
- if (hostname === "localhost") return;
308
+ if (["127.0.0.1", "localhost"].includes(hostname)) return;
306
309
  throw new Error("Unhandled request");
307
310
  },
308
311
  });
@@ -14,7 +14,7 @@ import {
14
14
  makeAccount,
15
15
  } from "../fixtures";
16
16
  import { CoinConfig } from "@ledgerhq/coin-framework/config";
17
- import solanaCoinConfig, { SolanaCoinConfig } from "@ledgerhq/coin-solana/config";
17
+ import { SolanaCoinConfig } from "@ledgerhq/coin-solana/config";
18
18
  import BigNumber from "bignumber.js";
19
19
  import { setEnv } from "@ledgerhq/live-env";
20
20
  import { airdrop, killAgave, spawnAgave } from "../agave";
@@ -29,8 +29,7 @@ import {
29
29
  initStakeAccount,
30
30
  initVoteAccount,
31
31
  } from "../connection";
32
- import { Config, getChainAPI } from "@ledgerhq/coin-solana/network/index";
33
- import { makeBridges } from "@ledgerhq/coin-solana/bridge/bridge";
32
+ import { createBridges } from "@ledgerhq/coin-solana/bridge/js";
34
33
 
35
34
  global.console = require("console");
36
35
  jest.setTimeout(100_000);
@@ -436,18 +435,7 @@ export const scenarioSolana: Scenario<SolanaTransaction, SolanaAccount> = {
436
435
  token2022Enabled: true,
437
436
  legacyOCMSMaxVersion: "1.8.0",
438
437
  });
439
- solanaCoinConfig.setCoinConfig(coinConfig);
440
- const chainAPICache = new Map<string, ReturnType<typeof getChainAPI>>();
441
- const { accountBridge, currencyBridge } = makeBridges({
442
- getAPI: (config: Config) => {
443
- const endpoint = config.endpoint;
444
- if (!chainAPICache.has(endpoint)) {
445
- chainAPICache.set(endpoint, getChainAPI(config));
446
- }
447
- return chainAPICache.get(endpoint)!;
448
- },
449
- signerContext,
450
- });
438
+ const { accountBridge, currencyBridge } = createBridges(signerContext, coinConfig);
451
439
 
452
440
  await airdrop(account.freshAddress, 5);
453
441
  await airdrop(PAYER.publicKey.toBase58(), 5);