Skip to content

[LWDM] chore(llc): add config_generic_a4 live config - #20298

Merged
francois-guerin-ledger merged 1 commit into
developfrom
chore/LIVE-34037-add-config_generic_a4
Aug 3, 2026
Merged

[LWDM] chore(llc): add config_generic_a4 live config#20298
francois-guerin-ledger merged 1 commit into
developfrom
chore/LIVE-34037-add-config_generic_a4

Conversation

@francois-guerin-ledger

@francois-guerin-ledger francois-guerin-ledger commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Introduce config_generic_a4 a cross-family LiveConfig key driving A4 indexer integration.

  • Zod-validated schema with per-chain enabled/registerOnly switches and environment (stg/ppr/prd).
  • resolveA4ChainConfig(currencyId) returning { read, register, environment } with log-once fallback
  • Default config: all 60 A4-supported networks at { enabled: false, registerOnly: true }
  • Registered in sharedConfig.ts

🔗 Context

Copilot AI review requested due to automatic review settings August 2, 2026 21:25
@live-github-bot live-github-bot Bot added the common Has changes in live-common label Aug 2, 2026
@live-github-bot live-github-bot Bot changed the title chore(llc): add config_generic_a4 live config [LWDM] chore(llc): add config_generic_a4 live config Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ✅ Deployed https://web-tools-8yxcjrt7c-ledger-hq-prd.vercel.app
Native Storybook Build ⏭️ Skipped
React Storybook Build ⏭️ Skipped

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new LiveConfig entry (config_generic_a4) to @ledgerhq/live-common and wires it into the shared LiveConfig schema, along with a resolver helper and Jest coverage to interpret the config at runtime.

Changes:

  • Register a new LiveConfig key config_generic_a4 and include it in liveConfig aggregation.
  • Add a4 LiveConfig schema + Zod parsing and resolveA4ChainConfig() resolution logic.
  • Add unit tests for resolver behavior and the config schema defaults.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
libs/ledger-live-common/src/config/sharedConfig.ts Includes a4Config in the global liveConfig schema so the key is registered.
libs/ledger-live-common/src/bridge/generic-coin-framework/a4/config.ts Defines config_generic_a4 schema/defaults and provides resolveA4ChainConfig() to interpret it.
libs/ledger-live-common/src/bridge/generic-coin-framework/a4/config.test.ts Adds Jest tests for resolver semantics and schema default registration.
.changeset/friendly-schools-deliver.md Adds a patch changeset for @ledgerhq/live-common.

Comment thread libs/ledger-live-common/src/bridge/generic-coin-framework/a4/config.ts Outdated
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 7 projects in monorepo, 7 projects with changes.

📊 Quick Summary
Project Total Size Change
desktop-main 2.3 MB -
desktop-preloader 7.1 KB -
desktop-renderer 80.7 MB -
desktop-webviewDappPreloader 36.9 KB -
desktop-webviewPreloader 200.0 B -
desktop-workers 36.8 KB -
mobile 261.4 MB -
📋 Detailed Reports (Click to expand)

📁 desktop-main

Path: rsdoctor/desktop-main/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.3 MB - -
📄 JavaScript 2.2 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 135.3 KB - -

📁 desktop-preloader

Path: rsdoctor/desktop-preloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 7.1 KB - -
📄 JavaScript 5.3 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 1.8 KB - -

📁 desktop-renderer

Path: rsdoctor/desktop-renderer/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 80.7 MB - -
📄 JavaScript 29.3 MB - -
🎨 CSS 183.1 KB - -
🌐 HTML 1.8 KB - -
📁 Other Assets 51.2 MB - -

📁 desktop-webviewDappPreloader

Path: rsdoctor/desktop-webviewDappPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.9 KB - -
📄 JavaScript 36.9 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 desktop-webviewPreloader

Path: rsdoctor/desktop-webviewPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 200.0 B - -
📄 JavaScript 200.0 B - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 desktop-workers

Path: rsdoctor/desktop-workers/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.8 KB - -
📄 JavaScript 36.8 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 261.4 MB - -
📄 JavaScript 110.4 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 151.0 MB - -

Generated by Rsdoctor GitHub Action

Copilot AI review requested due to automatic review settings August 2, 2026 21:46
@francois-guerin-ledger
francois-guerin-ledger force-pushed the chore/LIVE-34037-add-config_generic_a4 branch from a8c8390 to 4e4bf02 Compare August 2, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (3)

libs/ledger-live-common/src/bridge/generic-coin-framework/a4/config.ts:126

  • The parameter name network is ambiguous given that this resolver is keyed by the A4 network id strings (e.g. "avalanche_c_chain"). Renaming it to networkId would better communicate what callers must pass.
export function resolveA4ChainConfig(network: string): A4ChainResolution {

libs/ledger-live-common/src/bridge/generic-coin-framework/a4/config.ts:146

  • The catch block can only be reached when LiveConfig.getValueByKey throws because the global LiveConfig schema was never set (it throws "Config not set" when config is empty). The log message currently implies only config_generic_a4 is missing, which is misleading when debugging.
  } catch {
    if (warnedConfigMissing) return A4_OFF;
    warnedConfigMissing = true;
    log("a4", "config_generic_a4 not set in LiveConfig - A4 disabled");

libs/ledger-live-common/src/config/sharedConfig.ts:33

  • Repo review guidance flags libs/ledger-live-common/ as maintenance-only (see .agents/agents/code-reviewer.md:44). This adds a new feature module under src/bridge/generic-coin-framework/a4/. If this is expected, it would help to confirm (or consider placing this in a more appropriate package) to avoid further feature growth in live-common.
import { concordiumConfig } from "../families/concordium/config";
import { a4Config } from "../bridge/generic-coin-framework/a4/config";

@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@francois-guerin-ledger
francois-guerin-ledger marked this pull request as ready for review August 2, 2026 22:31
@francois-guerin-ledger
francois-guerin-ledger requested a review from a team as a code owner August 2, 2026 22:31
@francois-guerin-ledger
francois-guerin-ledger merged commit 9a330b5 into develop Aug 3, 2026
87 checks passed
@francois-guerin-ledger
francois-guerin-ledger deleted the chore/LIVE-34037-add-config_generic_a4 branch August 3, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Has changes in live-common

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants