-
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(llm): change walletsync to ledgersync for tracking
- Loading branch information
1 parent
1e62744
commit 01ad9ab
Showing
15 changed files
with
104 additions
and
114 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
18 changes: 0 additions & 18 deletions
18
apps/ledger-live-mobile/src/newArch/components/Dummy/Drawer.tsx
This file was deleted.
Oops, something went wrong.
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
48 changes: 24 additions & 24 deletions
48
...edger-live-mobile/src/newArch/features/WalletSync/screens/Activation/ActivationDrawer.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,60 +1,60 @@ | ||
import React, { useState } from "react"; | ||
import React from "react"; | ||
import QueuedDrawer from "LLM/components/QueuedDrawer"; | ||
import { TrackScreen } from "~/analytics"; | ||
import { useWindowDimensions } from "react-native"; | ||
import { Flex } from "@ledgerhq/native-ui"; | ||
import ActivationFlow from "../../components/Activation/ActivationFlow"; | ||
import { Steps } from "../../types/Activation"; | ||
import DrawerHeader from "../../components/Synchronize/DrawerHeader"; | ||
import useActivationDrawerModel from "./useActivationDrawerModel"; | ||
|
||
type ViewProps = ReturnType<typeof useActivationDrawerModel>; | ||
|
||
type Props = { | ||
isOpen: boolean; | ||
startingStep: Steps; | ||
handleClose: () => void; | ||
}; | ||
|
||
const ActivationDrawer = ({ isOpen, startingStep, handleClose }: Props) => { | ||
const [currentStep, setCurrentStep] = useState<Steps>(startingStep); | ||
function View({ | ||
isOpen, | ||
currentStep, | ||
hasCustomHeader, | ||
canGoBack, | ||
navigateToChooseSyncMethod, | ||
navigateToQrCodeMethod, | ||
goBackToPreviousStep, | ||
handleClose, | ||
onCloseDrawer, | ||
}: ViewProps) { | ||
const { height } = useWindowDimensions(); | ||
const maxDrawerHeight = height - 180; | ||
|
||
const CustomDrawerHeader = () => <DrawerHeader onClose={handleClose} />; | ||
|
||
const handleStepChange = (step: Steps) => setCurrentStep(step); | ||
|
||
let goBackCallback: () => void; | ||
|
||
const hasCustomHeader = currentStep === Steps.QrCodeMethod && startingStep === Steps.Activation; | ||
|
||
const canGoBack = currentStep === Steps.ChooseSyncMethod && startingStep === Steps.Activation; | ||
|
||
const resetStep = () => setCurrentStep(startingStep); | ||
|
||
const onClose = () => { | ||
resetStep(); | ||
handleClose(); | ||
}; | ||
|
||
return ( | ||
<> | ||
<TrackScreen /> | ||
<QueuedDrawer | ||
isRequestingToBeOpened={isOpen} | ||
onClose={onClose} | ||
onClose={onCloseDrawer} | ||
CustomHeader={hasCustomHeader ? CustomDrawerHeader : undefined} | ||
hasBackButton={canGoBack} | ||
onBack={() => goBackCallback()} | ||
onBack={goBackToPreviousStep} | ||
> | ||
<Flex maxHeight={maxDrawerHeight}> | ||
<ActivationFlow | ||
startingStep={currentStep} | ||
onStepChange={handleStepChange} | ||
onGoBack={callback => (goBackCallback = callback)} | ||
currentStep={currentStep} | ||
navigateToChooseSyncMethod={navigateToChooseSyncMethod} | ||
navigateToQrCodeMethod={navigateToQrCodeMethod} | ||
/> | ||
</Flex> | ||
</QueuedDrawer> | ||
</> | ||
); | ||
} | ||
|
||
const ActivationDrawer = (props: Props) => { | ||
return <View {...useActivationDrawerModel(props)} />; | ||
}; | ||
|
||
export default ActivationDrawer; |
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.