Skip to content

Commit

Permalink
Merge branch 'develop' into feat/spam-filtering-tx-LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
mcayuelas-ledger authored Oct 31, 2024
2 parents 9b4a1fc + 87218b1 commit b0415c4
Show file tree
Hide file tree
Showing 149 changed files with 2,029 additions and 728 deletions.
7 changes: 7 additions & 0 deletions .changeset/chilled-points-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"live-mobile": minor
"@ledgerhq/coin-stellar": patch
"@ledgerhq/live-common": patch
---

Add Stellar memo input on the recipient selection step
5 changes: 5 additions & 0 deletions .changeset/clean-nails-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

LLM - Remove react-native-adjust SDK and all adjust related parts from the codebase
5 changes: 5 additions & 0 deletions .changeset/cyan-berries-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

LLM - Updated iOS Privacy Info file
5 changes: 5 additions & 0 deletions .changeset/dull-plums-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Fix the memo on the Solana send flow
6 changes: 6 additions & 0 deletions .changeset/eighty-geckos-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"live-mobile": minor
"@ledgerhq/live-common": patch
---

Display human readable errors when the send flow fails
5 changes: 5 additions & 0 deletions .changeset/few-bikes-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Do not set `ptxSwapCoreExperiment` as `false` in analytics
8 changes: 8 additions & 0 deletions .changeset/green-rice-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"live-mobile": patch
---

Stax/Flex onboarding:
- Hide "Backup with Recover" section
- Auto redirect to Recover upsell between the onboarding and the post onboarding

5 changes: 5 additions & 0 deletions .changeset/lazy-mayflies-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Fix overflow issues in Add account flow
5 changes: 5 additions & 0 deletions .changeset/nervous-kangaroos-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

fixed: swap history for tokens explorer link
5 changes: 5 additions & 0 deletions .changeset/new-plums-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/coin-xrp": patch
---

Fix Cardano getAccountInfo
5 changes: 5 additions & 0 deletions .changeset/ninety-moles-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": minor
---

fixed: thorswap get status send transactionId instead of LL ids
6 changes: 6 additions & 0 deletions .changeset/purple-peaches-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

LLM / LLD - Update Analytics Opt In Prompt wording
6 changes: 6 additions & 0 deletions .changeset/slow-buses-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ledgerhq/types-live": patch
"@ledgerhq/live-common": patch
---

Add recoverUpsellRedirection feature flag
2 changes: 1 addition & 1 deletion .github/workflows/test-desktop-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
name: lint-desktop
path: ${{ github.workspace }}/apps/ledger-live-desktop/lint-desktop.json
- name: check for dead code
run: pnpm desktop unimported
run: pnpm desktop knip-check
shell: bash

unit-tests:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-mobile-e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
allure-report-ios:
name: "Allure Reports Export on Server"
runs-on: [ledger-live-medium]
if: ${{ inputs.slack_notif || github.event_name == 'push' }}
if: ${{ always() && (inputs.slack_notif || github.event_name == 'push') }}
needs: [detox-tests-ios]
outputs:
report-url: ${{ steps.upload.outputs.report-url }}
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
allure-report-android:
name: "Allure Reports Export on Server"
runs-on: [ledger-live-medium]
if: ${{ inputs.slack_notif || github.event_name == 'push' }}
if: ${{ always() && (inputs.slack_notif || github.event_name == 'push') }}
outputs:
report-url: ${{ steps.upload.outputs.report-url }}
result: ${{ steps.summary.outputs.test_result }}
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
report-on-slack:
runs-on: ubuntu-22.04
needs: [allure-report-android, allure-report-ios]
if: ${{ (failure() && github.event_name == 'push') || inputs.slack_notif }}
if: ${{ (failure() && github.event_name == 'push') || (always() && inputs.slack_notif) }}
env:
IOS_STATUS: ${{ needs.allure-report-ios.outputs.status }}
IOS_REPORT_URL: ${{ needs.allure-report-ios.outputs.report-url }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mobile-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Run linter
run: pnpm lint --filter="live-mobile" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --format="json" -o="lint-mobile.json"
- name: check for dead code
run: pnpm mobile unimported
run: pnpm mobile knip-check
shell: bash
- name: Run code checkers
run: pnpm typecheck --filter="live-mobile" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
Expand Down
10 changes: 3 additions & 7 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@ libs/live-nft-react/ @ledgerhq/live-hub
libs/live-nft/ @ledgerhq/live-hub
libs/promise/ @ledgerhq/live-hub
libs/ui/ @ledgerhq/live-hub
libs/live-hooks/ @ledgerhq/live-hub
libs/live-countervalues/ @ledgerhq/live-hub
libs/live-countervalues-react/ @ledgerhq/live-hub
libs/live-nft/ @ledgerhq/live-hub
libs/live-nft-react/ @ledgerhq/live-hub
libs/live-wallet/ @ledgerhq/live-hub
libs/trustchain/ @ledgerhq/live-hub
libs/hw-trustchain/ @ledgerhq/live-hub
libs/ledger-key-ring-protocol/ @ledgerhq/live-hub
libs/hw-ledger-key-ring-protocol/ @ledgerhq/live-hub

# Blockchain team
.github/**/bot-*.yml @ledgerhq/live-blockchain-support
Expand Down Expand Up @@ -77,6 +72,7 @@ libs/ledger-live-common/src/exchange/ @ledgerhq/p
libs/exchange-module/ @ledgerhq/ptx
libs/wallet-api-acre-module/ @ledgerhq/ptx
libs/ledgerjs/packages/hw-app-exchange/ @ledgerhq/ptx

# Wallet API team
**/PlatformAppProviderWrapper.tsx @ledgerhq/wallet-api
**/Web3AppWebview/ @ledgerhq/wallet-api
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"asciichart": "1.5.25",
"bignumber.js": "9.1.2",
"bip39": "3.1.0",
"body-parser": "1.20.2",
"body-parser": "1.20.3",
"command-line-args": "5.2.1",
"cors": "2.8.5",
"express": "4.19.2",
Expand Down
39 changes: 0 additions & 39 deletions apps/ledger-live-desktop/.unimportedrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/ledger-live-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"test:playwright:clean": "git clean -fdX tests/artifacts",
"typecheck": "node scripts/typecheck.js",
"check": "pnpm lint; pnpm typecheck",
"unimported": "unimported",
"assets:replace": "zx ./scripts/replace-assets.mjs"
"assets:replace": "zx ./scripts/replace-assets.mjs",
"knip-check": "pnpm knip --directory ../.. -W apps/ledger-live-desktop"
},
"dependencies": {
"@braze/web-sdk": "4.10.2",
Expand Down
8 changes: 7 additions & 1 deletion apps/ledger-live-desktop/src/config/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ export const urls = {
"https://cdn.figment.io/legal/Current%20Ledger_Online%20Staking%20Delgation%20Services%20Agreement.pdf",
ens: "https://support.ledger.com/article/9710787581469-zd",
ledgerLiveMobile: {
storeLink: "https://r354.adj.st/?adj_t=t2esmlk&adj_campaign=Ledger_Live",
appStore: "https://apps.apple.com/app/id1361671700",
playStore: "https://play.google.com/store/apps/details?id=com.ledger.live",
},
Expand All @@ -188,6 +187,13 @@ export const urls = {
"https://shop.ledger.com?utm_source=live&utm_medium=draw&utm_campaign=ledger_sync_lns_uncompatible&utm_content=to_shop",
learnMoreLedgerSync:
"https://www.ledger.com/blog-ledger-sync-synchronize-your-crypto-accounts-effortless-private-and-secure",

// Node errors
txBroadcastErrors: {
badTxns: "https://support.ledger.com/article/5129526865821-zd",
blobsLimit: "https://support.ledger.com/article/17830974229661-zd",
txnMempoolConflict: "https://support.ledger.com/article/14593285242525-zd",
},
};

export const vaultSigner = {
Expand Down
5 changes: 3 additions & 2 deletions apps/ledger-live-desktop/src/renderer/analytics/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ const getPtxAttributes = () => {
const ptxSwapLiveAppDemoThree = analyticsFeatureFlagMethod("ptxSwapLiveAppDemoThree")?.enabled;
const ptxSwapExodusProvider = analyticsFeatureFlagMethod("ptxSwapExodusProvider")?.enabled;
const ptxSwapCoreExperimentFlag = analyticsFeatureFlagMethod("ptxSwapCoreExperiment");
const ptxSwapCoreExperiment =
ptxSwapCoreExperimentFlag?.enabled && ptxSwapCoreExperimentFlag?.params?.variant;
const ptxSwapCoreExperiment = ptxSwapCoreExperimentFlag?.enabled
? ptxSwapCoreExperimentFlag?.params?.variant
: undefined;

const isBatch1Enabled: boolean =
!!fetchAdditionalCoins?.enabled && fetchAdditionalCoins?.params?.batch === 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ export function CurrencyCircleIcon({
}
function CurrencyBadge({ currency }: { currency: CryptoCurrency | TokenCurrency }) {
return (
<Box horizontal alignItems={"center"} flow={3} id="currency-badge">
<Box horizontal alignItems="center" flow={3} id="currency-badge" flex={1}>
<CurrencyCircleIcon size={40} currency={currency} />
<Box ml={2}>
<Box ml={2} maxWidth="fit-content">
<Box
ff="Inter|SemiBold"
color="palette.text.shade50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,26 @@ const SelectCurrency = ({
const OptionMultilineContainer = styled(Box)`
line-height: 1.3em;
`;

const OptionBox = styled(Box)`
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
vertical-align: middle;
grid-gap: 10px;
`;

const OptionTitleBox = styled(Box).attrs(() => ({
color: "palette.text.shade100",
ff: "Inter|SemiBold",
fontSize: 4,
}))`
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
`;

const CurrencyLabel = styled(Text).attrs(() => ({
color: "palette.text.shade60",
ff: "Inter|SemiBold",
Expand Down Expand Up @@ -179,9 +199,9 @@ export function CurrencyOption({
const isParentTagDisplayed = !hideParentTag && (currency as TokenCurrency).parentCurrency;
const textContents = singleLineLayout ? (
<>
<Box grow ff="Inter|SemiBold" color="palette.text.shade100" fontSize={4}>
<OptionTitleBox title={`${currency.name} (${currency.ticker})`}>
{`${currency.name} (${currency.ticker})`}
</Box>
</OptionTitleBox>
{isParentTagDisplayed ? (
<CurrencyLabel>{(currency as TokenCurrency).parentCurrency.name}</CurrencyLabel>
) : null}
Expand All @@ -207,10 +227,10 @@ export function CurrencyOption({
</>
);
return (
<Box grow horizontal role="option" alignItems="center" flow={2}>
<OptionBox>
<CryptoCurrencyIcon circle currency={currency} size={26} />
{textContents}
</Box>
</OptionBox>
);
}
const renderOption = <C extends CurrencyOption>({ data }: { data: C }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ const SwapOperationDetails = ({
const theme = useTheme();
const statusColor = getStatusColor(status, theme);
const { t } = useTranslation();
const url =
fromCurrency.type === "CryptoCurrency" &&
getTransactionExplorer(getDefaultExplorerView(fromCurrency), operation.hash);
const mainCurrency =
fromCurrency.type === "CryptoCurrency" ? fromCurrency : fromCurrency.parentCurrency;
const url = getTransactionExplorer(getDefaultExplorerView(mainCurrency), operation.hash);

useEffect(() => {
const getProvideData = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SuccessDisplay from "~/renderer/components/SuccessDisplay";
import { OperationDetails } from "~/renderer/drawers/OperationDetails";
import { setDrawer } from "~/renderer/drawers/Provider";
import { multiline } from "~/renderer/styles/helpers";
import { urls } from "~/config/urls";
import { StepProps } from "../types";
import NodeError from "./Confirmation/NodeError";
import ErrorDisplay from "~/renderer/components/ErrorDisplay";
Expand Down Expand Up @@ -89,7 +90,7 @@ function StepConfirmation({
/>
{signed ? (
<NodeError
error={createTransactionBroadcastError(error, {
error={createTransactionBroadcastError(error, urls, {
coin: ticker,
network: String(mainAccount?.currency.name),
})}
Expand Down
10 changes: 5 additions & 5 deletions apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6531,12 +6531,12 @@
"analyticsOptInPrompt": {
"variantA": {
"description": "Sharing your Ledger Live data helps us understand your preferences and show content that's relevant to you.",
"whatWeTrack": "With your consent, Ledger will be able to track data about how you use Ledger Live (including page visits and clicks):",
"whatWeTrack": "With your consent, Ledger will be able to collect data about how you use Ledger Live (including page visits and clicks):",
"whatWeTrackList": {
"1": "To measure the performance of Ledger Live and enhance both the app and your experience (Analytics).",
"2": "To provide you with personalized recommendations and content tailored to your preferences, as well as to help us measure the effectiveness of our marketing campaigns (Personalization)."
},
"whatWeDoNotTrack": "Ledger will never track information regarding:",
"whatWeDoNotTrack": "Ledger will never collect information regarding:",
"whatWeDoNotTrackList": {
"1": "Your assets.",
"2": "Your portfolio.",
Expand Down Expand Up @@ -6578,13 +6578,13 @@
"common": {
"title": "Help us improve and personalize your experience",
"revokeInfo": "You can revoke your consent any time in the app settings.",
"learnMore": "Learn more about our Tracking Policy"
"learnMore": "Learn more about how we handle your data"
},
"profileSettings": {
"personalizedExp": "Personalized experience",
"analytics": "Analytics",
"personalizedExpDesc": "Enable Ledger to track app usage data to provide personalized recommendations and content that match your preferences and to help measure the performance of our marketing campaigns.",
"analyticsDesc": "Enable Ledger to track app usage data to help measure Ledger Live’s performance and enhance both the app and your experience."
"personalizedExpDesc": "Enable Ledger to collect app usage data to provide personalized recommendations and content that match your preferences and to help measure the performance of our marketing campaigns.",
"analyticsDesc": "Enable Ledger to collect app usage data to help measure Ledger Live’s performance and enhance both the app and your experience."
}
},
"walletSync": {
Expand Down
Loading

0 comments on commit b0415c4

Please sign in to comment.