Skip to content

Commit

Permalink
Merge pull request #9139 from LedgerHQ/revert-9002-merge
Browse files Browse the repository at this point in the history
Revert "Merge pull request #9002 from LedgerHQ/feat/live-14643-bis"
  • Loading branch information
jiyuzhuang authored Feb 7, 2025
2 parents 7cec2d3 + b0a4f09 commit 11975c0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
5 changes: 0 additions & 5 deletions .changeset/yellow-rocks-cross.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({

if (!isLoading && !device) {
return renderConnectYourDevice({
modelId,
type,
unresponsive,
device,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import { isSyncOnboardingSupported } from "@ledgerhq/live-common/device/use-case
import NoSuchAppOnProviderErrorComponent from "./NoSuchAppOnProviderErrorComponent";
import Image from "~/renderer/components/Image";
import Nano from "~/renderer/images/nanoS.v4.svg";
import { usePostOnboardingHubState } from "@ledgerhq/live-common/postOnboarding/hooks/usePostOnboardingHubState";

export const AnimationWrapper = styled.div`
width: 600px;
Expand Down Expand Up @@ -896,43 +895,39 @@ export const renderInWrongAppForAccount = ({
});

export const renderConnectYourDevice = ({
modelId,
type,
onRepairModal,
device,
unresponsive,
}: {
modelId: DeviceModelId;
type: Theme["theme"];
onRepairModal?: ((open: boolean) => void) | null;
device: Device;
unresponsive?: boolean | null;
}) => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const { deviceModelId } = usePostOnboardingHubState();
return (
<Wrapper>
<Header />
<AnimationWrapper>
<Animation
animation={getDeviceAnimation(deviceModelId ?? DeviceModelId.stax, type, "enterPinCode")}
}) => (
<Wrapper>
<Header />
<AnimationWrapper>
<Animation animation={getDeviceAnimation(modelId, type, "enterPinCode")} />
</AnimationWrapper>
<Footer>
<Title>
<Trans
i18nKey={
unresponsive ? "DeviceAction.unlockDevice" : "DeviceAction.connectAndUnlockDevice"
}
/>
</AnimationWrapper>
<Footer>
<Title>
<Trans
i18nKey={
unresponsive ? "DeviceAction.unlockDevice" : "DeviceAction.connectAndUnlockDevice"
}
/>
</Title>
{!device && onRepairModal ? (
<TroubleshootingWrapper>
<ConnectTroubleshooting onRepair={onRepairModal} />
</TroubleshootingWrapper>
) : null}
</Footer>
</Wrapper>
);
};
</Title>
{!device && onRepairModal ? (
<TroubleshootingWrapper>
<ConnectTroubleshooting onRepair={onRepairModal} />
</TroubleshootingWrapper>
) : null}
</Footer>
</Wrapper>
);

const OpenSwapBtn = () => {
const { setDrawer } = useContext(context);
Expand Down

0 comments on commit 11975c0

Please sign in to comment.