|
8 | 8 | import { useCallback, useMemo, useState } from "react"; |
9 | 9 | import { View, Text, TextInput, ScrollView, Pressable } from "react-native"; |
10 | 10 | import { SafeAreaView } from "react-native-safe-area-context"; |
| 11 | +import { useRouter } from "expo-router"; |
11 | 12 | import * as Clipboard from "expo-clipboard"; |
12 | 13 | import MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons"; |
13 | 14 | import { useWalletStore } from "../src/wallet/wallet-store"; |
@@ -41,6 +42,7 @@ type ExportStep = "pin" | "select" | "passphrase" | "result"; |
41 | 42 | // --------------------------------------------------------------------------- |
42 | 43 |
|
43 | 44 | export default function ExportKeyScreen() { |
| 45 | + const router = useRouter(); |
44 | 46 | const addresses = useWalletStore((s) => s.addresses); |
45 | 47 | const network = useWalletStore((s) => s.network); |
46 | 48 | const theme = useTheme(); |
@@ -247,6 +249,7 @@ export default function ExportKeyScreen() { |
247 | 249 | <ScreenHeader |
248 | 250 | title="Select Address" |
249 | 251 | subtitle="Choose the address whose private key you want to export" |
| 252 | + onBack={() => router.back()} |
250 | 253 | /> |
251 | 254 | <ScrollView |
252 | 255 | className="flex-1" |
@@ -286,6 +289,7 @@ export default function ExportKeyScreen() { |
286 | 289 | <ScreenHeader |
287 | 290 | title="Set Encryption Passphrase" |
288 | 291 | subtitle="This passphrase will be needed to decrypt the exported key. Choose a strong passphrase and store it safely." |
| 292 | + onBack={() => setStep("select")} |
289 | 293 | /> |
290 | 294 | <ScrollView |
291 | 295 | className="flex-1" |
@@ -356,6 +360,7 @@ export default function ExportKeyScreen() { |
356 | 360 | <ScreenHeader |
357 | 361 | title="Encrypted Key" |
358 | 362 | subtitle="Your BIP38 encrypted private key" |
| 363 | + onBack={() => router.back()} |
359 | 364 | /> |
360 | 365 | <ScrollView |
361 | 366 | className="flex-1" |
|
0 commit comments