diff --git a/src/views/LoginPassword/LoginPassword.tsx b/src/views/LoginPassword/LoginPassword.tsx index 08d8985c..7da095f1 100644 --- a/src/views/LoginPassword/LoginPassword.tsx +++ b/src/views/LoginPassword/LoginPassword.tsx @@ -98,8 +98,8 @@ const LoginPasswordScreen = ({ navigation, route}) => { if (session !== undefined) { setSeed(session); } - - const keyPair = await EncryptedStorage.getItem("keyPair"); + + const keyPair = await EncryptedStorage.getItem("keyPair"); if (keyPair !== null) { setPrivateKey(JSON.parse(keyPair).privateKey); setPublicKey(JSON.parse(keyPair).publicKey); diff --git a/src/views/MyAccount/Overview.tsx b/src/views/MyAccount/Overview.tsx index 26a0dc9b..841ee615 100644 --- a/src/views/MyAccount/Overview.tsx +++ b/src/views/MyAccount/Overview.tsx @@ -72,10 +72,10 @@ const OverviewScreen = ({ route, navigation }) => { }; function toDecryptSignKey(account){ - if(account.isEncrypt == null || !account.isEncrypt || account.one_time_code == null){ + if(account.isEncrypt == null || !account.isEncrypt || account.one_time_code == null || privateKey == null){ return account.sign_key } - else{ + else{ const message = {cipher_text: account.sign_key, one_time_code: account.one_time_code} return naclDecrypting(message) } diff --git a/src/views/SendCoins1/SendCoins1.tsx b/src/views/SendCoins1/SendCoins1.tsx index e2143b05..596a5187 100644 --- a/src/views/SendCoins1/SendCoins1.tsx +++ b/src/views/SendCoins1/SendCoins1.tsx @@ -26,7 +26,7 @@ const SendCoins1Screen = (props) => { const [loading, setLoading] = useState(false); const [isValid, setValid] = useState(false); - const _from = myAccounts.map(item => ( + const _from = friends.map(item => ( { label: item.name, value: item.account_number,