diff --git a/src/ui/modal/modalPasswordUnsave/view.jsx b/src/ui/modal/modalPasswordUnsave/view.jsx index 84697da99..d303b4482 100644 --- a/src/ui/modal/modalPasswordUnsave/view.jsx +++ b/src/ui/modal/modalPasswordUnsave/view.jsx @@ -1,7 +1,7 @@ // @flow import React from 'react'; import { Modal } from 'modal/modal'; -import keytar from 'keytar'; +// import keytar from 'keytar'; type Props = { closeModal: () => void, @@ -18,11 +18,12 @@ class ModalPasswordUnsave extends React.PureComponent { type="confirm" confirmButtonLabel={__('Forget')} abortButtonLabel={__('Nevermind')} - onConfirmed={() => - keytar.deletePassword('LBRY', 'wallet_password').then(() => { - this.props.setPasswordSaved(false); - this.props.closeModal(); - }) + onConfirmed={ + () => {} + // keytar.deletePassword('LBRY', 'wallet_password').then(() => { + // this.props.setPasswordSaved(false); + // this.props.closeModal(); + // }) } onAborted={this.props.closeModal} > diff --git a/src/ui/modal/modalWalletDecrypt/view.jsx b/src/ui/modal/modalWalletDecrypt/view.jsx index 9e79ecbdd..78329dec8 100644 --- a/src/ui/modal/modalWalletDecrypt/view.jsx +++ b/src/ui/modal/modalWalletDecrypt/view.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { Modal } from 'modal/modal'; import Button from 'component/button'; -import keytar from 'keytar'; +// import keytar from 'keytar'; type Props = { closeModal: () => void, @@ -26,7 +26,7 @@ class ModalWalletDecrypt extends React.PureComponent { const { props, state } = this; if (state.submitted && props.walletDecryptSucceded === true) { - keytar.deletePassword('LBRY', 'wallet_password'); + // keytar.deletePassword('LBRY', 'wallet_password'); props.setPasswordSaved(false); props.closeModal(); props.updateWalletStatus(); diff --git a/src/ui/modal/modalWalletEncrypt/view.jsx b/src/ui/modal/modalWalletEncrypt/view.jsx index 944138ce9..add1950d4 100644 --- a/src/ui/modal/modalWalletEncrypt/view.jsx +++ b/src/ui/modal/modalWalletEncrypt/view.jsx @@ -3,7 +3,6 @@ import React from 'react'; import { Form, FormField, Submit } from 'component/common/form'; import { Modal } from 'modal/modal'; import Button from 'component/button'; -import keytar from 'keytar'; type Props = { closeModal: () => void, @@ -89,7 +88,7 @@ class ModalWalletEncrypt extends React.PureComponent { } if (state.rememberPassword === true) { this.props.setPasswordSaved(true); - keytar.setPassword('LBRY', 'wallet_password', state.newPassword); + // keytar.setPassword('LBRY', 'wallet_password', state.newPassword); } this.setState({ submitted: true }); this.props.encryptWallet(state.newPassword); diff --git a/src/ui/modal/modalWalletUnlock/view.jsx b/src/ui/modal/modalWalletUnlock/view.jsx index f34feb2a5..69af1aa44 100644 --- a/src/ui/modal/modalWalletUnlock/view.jsx +++ b/src/ui/modal/modalWalletUnlock/view.jsx @@ -3,7 +3,7 @@ import React from 'react'; import { Form, FormField } from 'component/common/form'; import { Modal } from 'modal/modal'; import Button from 'component/button'; -import keytar from 'keytar'; +// import keytar from 'keytar'; type Props = { quit: () => void, @@ -30,7 +30,7 @@ class ModalWalletUnlock extends React.PureComponent { if (props.walletUnlockSucceded === true) { if (this.state.rememberPassword) { this.props.setPasswordSaved(true); - keytar.setPassword('LBRY', 'wallet_password', this.state.password); + // keytar.setPassword('LBRY', 'wallet_password', this.state.password); } props.closeModal(); } diff --git a/src/ui/page/settings/view.jsx b/src/ui/page/settings/view.jsx index f29aab379..1ef176802 100644 --- a/src/ui/page/settings/view.jsx +++ b/src/ui/page/settings/view.jsx @@ -12,7 +12,7 @@ import Page from 'component/page'; import SettingLanguage from 'component/settingLanguage'; import FileSelector from 'component/common/file-selector'; import UnsupportedOnWeb from 'component/common/unsupported-on-web'; -import keytar from 'keytar'; +// import keytar from 'keytar'; import WalletSecurityAndSync from '../../component/walletSecurityAndSync'; type Price = { @@ -99,13 +99,13 @@ class SettingsPage extends React.PureComponent { componentDidMount() { this.props.getThemes(); this.props.updateWalletStatus(); - keytar.getPassword('LBRY', 'wallet_password').then(p => { - if (p || p === '') { - this.props.setPasswordSaved(true); - } else { - this.props.setPasswordSaved(false); - } - }); + // keytar.getPassword('LBRY', 'wallet_password').then(p => { + // if (p || p === '') { + // this.props.setPasswordSaved(true); + // } else { + // this.props.setPasswordSaved(false); + // } + // }); } onKeyFeeChange(newValue: Price) { diff --git a/src/ui/page/show/index.js b/src/ui/page/show/index.js index f39159fd9..a6144da6d 100644 --- a/src/ui/page/show/index.js +++ b/src/ui/page/show/index.js @@ -14,8 +14,14 @@ const select = (state, props) => { const { pathname, hash } = props.location; const urlPath = pathname + hash; // Remove the leading "/" added by the browser +<<<<<<< HEAD const path = urlPath.slice(1).replace(/:/g, '#'); +======= + const path = pathname.slice(1).replace(/:/g, '#'); + console.log('path', path); + debugger; +>>>>>>> rebase and comment out keytar let uri; try { uri = normalizeURI(path); diff --git a/src/ui/util/saved-passwords.js b/src/ui/util/saved-passwords.js index 36ca90cf2..0da4afb43 100644 --- a/src/ui/util/saved-passwords.js +++ b/src/ui/util/saved-passwords.js @@ -1,15 +1,17 @@ -import keytar from 'keytar'; +// import keytar from 'keytar'; import { AUTH_ORG } from 'constants/keychain'; export const setSavedPassword = (key, value) => { - keytar.setPassword(AUTH_ORG, key, value); + // keytar.setPassword(AUTH_ORG, key, value); }; export const getSavedPassword = key => { - return keytar - .getPassword(AUTH_ORG, key) - .then(p => p) - .catch(e => console.error(e)); + // return keytar + // .getPassword(AUTH_ORG, key) + // .then(p => p) + // .catch(e => console.error(e)); }; -export const deleteSavedPassword = key => keytar.deletePassword(AUTH_ORG, key).catch(e => console.error(e)); +export const deleteSavedPassword = key => { + // keytar.deletePassword(AUTH_ORG, key).catch(e => console.error(e)); +};