Skip to content

Commit

Permalink
Fixing issue #18
Browse files Browse the repository at this point in the history
  • Loading branch information
katolykdev committed Aug 11, 2021
1 parent 985ad4c commit ac6f1d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/views/LoginPassword/LoginPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/views/MyAccount/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/SendCoins1/SendCoins1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ac6f1d4

Please sign in to comment.