Skip to content

[LWDM] feat(LIVE-29441): add wallet quote global outcomes#17336

Merged
philipptpunkt merged 1 commit into
developfrom
feat/LIVE-29441-wallet-quote-global-outcomes
Jun 1, 2026
Merged

[LWDM] feat(LIVE-29441): add wallet quote global outcomes#17336
philipptpunkt merged 1 commit into
developfrom
feat/LIVE-29441-wallet-quote-global-outcomes

Conversation

@philipptpunkt

@philipptpunkt philipptpunkt commented May 11, 2026

Copy link
Copy Markdown
Contributor

Jira: https://ledgerhq.atlassian.net/browse/LIVE-29445

Description:
Add Error handling for local and global errors in the Wallet Quotes logic

Stack (managed by stac-man)

Copilot AI review requested due to automatic review settings May 11, 2026 13:50
@philipptpunkt philipptpunkt requested review from a team as code owners May 11, 2026 13:50
@live-github-bot live-github-bot Bot added common Has changes in live-common shared-lib Label added for automated tagging of PRs labels May 11, 2026
@live-github-bot live-github-bot Bot changed the title feat(LIVE-29441): add wallet quote global outcomes [LWDM] feat(LIVE-29441): add wallet quote global outcomes May 11, 2026
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: feat/LIVE-29441-wallet-quote-global-outcomes
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: feat/LIVE-29441-wallet-quote-global-outcomes
  • Device: nanoX

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ✅ Deployed https://web-tools-fkemgwaax-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 updates the Wallet API swap-quote contracts and wallet-side quote pipeline to introduce standardized “global outcome” error codes, align provider error codes with a shared enum, and adjust quote fetching behavior to match legacy “no quotes” semantics on non-OK HTTP responses.

Changes:

  • Re-export and adopt new ProviderErrorCodes / QuotesErrorCodes enums for provider errors and batch-level (“global”) quote outcomes.
  • Update wallet-side types and logic to use these enums (notably computeQuotesErrors) and adjust tests accordingly.
  • Change fetchQuotes to return an empty result on Axios HTTP errors (non-2xx responses) while still rethrowing cancellations and non-HTTP failures.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/ledger-live-common/src/wallet-api/Exchange/quotes/types.ts Re-exports new provider/global outcome enums from the exchange module package.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/service/types.ts Tightens RawQuoteError.code typing to include ProviderErrorCodes.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/service/fetchQuotes.ts Swallows non-OK HTTP Axios responses into { rawQuotes: [], providerErrors: [] }.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/service/fetchQuotes.test.ts Adds unit coverage for the new HTTP-error and cancel/network error behaviors.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/normalizeQuote.ts Removes deprecated single warning/error fields from normalized quote output.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/normalizeQuote.test.ts Updates assertions to only use warnings[] / errors[].
libs/ledger-live-common/src/wallet-api/Exchange/quotes/getQuotes.test.ts Updates expectations to use QuotesErrorCodes and provider error enums.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/computeQuotesErrors.ts Uses enums for noQuotes / amount bounds outcomes and for provider error matching.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/computeQuotesErrors.test.ts Updates tests to the new enum-based outcome codes and adds invalid-bound coverage.
libs/exchange-module/src/types.ts Removes deprecated Quote.warning/Quote.error fields; introduces new enums and updates error types.

Comment thread libs/exchange-module/src/types.ts
@github-actions

github-actions Bot commented May 11, 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.5 MB -
desktop-preloader 7.1 KB -
desktop-renderer 75.1 MB -
desktop-webviewDappPreloader 37.0 KB -
desktop-webviewPreloader 200.0 B -
desktop-workers 37.0 KB -
mobile 221.2 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.5 MB - -
📄 JavaScript 2.4 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 75.1 MB - -
📄 JavaScript 28.2 MB - -
🎨 CSS 193.9 KB - -
🌐 HTML 1.8 KB - -
📁 Other Assets 46.7 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 37.0 KB - -
📄 JavaScript 37.0 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 37.0 KB - -
📄 JavaScript 37.0 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 221.2 MB - -
📄 JavaScript 105.8 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 115.4 MB - -

Generated by Rsdoctor GitHub Action

@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 99047a7 to 8af63d1 Compare May 11, 2026 14:13
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 18b8f5a to c44d199 Compare May 11, 2026 14:13
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 8af63d1 to 90cf2a3 Compare May 11, 2026 14:35
Copilot AI review requested due to automatic review settings May 11, 2026 14:35
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from c44d199 to 2275160 Compare May 11, 2026 14:35

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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread libs/exchange-module/src/types.ts
Comment thread libs/exchange-module/src/types.ts Outdated
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 90cf2a3 to 76860ca Compare May 11, 2026 14:59
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 2275160 to 459720c Compare May 11, 2026 14:59
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 76860ca to 5a297f9 Compare May 12, 2026 10:46
Copilot AI review requested due to automatic review settings May 12, 2026 10:46
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 459720c to 93534d7 Compare May 12, 2026 10: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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread libs/exchange-module/src/types.ts Outdated
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 5a297f9 to 60564b1 Compare May 12, 2026 13:11
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 93534d7 to f23d548 Compare May 12, 2026 13:11
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 60564b1 to d79b8b5 Compare May 12, 2026 13:26

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 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread libs/exchange-module/src/types.ts
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch 2 times, most recently from 439d8a2 to 92c91db Compare May 21, 2026 14:20
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from a2481a2 to 4f8953a Compare May 21, 2026 14:28
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-warnings branch from 92c91db to 4160842 Compare May 21, 2026 15:23
Copilot AI review requested due to automatic review settings May 21, 2026 15:23
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 4f8953a to 32305f4 Compare May 21, 2026 15:23

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 14 out of 14 changed files in this pull request and generated 2 comments.

Comment on lines +53 to +57
const currencyIds = [input.sendCurrencyId, input.receiveCurrencyId];
for (const rule of VERSION_COMPATIBILITY_RULES) {
const requiredVersion = appVersion.platform === "lld" ? rule.lld : rule.llm;
if (!requiredVersion || compareVersions(appVersion.version, requiredVersion) >= 0) {
continue;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

won't change anything here for now, since this whole check is currently under investigation with a potential removal

Comment thread libs/exchange-module/src/types.ts
Base automatically changed from feat/LIVE-29441-wallet-quote-warnings to develop May 28, 2026 09:36
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 32305f4 to 37479da Compare May 28, 2026 14:03
Copilot AI review requested due to automatic review settings May 29, 2026 08:44
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 37479da to ee11db6 Compare May 29, 2026 08:44
Comment on lines +73 to +77
const response = await axios.get(url, {
params: searchParams,
headers: requestHeaders,
signal,
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This won't work with dynamic BE urls. This is further more the current common implementation in LW.

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 15 out of 15 changed files in this pull request and generated 2 comments.

Comment on lines 63 to +67
deviceModelId?: string;
appVersion?: {
platform: QuotesAppPlatform;
version: string | null;
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Docs were in fact updated ✅

Comment on lines 397 to +398
providerErrors: QuoteProviderError[];
warnings: QuotesWarning[];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd rather think about removing comments from types, since the type should explain itself. Won't change this here...

@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from ee11db6 to 368bde4 Compare May 29, 2026 09:07
Copilot AI review requested due to automatic review settings June 1, 2026 09:19
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29441-wallet-quote-global-outcomes branch from 368bde4 to 5210095 Compare June 1, 2026 09:19

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 15 out of 15 changed files in this pull request and generated no new comments.

@sonarqubecloud

sonarqubecloud Bot commented Jun 1, 2026

Copy link
Copy Markdown

llm: string | null;
};

const VERSION_COMPATIBILITY_RULES: VersionCompatibilityRule[] = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently hardcoded just to be aligned with current Swap - but this can most likely be removed. If necessary in the future this should be handled with a remote-config / feature flag like it is done in Swap live-app.

Comment on lines +53 to +57
const currencyIds = [input.sendCurrencyId, input.receiveCurrencyId];
for (const rule of VERSION_COMPATIBILITY_RULES) {
const requiredVersion = appVersion.platform === "lld" ? rule.lld : rule.llm;
if (!requiredVersion || compareVersions(appVersion.version, requiredVersion) >= 0) {
continue;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

won't change anything here for now, since this whole check is currently under investigation with a potential removal

@philipptpunkt philipptpunkt merged commit c148de9 into develop Jun 1, 2026
86 checks passed
@philipptpunkt philipptpunkt deleted the feat/LIVE-29441-wallet-quote-global-outcomes branch June 1, 2026 14:36
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 shared-lib Label added for automated tagging of PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants