Skip to content

Commit

Permalink
Merge branch 'develop' into feat/LIVE-13875
Browse files Browse the repository at this point in the history
  • Loading branch information
CremaFR committed Sep 4, 2024
2 parents 3e857a6 + 5a898af commit 3abf295
Show file tree
Hide file tree
Showing 410 changed files with 5,993 additions and 3,822 deletions.
21 changes: 21 additions & 0 deletions .changeset/cuddly-tomatoes-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@ledgerhq/hw-transport-node-speculos-http": patch
"@ledgerhq/hw-transport-http": patch
"@ledgerhq/context-module": patch
"@ledgerhq/hw-app-helium": patch
"@ledgerhq/hw-app-solana": patch
"@ledgerhq/cryptoassets": patch
"@ledgerhq/hw-app-btc": patch
"@ledgerhq/hw-app-eth": patch
"@ledgerhq/coin-bitcoin": patch
"@ledgerhq/coin-evm": patch
"ledger-live-desktop": patch
"@ledgerhq/live-common": patch
"@ledgerhq/domain-service": patch
"@ledgerhq/live-network": patch
"@ledgerhq/coin-tester": patch
"@ledgerhq/evm-tools": patch
"@ledgerhq/ledger-libs": patch
---

Update `axios` to fixed version `1.7.3`
5 changes: 5 additions & 0 deletions .changeset/eighty-bikes-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Rework LedgerSync Analytics
5 changes: 5 additions & 0 deletions .changeset/eleven-taxis-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-network": major
---

Migrate to axios version 1.7.3
6 changes: 6 additions & 0 deletions .changeset/empty-pumas-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

Update errors in trad
5 changes: 5 additions & 0 deletions .changeset/forty-geese-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Ledger Sync - Fix Desktop Analytics
6 changes: 6 additions & 0 deletions .changeset/forty-rules-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"live-mobile": minor
"@ledgerhq/trustchain": patch
---

Handle Ledgersync onboarding errors
7 changes: 7 additions & 0 deletions .changeset/gentle-lions-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"ledger-live-desktop": minor
"live-mobile": minor
"@ledgerhq/live-wallet": minor
---

Ledger Sync - Improve account names module to avoid erasing custom names with the default ones when two instances are pushing around the same time
5 changes: 5 additions & 0 deletions .changeset/lemon-jeans-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/coin-polkadot": patch
---

get rid of sidecar fork api and fix validator list for polkadot
6 changes: 6 additions & 0 deletions .changeset/lucky-pandas-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

Fix minor bugs on both LL
5 changes: 5 additions & 0 deletions .changeset/modern-otters-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Adds confirmation message for Sell in LLD
6 changes: 6 additions & 0 deletions .changeset/odd-ants-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"@ledgerhq/ui": patch
---

Add rare satoshis icons to ui package and a mapping inside LLD to use them
5 changes: 5 additions & 0 deletions .changeset/pink-walls-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Setup analytics on Web3Hub
5 changes: 5 additions & 0 deletions .changeset/pink-wolves-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/coin-tezos": patch
---

Update some test for types regarding the upgrade to axios version 1.7.3
5 changes: 5 additions & 0 deletions .changeset/polite-donuts-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Add vertical scroll inside optin prompt and correct variable name. Fix export account row from settings that was hidden when LS enabled
5 changes: 5 additions & 0 deletions .changeset/sixty-eagles-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Fix Animation Color
5 changes: 5 additions & 0 deletions .changeset/small-penguins-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/coin-cosmos": patch
---

fix mock type in cosmos unit test and regen pnpm lock
5 changes: 5 additions & 0 deletions .changeset/strange-shrimps-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

LLM - Ledger Sync redirects to Qr code when syncing again after a successful sync
9 changes: 9 additions & 0 deletions .changeset/tame-crews-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@ledgerhq/coin-cosmos": patch
"ledger-live-desktop": patch
"live-mobile": patch
"@ledgerhq/live-common": patch
"@ledgerhq/coin-framework": patch
---

Move Cosmos and Cosmos-based coins to its own module
5 changes: 1 addition & 4 deletions apps/ledger-live-desktop/.unimportedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
"src/generate-cryptoassets-md.ts",

"src/newArch/features/Collectibles/**",
"src/newArch/features/AnalyticsOptInPrompt/**",
"src/newArch/features/WalletSync/**",
"src/newArch/components/ContextMenu/**",
"src/newArch/components/BreadCrumb/**",
"src/newArch/features/WalletSync/__tests__/shared.tsx",
"src/renderer/DesktopStorageProvider.ts"
],
"ignoreUnused": [
Expand Down
6 changes: 4 additions & 2 deletions apps/ledger-live-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"dependencies": {
"@braze/web-sdk": "^4.6.3",
"@ledgerhq/coin-bitcoin": "workspace:^",
"@ledgerhq/coin-cosmos": "workspace:^",
"@ledgerhq/coin-evm": "workspace:^",
"@ledgerhq/coin-framework": "workspace:^",
"@ledgerhq/devices": "workspace:*",
Expand Down Expand Up @@ -201,7 +202,7 @@
"@types/write-file-atomic": "^4.0.0",
"@vitejs/plugin-react": "^3.1.0",
"allure-playwright": "2.15.1",
"axios": "1.3.4",
"axios": "1.7.3",
"chalk": "^4.1.2",
"cross-env": "^7.0.3",
"debug": "^4.3.4",
Expand All @@ -218,6 +219,7 @@
"jest-environment-jsdom": "^29.7.0",
"listr": "^0.14.3",
"listr-verbose-renderer": "^0.6.0",
"nock": "^13.0.5",
"prebuild-install": "^7.1.1",
"react-refresh": "^0.14.0",
"react-test-renderer": "^18.2.0",
Expand All @@ -229,4 +231,4 @@
"vite-plugin-electron": "0.4.9",
"yargs": "^17.0.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => {

const dispatch = useDispatch();

const [isAnalitycsOptInPromptOpened, setIsAnalitycsOptInPromptOpened] = useState<boolean>(false);
const [isAnalyticsOptInPromptOpened, setIsAnalyticsOptInPromptOpened] = useState<boolean>(false);

const [nextStep, setNextStep] = useState<(() => void) | null>(null);
const flow = trackingKeysByFlow?.[entryPoint];
Expand All @@ -45,12 +45,12 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => {
[ABTestingVariants.variantB]: privacyPolicyUrl,
};

const openAnalitycsOptInPrompt = useCallback(
const openAnalyticsOptInPrompt = useCallback(
(routePath: string, callBack: () => void) => {
setIsAnalitycsOptInPromptOpened(true);
setIsAnalyticsOptInPromptOpened(true);
setNextStep(() => callBack);
},
[setIsAnalitycsOptInPromptOpened],
[setIsAnalyticsOptInPromptOpened],
);

const isEntryPointIncludedInFlagParams = lldAnalyticsOptInPromptFlag?.params?.entryPoints
Expand All @@ -71,7 +71,7 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => {
);

const onSubmit = () => {
setIsAnalitycsOptInPromptOpened(false);
setIsAnalyticsOptInPromptOpened(false);
dispatch(setHasSeenAnalyticsOptInPrompt(true));
if (entryPoint === EntryPoint.onboarding) {
nextStep?.();
Expand All @@ -80,8 +80,8 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => {
};

const analyticsOptInPromptProps = {
onClose: () => setIsAnalitycsOptInPromptOpened(false),
isOpened: isAnalitycsOptInPromptOpened,
onClose: () => setIsAnalyticsOptInPromptOpened(false),
isOpened: isAnalyticsOptInPromptOpened,
entryPoint: entryPoint,
variant,
};
Expand All @@ -101,8 +101,8 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => {
};

return {
openAnalitycsOptInPrompt,
setIsAnalitycsOptInPromptOpened,
openAnalyticsOptInPrompt,
setIsAnalyticsOptInPromptOpened,
onSubmit,
analyticsOptInPromptProps,
isFeatureFlagsAnalyticsPrefDisplayed: isFlagEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { EntryPoint } from "../types/AnalyticsOptInPromptNavigator";
export const useDisplayOnPortfolioAnalytics = () => {
const {
analyticsOptInPromptProps,
setIsAnalitycsOptInPromptOpened,
setIsAnalyticsOptInPromptOpened,
isFeatureFlagsAnalyticsPrefDisplayed,
onSubmit,
} = useAnalyticsOptInPrompt({ entryPoint: EntryPoint.portfolio });
Expand All @@ -16,8 +16,8 @@ export const useDisplayOnPortfolioAnalytics = () => {
};

useEffect(() => {
if (isFeatureFlagsAnalyticsPrefDisplayed) setIsAnalitycsOptInPromptOpened(true);
}, [isFeatureFlagsAnalyticsPrefDisplayed, setIsAnalitycsOptInPromptOpened]);
if (isFeatureFlagsAnalyticsPrefDisplayed) setIsAnalyticsOptInPromptOpened(true);
}, [isFeatureFlagsAnalyticsPrefDisplayed, setIsAnalyticsOptInPromptOpened]);

return {
analyticsOptInPromptProps: extendedAnalyticsOptInPromptProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ const Main = ({ shouldWeTrack, handleOpenPrivacyPolicy }: MainProps) => {
return (
<>
<Track onMount mandatory={shouldWeTrack} event={page} page={page} />
<Flex flexDirection={"column"} rowGap={"32px"} mx={"40px"} height={"100%"} pt={paddingTop}>
<Flex
flexDirection={"column"}
rowGap={"32px"}
mx={"40px"}
height={"100%"}
pt={paddingTop}
overflowY="scroll"
>
<HeaderTitle title={"analyticsOptInPrompt.common.title"} />
<MainBody handleOpenPrivacyPolicy={() => handleOpenPrivacyPolicy(page)} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ const AnalyticsScreen = ({
return (
<>
<Track onMount mandatory={shouldWeTrack} event={page} page={page} />
<Flex flexDirection={"column"} height={"100%"} rowGap={32} pt={paddingTop}>
<Flex
flexDirection={"column"}
height={"100%"}
rowGap={32}
pt={paddingTop}
overflowY={"scroll"}
>
<Header currentTheme={currentTheme} />
<Body {...bodyProps} handleOpenPrivacyPolicy={() => handleOpenPrivacyPolicy(page)} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const RecommandationsScreen = ({
return (
<>
<Track onMount mandatory={shouldWeTrack} event={page} page={page} />
<Flex flexDirection={"column"} height={"100%"} rowGap={32}>
<Flex flexDirection={"column"} height={"100%"} rowGap={32} overflowY={"scroll"}>
<Header currentTheme={currentTheme} />
<Body {...bodyProps} handleOpenPrivacyPolicy={() => handleOpenPrivacyPolicy(page)} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const VariantB = ({ entryPoint, onSubmit, step, setStep }: VariantBProps) => {
});
return (
<>
<Flex flexDirection={"column"} mx={"40px"} height={"100%"} pt={"40"}>
<Flex flexDirection={"column"} mx={"40px"} height={"100%"} pt={"40"} overflowY={"scroll"}>
{step === 0 ? (
<AnalyticsScreen
handleOpenPrivacyPolicy={handleOpenPrivacyPolicy}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import { Icons } from "@ledgerhq/react-ui";

export const mappingKeysWithIconAndName = {
alpha: { icon: <Icons.OrdinalsAlpha />, name: "Alpha" },
black_epic: { icon: <Icons.OrdinalsBlackEpic />, name: "Black Epic" },
black_legendary: { icon: <Icons.OrdinalsBlackLegendary />, name: "Black Legendary" },
black_mythic: { icon: <Icons.OrdinalsBlackMythic />, name: "Black Mythic" },
black_rare: { icon: <Icons.OrdinalsBlackRare />, name: "Black Rare" },
black_uncommon: { icon: <Icons.OrdinalsBlackUncommon />, name: "Black Uncommon" },
block_9: { icon: <Icons.OrdinalsBlock9 />, name: "Block 9" },
block_9_450x: { icon: <Icons.OrdinalsBlock9450X />, name: "Block 9 450x" },
block_78: { icon: <Icons.OrdinalsBlock78 />, name: "Block 78" },
block_286: { icon: <Icons.OrdinalsBlock286 />, name: "Block 286" },
block_666: { icon: <Icons.OrdinalsBlock666 />, name: "Block 666" },
common: { icon: <Icons.OrdinalsCommon />, name: "Common" },
epic: { icon: <Icons.OrdinalsEpic />, name: "Epic" },
first_tx: { icon: <Icons.OrdinalsFirstTx />, name: "First Transaction" },
hitman: { icon: <Icons.OrdinalsHitman />, name: "Hitman" },
jpeg: { icon: <Icons.OrdinalsJpeg />, name: "JPEG" },
legacy: { icon: <Icons.OrdinalsLegacy />, name: "Legacy" },
legendary: { icon: <Icons.OrdinalsLegendary />, name: "Legendary" },
mythic: { icon: <Icons.OrdinalsMythic />, name: "Mythic" },
nakamoto: { icon: <Icons.OrdinalsNakamoto />, name: "Nakamoto" },
omega: { icon: <Icons.OrdinalsOmega />, name: "Omega" },
paliblock: { icon: <Icons.OrdinalsPaliblockPalindrome />, name: "PaliBlock Palindrome" },
palindrome: { icon: <Icons.OrdinalsPalindrome />, name: "Palindrome" },
palinception: { icon: <Icons.OrdinalsPalinception />, name: "Palinception" },
pizza: { icon: <Icons.OrdinalsPizza />, name: "Pizza" },
rare: { icon: <Icons.OrdinalsRare />, name: "Rare" },
uncommon: { icon: <Icons.OrdinalsUncommon />, name: "Uncommon" },
vintage: { icon: <Icons.OrdinalsVintage />, name: "Vintage" },
};
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Error = ({
)}

{onClose && (
<Link color={"neutral.c100"} onClick={onClick}>
<Link color={"neutral.c100"} onClick={onClose}>
<Text fontSize={14} variant="paragraph" fontWeight="semiBold" color="neutral.c70">
{t("walletSync.close")}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Flex, Icons, Text } from "@ledgerhq/react-ui";
import React from "react";
import { useTranslation } from "react-i18next";
import styled, { useTheme } from "styled-components";
import { AnalyticsPage } from "../hooks/useLedgerSyncAnalytics";
import { AnalyticsFlow, AnalyticsPage } from "../hooks/useLedgerSyncAnalytics";
import TrackPage from "~/renderer/analytics/TrackPage";
import ButtonV3 from "~/renderer/components/ButtonV3";

Expand Down Expand Up @@ -44,7 +44,7 @@ export const GenericStatusDisplay = ({

return (
<Flex flexDirection="column" alignItems="center" justifyContent="center" rowGap="24px">
<TrackPage category={String(analyticsPage)} />
<TrackPage category={String(analyticsPage)} flow={AnalyticsFlow} />
<Container>
{type === "info" ? (
<Icons.InformationFill size={"L"} color={colors.primary.c60} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function useGetMembers() {
const sdk = useTrustchainSdk();
const trustchain = useSelector(trustchainSelector);
const memberCredentials = useSelector(memberCredentialsSelector);
const errorHandler = useLifeCycle();
const { handleError } = useLifeCycle();

function fetchMembers() {
if (!memberCredentials) {
Expand Down Expand Up @@ -41,9 +41,9 @@ export function useGetMembers() {

useEffect(() => {
if (isErrorGetMembers) {
errorHandler.handleError(getMembersError);
handleError(getMembersError);
}
}, [errorHandler, getMembersError, isErrorGetMembers]);
}, [handleError, getMembersError, isErrorGetMembers]);

return {
isMembersLoading: isMembersLoading,
Expand Down
Loading

0 comments on commit 3abf295

Please sign in to comment.