-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wallet sync synchronize via qr code from mobile to desktop
- Loading branch information
1 parent
4014e7c
commit 91ce200
Showing
29 changed files
with
392 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"ledger-live-desktop": minor | ||
"live-mobile": minor | ||
"@ledgerhq/trustchain": minor | ||
"@ledgerhq/web-tools": minor | ||
--- | ||
|
||
Ledger Sync - Added the synchronization of a trustchain from mobile to desktop by scanning the QR code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
apps/ledger-live-desktop/src/newArch/features/WalletSync/hooks/useInstanceName.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os from "os"; | ||
|
||
const platformMap: Record<string, string | undefined> = { | ||
darwin: "Mac", | ||
win32: "Windows", | ||
linux: "Linux", | ||
}; | ||
|
||
export function useInstanceName(): string { | ||
const platform = os.platform(); | ||
const hostname = os.hostname(); | ||
const name = `${platformMap[platform] || platform}${hostname ? " " + hostname : ""}`; | ||
return name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...r-live-desktop/src/newArch/features/WalletSync/screens/Activation/02-DeviceActionStep.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import React from "react"; | ||
import { Device } from "@ledgerhq/live-common/hw/actions/types"; | ||
import OpenOrInstallTrustChainApp from "../DeviceActions/openOrInstall"; | ||
import { useInitMemberCredentials } from "../../hooks/useInitMemberCredentials"; | ||
|
||
type Props = { | ||
goNext: (device: Device) => void; | ||
}; | ||
|
||
export default function DeviceActionStep({ goNext }: Props) { | ||
useInitMemberCredentials(); | ||
|
||
return <OpenOrInstallTrustChainApp goNext={goNext} />; | ||
} |
24 changes: 24 additions & 0 deletions
24
...ger-live-desktop/src/newArch/features/WalletSync/screens/Synchronize/05-UnbackedError.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { Error } from "../../components/Error"; | ||
import { useTranslation } from "react-i18next"; | ||
import { AnalyticsPage } from "../../hooks/useWalletSyncAnalytics"; | ||
import { useDispatch } from "react-redux"; | ||
import { setFlow } from "~/renderer/actions/walletSync"; | ||
import { Flow, Step } from "~/renderer/reducers/walletSync"; | ||
|
||
export default function UnbackedError() { | ||
const { t } = useTranslation(); | ||
|
||
const dispatch = useDispatch(); | ||
|
||
return ( | ||
<Error | ||
title={t("walletSync.synchronize.unbackedError.title")} | ||
description={t("walletSync.synchronize.unbackedError.description")} | ||
analyticsPage={AnalyticsPage.UnbackedError} | ||
cta={t("walletSync.synchronize.unbackedError.cta")} | ||
onClick={() => dispatch(setFlow({ flow: Flow.Activation, step: Step.DeviceAction }))} | ||
outline={false} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.