Skip to content

[LWDM] fix(LIVE-24415): align wallet quote network fees#17696

Open
philipptpunkt wants to merge 1 commit into
feat/LIVE-29447-best-wallet-quotefrom
bugfix/LIVE-24415-wallet-quote-network-fees
Open

[LWDM] fix(LIVE-24415): align wallet quote network fees#17696
philipptpunkt wants to merge 1 commit into
feat/LIVE-29447-best-wallet-quotefrom
bugfix/LIVE-24415-wallet-quote-network-fees

Conversation

@philipptpunkt

@philipptpunkt philipptpunkt commented May 21, 2026

Copy link
Copy Markdown
Contributor

Stack (managed by stac-man)

@github-actions

github-actions Bot commented May 21, 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: bugfix/LIVE-24415-wallet-quote-network-fees
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: bugfix/LIVE-24415-wallet-quote-network-fees
  • Device: nanoX

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ✅ Deployed https://web-tools-hzfpkt5en-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

Aligns wallet-quoted network fee handling across normalization, formatting, and sorting by introducing a single “total” network-fee amount and improving fee-estimation fallbacks (notably for BTC and non-EVM cases). This keeps quote ranking/formatting consistent with the fee that users actually see.

Changes:

  • Replaces separate “estimated + approval” fee typing with QuoteNetworkFeeAmount and adds totalNetworkFee to QuoteDetails, then updates formatting/sorting to use the total.
  • Enhances fee normalization: preserves provider networkFees.value, adds a provider-fee fallback when bridge-estimated fees are zero, and plumbs totalNetworkFee through quote details + formatted output.
  • Improves fee-context estimation: uses fast fee strategy for Bitcoin and prevents tiny sampled amounts from rounding down to zero.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libs/ledger-live-common/src/wallet-api/Exchange/quotes/types.ts Updates re-exported quote types to use QuoteNetworkFeeAmount.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/sorting/sortQuotes.test.ts Updates sorting test expectations to reflect “total network fee” usage.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/sorting/buildNetCounterValue.ts Net countervalue now subtracts totalNetworkFee countervalue (instead of summing parts).
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/normalizeQuote.ts Adjusts formatted plumbing to no longer pass feeEstimate into formatting.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/normalizeQuote.test.ts Adds/updates tests for totalNetworkFee, preserved provider fees, and formatted totals.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/networkFees.ts Preserves provider-reported networkFees.value into normalized quote details.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/networkFeeEstimate.ts Introduces provider-fee fallback when bridge estimate is zero; updates fee amount typing.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/networkFeeEstimate.test.ts Adds coverage for the new provider-fee fallback behavior.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/buildQuoteDetails.ts Computes and stores totalNetworkFee derived from estimated + approval components.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/normalizer/buildFormattedQuoteValues.ts Formats/display-network-fee based on totalNetworkFee and uses its currency id for countervalue.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/fetchNetworkFeeContext.ts Uses BTC fast fee strategy and ensures sampled amounts remain non-zero after rounding.
libs/ledger-live-common/src/wallet-api/Exchange/quotes/fetchNetworkFeeContext.test.ts Adds assertions for BTC fee strategy and non-zero rounding behavior.
libs/exchange-module/src/types.ts Updates public exchange-module types: introduces QuoteNetworkFeeAmount and adds totalNetworkFee.

amount: string;
currencyId: string;
};

QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";

@github-actions

github-actions Bot commented May 21, 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.6 MB -
desktop-preloader 7.1 KB -
desktop-renderer 81.2 MB -
desktop-webviewDappPreloader 36.9 KB -
desktop-webviewPreloader 200.0 B -
mobile 258.9 MB -
desktop-workers 36.8 KB -
📋 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.6 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 81.2 MB - -
📄 JavaScript 28.9 MB - -
🎨 CSS 172.6 KB - -
🌐 HTML 1.8 KB - -
📁 Other Assets 52.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 - -

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

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

Metric Current Baseline Change
📊 Total Size 258.9 MB - -
📄 JavaScript 108.8 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 150.1 MB - -

📁 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 - -

Generated by Rsdoctor GitHub Action

@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from 6be31b8 to ef6d571 Compare May 21, 2026 14:28
@philipptpunkt philipptpunkt requested a review from a team as a code owner May 21, 2026 14:28
@philipptpunkt philipptpunkt force-pushed the bugfix/LIVE-24415-wallet-quote-network-fees branch from 022d4f6 to d4ad73e Compare May 21, 2026 14:28
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from ef6d571 to a3efa26 Compare May 21, 2026 15:25
Copilot AI review requested due to automatic review settings May 21, 2026 15:25
@philipptpunkt philipptpunkt force-pushed the bugfix/LIVE-24415-wallet-quote-network-fees branch from d4ad73e to 3bfc36b Compare May 21, 2026 15:25

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

Comment on lines 313 to 317
/**
* Wallet-computed network-fee estimate for the default fee strategy.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
* Network fee amount in atomic units as a decimal string.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
amount: string;
Comment on lines 27 to 31
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from a3efa26 to 6f0f4a6 Compare May 28, 2026 14:03
@philipptpunkt philipptpunkt force-pushed the bugfix/LIVE-24415-wallet-quote-network-fees branch from 3bfc36b to 7577e8d Compare May 28, 2026 14:03
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from 6f0f4a6 to 8b841d0 Compare May 29, 2026 08:45
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from 2a2409f to 65b9551 Compare June 8, 2026 13:04
@philipptpunkt philipptpunkt force-pushed the bugfix/LIVE-24415-wallet-quote-network-fees branch from 1c35d69 to 8e51285 Compare June 8, 2026 13:04
@philipptpunkt philipptpunkt force-pushed the feat/LIVE-29447-best-wallet-quote branch from 65b9551 to c1f12d1 Compare June 8, 2026 13:24

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

Comment on lines 24 to 31
QuoteLiquiditySource,
QuotePayoutNetworkFees,
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};

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

Comment on lines +322 to 326
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};

Comment on lines 26 to 31
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
Comment on lines 48 to 53
const higherReceiveWithFees = makeQuote("higher-receive-with-fees", {
receiveAmount: 1,
estimatedNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
approvalNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
totalNetworkFee: { amount: "200000000000000000", currencyId: "ethereum" },
});

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 12 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +52 to 54
networkFeesCurrencyId:
quoteDetails.totalNetworkFee?.currencyId ?? quoteDetails.networkFees.currencyId,
},

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 12 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +52 to 54
networkFeesCurrencyId:
quoteDetails.totalNetworkFee?.currencyId ?? quoteDetails.networkFees.currencyId,
},

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,

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

Comment on lines +27 to 31
const networkFee = feeAmountAsDisplayValue(
quote.quoteDetails.totalNetworkFee,
context.feeCurrencyMagnitude,
);
const feeCurrencyId =
Comment on lines +134 to +139
const providerFee = new BigNumber(quote.networkFees.value ?? 0);
if (!providerFee.gt(0)) {
return context.estimatedFeesAtomic;
}

return providerFee.shiftedBy(context.feeCurrencyMagnitude).integerValue(BigNumber.ROUND_DOWN);

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

Comment on lines 317 to 325
/**
* Wallet-computed network-fee estimate for the default fee strategy.
* Wallet-computed network-fee amount.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 26 to 31
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";

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

Comment on lines 317 to 325
/**
* Wallet-computed network-fee estimate for the default fee strategy.
* Wallet-computed network-fee amount.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 26 to 31
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
Comment on lines +52 to +53
networkFeesCurrencyId:
quoteDetails.totalNetworkFee?.currencyId ?? quoteDetails.networkFees.currencyId,

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 27 to 31
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines +341 to +343
estimatedNetworkFee?: QuoteNetworkFeeAmount;
approvalNetworkFee?: QuoteNetworkFeeAmount;
totalNetworkFee?: QuoteNetworkFeeAmount;

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 12 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +52 to +53
networkFeesCurrencyId:
quoteDetails.totalNetworkFee?.currencyId ?? quoteDetails.networkFees.currencyId,

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 28 to 31
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
Comment on lines 327 to 344
@@ -344,8 +338,9 @@ export type QuoteDetails = {
tokenAllowance?: QuoteTokenAllowance;
tags?: QuoteTags;
permitData?: QuotePermitData;
estimatedNetworkFee?: QuoteEstimatedNetworkFee;
approvalNetworkFee?: QuoteApprovalNetworkFee;
estimatedNetworkFee?: QuoteNetworkFeeAmount;
approvalNetworkFee?: QuoteNetworkFeeAmount;
totalNetworkFee?: QuoteNetworkFeeAmount;
};

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,

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

Comment on lines +27 to 33
const networkFee = feeAmountAsDisplayValue(
quote.quoteDetails.totalNetworkFee,
context.feeCurrencyMagnitude,
);
const feeCurrencyId =
quote.quoteDetails.estimatedNetworkFee?.currencyId ??
quote.quoteDetails.approvalNetworkFee?.currencyId ??
quote.quoteDetails.networkFees.currencyId;
quote.quoteDetails.totalNetworkFee?.currencyId ?? quote.quoteDetails.networkFees.currencyId;
const feeSpotPrice = context.spotPrices[feeCurrencyId] || 0;
return context.estimatedFeesAtomic;
}

const providerFee = new BigNumber(quote.networkFees.value ?? 0);
Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 28 to 31
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";

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 12 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};

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

Comment on lines 317 to 325
/**
* Wallet-computed network-fee estimate for the default fee strategy.
* Wallet-computed network-fee amount.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 26 to +30
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,

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

Comment on lines 48 to 53
const higherReceiveWithFees = makeQuote("higher-receive-with-fees", {
receiveAmount: 1,
estimatedNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
approvalNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
totalNetworkFee: { amount: "200000000000000000", currencyId: "ethereum" },
});
Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";

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

Comment on lines +322 to 326
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};

Comment on lines +135 to +137
function resolveFeeStrategy(account: Account): "fast" | "medium" {
return account.currency.id === "bitcoin" ? "fast" : "medium";
}

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

Comment on lines +318 to +322
* Wallet-computed network-fee amount.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
Comment on lines 27 to 31
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
Comment on lines +341 to 344
estimatedNetworkFee?: QuoteNetworkFeeAmount;
approvalNetworkFee?: QuoteNetworkFeeAmount;
totalNetworkFee?: QuoteNetworkFeeAmount;
};

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

Comment on lines 317 to 325
/**
* Wallet-computed network-fee estimate for the default fee strategy.
* Wallet-computed network-fee amount.
* `amount` is in atomic units as a decimal string to preserve precision for
* chains whose fees exceed `Number.MAX_SAFE_INTEGER`.
*/
export type QuoteEstimatedNetworkFee = {
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 27 to 31
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
} from "@ledgerhq/wallet-api-exchange-module";
return context.estimatedFeesAtomic;
}

const providerFee = new BigNumber(quote.networkFees.value ?? 0);

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

Comment on lines +322 to 325
export type QuoteNetworkFeeAmount = {
amount: string;
currencyId: string;
};
Comment on lines 26 to +30
QuotePermit2Message,
QuotePermitData,
QuoteTags,
QuoteTokenAllowance,
QuoteEstimatedNetworkFee,
QuoteApprovalNetworkFee,
QuoteNetworkFeeAmount,
Comment on lines 49 to +52
receiveAmount: 1,
estimatedNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
approvalNetworkFee: { amount: "100000000000000000", currencyId: "ethereum" },
totalNetworkFee: { amount: "200000000000000000", currencyId: "ethereum" },
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants