Skip to content

Commit

Permalink
fix: bump @synonymdev/react-native-keychain to v9.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Nov 8, 2024
1 parent c106b2f commit 8db8074
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 25 deletions.
23 changes: 21 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1740,8 +1740,27 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNKeychain (8.2.2):
- RNKeychain (9.1.1):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNLocalize (3.0.2):
- React-Core
- RNNotifee (7.8.2):
Expand Down Expand Up @@ -2274,7 +2293,7 @@ SPEC CHECKSUMS:
RNDeviceInfo: b899ce37a403a4dea52b7cb85e16e49c04a5b88e
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: e80cae4246813ee7f667a2552012a6b7da5550a1
RNKeychain: 35f92386e7f8548e3e60e7441121afbe8c62d8e4
RNKeychain: 3ac3a44294d0b18492667ff87e4c50829cb35505
RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4
RNNotifee: 8e2d3df3f0e9ce8f5d1fe4c967431138190b6175
RNPermissions: 2c0eec471f4de66d04d226c339898d10a6e123c4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@synonymdev/blocktank-lsp-http-client": "1.5.0",
"@synonymdev/feeds": "3.0.0",
"@synonymdev/ledger": "0.0.5",
"@synonymdev/react-native-keychain": "8.2.2",
"@synonymdev/react-native-keychain": "9.1.1",
"@synonymdev/react-native-ldk": "0.0.153",
"@synonymdev/react-native-lnurl": "0.0.10",
"@synonymdev/react-native-pubky": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Recovery/Mnemonic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Mnemonic = ({
const bip39Passphrase = await getBip39Passphrase();

if (mnemoncicResult.isErr()) {
console.log(mnemoncicResult.error.message);
console.log('getMnemonicPhrase error:', mnemoncicResult.error.message);
showToast({
type: 'warning',
title: t('mnemonic_error'),
Expand Down
41 changes: 25 additions & 16 deletions src/screens/Settings/Backup/ShowMnemonic.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { memo, ReactElement, useMemo, useState, useEffect } from 'react';
import React, { memo, ReactElement, useState, useEffect } from 'react';
import { StyleSheet, View, Platform, TouchableOpacity } from 'react-native';
import { Trans, useTranslation } from 'react-i18next';
import Clipboard from '@react-native-clipboard/clipboard';
Expand Down Expand Up @@ -44,25 +44,37 @@ const ShowMnemonic = ({
useBottomSheetBackPress('backupNavigation');

useEffect(() => {
getMnemonicPhrase().then((res) => {
if (res.isErr()) {
console.log(res.error.message);
const getSeed = async (): Promise<void> => {
const mnemoncicResult = await getMnemonicPhrase();
const bip39PassphraseResult = await getBip39Passphrase();

if (mnemoncicResult.isErr()) {
console.log('getMnemonicPhrase error:', mnemoncicResult.error.message);
showToast({
type: 'warning',
title: t('mnemonic_error'),
description: t('mnemonic_error_description'),
});
return;
}
setSeed(res.value.split(' '));
});
getBip39Passphrase().then(setPassphrase);

setSeed(mnemoncicResult.value.split(' '));
setPassphrase(bip39PassphraseResult);
};

getSeed();
}, [t]);

const seedToShow = useMemo(
() => (Platform.OS === 'android' && !show ? dummySeed : seed),
[seed, show],
);
const revealMnemonic = (): void => {
setShow(true);
};

const copyMnemonic = (): void => {
Clipboard.setString(seed.join(' '));
vibrate();
};

const seedToShow = Platform.OS === 'android' && !show ? dummySeed : seed;

return (
<View style={styles.container}>
Expand All @@ -85,10 +97,7 @@ const ShowMnemonic = ({
<TouchableOpacity
style={styles.seed2}
activeOpacity={1}
onLongPress={(): void => {
Clipboard.setString(seed.join(' '));
vibrate();
}}>
onLongPress={copyMnemonic}>
<View style={styles.col}>
{seedToShow.slice(0, seedToShow.length / 2).map((w, i) => (
<Word key={i} word={w} number={i + 1} />
Expand All @@ -108,7 +117,7 @@ const ShowMnemonic = ({
size="large"
text={t('mnemonic_reveal')}
color="black50"
onPress={(): void => setShow(true)}
onPress={revealMnemonic}
testID="TapToReveal"
/>
</BlurView>
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4931,10 +4931,10 @@ __metadata:
languageName: node
linkType: hard

"@synonymdev/react-native-keychain@npm:8.2.2":
version: 8.2.2
resolution: "@synonymdev/react-native-keychain@npm:8.2.2"
checksum: 90c16a7caec3ae648c2c9af3d87da4e7bd425719e528d2793345b73f4757ec6aeacbdb4126b77e6f3b4237d8e734d35d7769e7a2fda54caaaea8b97dc699f558
"@synonymdev/react-native-keychain@npm:9.1.1":
version: 9.1.1
resolution: "@synonymdev/react-native-keychain@npm:9.1.1"
checksum: ec92ee34d1e61035bbbea8f7df93a0310cad6f55e4f2f23441b64e1092d00df5ff50d706318b8d45b16a6d300d2789ba7d651634313099bc356847f015529cfb
languageName: node
linkType: hard

Expand Down Expand Up @@ -6605,7 +6605,7 @@ __metadata:
"@synonymdev/blocktank-lsp-http-client": 1.5.0
"@synonymdev/feeds": 3.0.0
"@synonymdev/ledger": 0.0.5
"@synonymdev/react-native-keychain": 8.2.2
"@synonymdev/react-native-keychain": 9.1.1
"@synonymdev/react-native-ldk": 0.0.153
"@synonymdev/react-native-lnurl": 0.0.10
"@synonymdev/react-native-pubky": ^0.3.0
Expand Down

0 comments on commit 8db8074

Please sign in to comment.