Browse Source

resolved conflict

receivehooks
Overtorment 5 years ago
parent
commit
3106a47058
  1. 4
      .eslintrc
  2. 5
      App.js
  3. 7
      BlueComponents.js
  4. 6
      package-lock.json
  5. 2
      package.json
  6. 3
      screen/send/ScanQRCode.js
  7. 13
      screen/settings/GeneralSettings.js
  8. 4
      screen/settings/NetworkSettings.js
  9. 2
      screen/settings/about.js
  10. 2
      screen/settings/licensing.js
  11. 2
      screen/settings/releasenotes.js
  12. 2
      screen/settings/settings.js
  13. 4
      screen/wallets/export.js
  14. 2
      screen/wallets/selectWallet.js

4
.eslintrc

@ -1,10 +1,12 @@
{
"parser": "babel-eslint",
"plugins": [
"react", "prettier"
"react", "prettier", "react-hooks"
],
"extends": ["standard", "standard-react", "prettier"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
'prettier/prettier': [
'warn',
{

5
App.js

@ -40,6 +40,7 @@ export default class App extends React.Component {
AppState.addEventListener('change', this._handleAppStateChange);
QuickActions.popInitialAction().then(this.popInitialAction);
DeviceEventEmitter.addListener('quickActionShortcut', this.walletQuickActions);
this._handleAppStateChange(undefined);
}
popInitialAction = async data => {
@ -107,7 +108,7 @@ export default class App extends React.Component {
_handleAppStateChange = async nextAppState => {
if (BlueApp.getWallets().length > 0) {
if (this.state.appState.match(/background/) && nextAppState === 'active') {
if ((this.state.appState.match(/background/) && nextAppState) === 'active' || nextAppState === undefined) {
setTimeout(() => A(A.ENUM.APP_UNSUSPENDED), 2000);
const clipboard = await Clipboard.getString();
const isAddressFromStoredWallet = BlueApp.getWallets().some(wallet => {
@ -138,8 +139,10 @@ export default class App extends React.Component {
}
this.setState({ clipboardContent: clipboard });
}
if (nextAppState) {
this.setState({ appState: nextAppState });
}
}
};
isBothBitcoinAndLightningWalletSelect = wallet => {

7
BlueComponents.js

@ -1429,13 +1429,10 @@ export class NewWalletPanel extends Component {
export const BlueTransactionListItem = ({ item, itemPriceUnit = BitcoinUnit.BTC, shouldRefresh }) => {
const [transactionTimeToReadable, setTransactionTimeToReadable] = useState('...');
const [subtitleNumberOfLines, setSubtitleNumberOfLines] = useState(1);
const calculateTimeLabel = () => {
const transactionTimeToReadable = loc.transactionTimeToReadable(item.received);
return setTransactionTimeToReadable(transactionTimeToReadable);
};
useEffect(() => {
calculateTimeLabel();
const transactionTimeToReadable = loc.transactionTimeToReadable(item.received);
return setTransactionTimeToReadable(transactionTimeToReadable);
}, [item, itemPriceUnit, shouldRefresh]);
const txMemo = () => {

6
package-lock.json

@ -11453,9 +11453,9 @@
"from": "git+https://github.com/Overtorment/react-native-blue-crypto.git"
},
"react-native-camera": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/react-native-camera/-/react-native-camera-3.17.0.tgz",
"integrity": "sha512-Gd9E5XHrEScYPsugO4sYBYw+RnFg+M1kbjvsCE3B/pk+4Fk01tNY14RYoghYsimWWsQVgYNqOOJG5f1fQ3BUeg==",
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/react-native-camera/-/react-native-camera-3.19.1.tgz",
"integrity": "sha512-d6tMnIXLps322pXeH7HpQ/O10nhTclSbTd9J8WGxO71QxRpTTxq3NlMPHtwaGYOBVAEl9zho3lbe+/Zxql95jw==",
"requires": {
"prop-types": "^15.6.2"
}

2
package.json

@ -98,7 +98,7 @@
"react-native": "0.61.5",
"react-native-biometrics": "git+https://github.com/BlueWallet/react-native-biometrics.git#2.0.0",
"react-native-blue-crypto": "git+https://github.com/Overtorment/react-native-blue-crypto",
"react-native-camera": "3.17.0",
"react-native-camera": "3.19.1",
"react-native-default-preference": "1.4.1",
"react-native-device-info": "4.0.1",
"react-native-document-picker": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa",

3
screen/send/ScanQRCode.js

@ -12,10 +12,13 @@ const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
const createHash = require('create-hash');
const ScanQRCode = ({
// eslint-disable-next-line react-hooks/rules-of-hooks
onBarScanned = useNavigationParam('onBarScanned'),
cameraPreviewIsPaused = false,
showCloseButton = true,
// eslint-disable-next-line react-hooks/rules-of-hooks
showFileImportButton = useNavigationParam('showFileImportButton') || false,
// eslint-disable-next-line react-hooks/rules-of-hooks
launchedBy = useNavigationParam('launchedBy'),
}) => {
if (!launchedBy || !onBarScanned) console.warn('Necessary params missing');

13
screen/settings/GeneralSettings.js

@ -36,7 +36,6 @@ const GeneralSettings = () => {
) : (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<ScrollView>
<BlueCard>
{BlueApp.getWallets().length > 1 && (
<>
<BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title="On Launch" />
@ -44,17 +43,10 @@ const GeneralSettings = () => {
)}
{Platform.OS === 'ios' ? (
<>
<BlueListItem
hideChevron
title={'Continuity'}
switchButton
onSwitch={onHandOffEnabledSwitch}
switched={isHandoffUseEnabled}
/>
<BlueListItem hideChevron title={'Continuity'} switchButton onSwitch={onHandOffEnabledSwitch} switched={isHandoffUseEnabled} />
<BlueCard>
<BlueText>
When enabled, you will be able to view selected wallets, and transactions, using your other Apple iCloud connected
devices.
When enabled, you will be able to view selected wallets, and transactions, using your other Apple iCloud connected devices.
</BlueText>
</BlueCard>
<BlueSpacing20 />
@ -74,7 +66,6 @@ const GeneralSettings = () => {
</BlueText>
</BlueCard>
<BlueSpacing20 />
</BlueCard>
</ScrollView>
</SafeBlueArea>
);

4
screen/settings/NetworkSettings.js

@ -10,15 +10,15 @@ const NetworkSettings = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
return isLoading ? (
<BlueLoading />
) : (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<ScrollView>
<BlueListItem title={loc.settings.lightning_settings} component={TouchableOpacity} onPress={() => navigate('LightningSettings')} />
<BlueListItem title={'Electrum server'} component={TouchableOpacity} onPress={() => navigate('ElectrumSettings')} />
<BlueListItem title={loc.settings.lightning_settings} component={TouchableOpacity} onPress={() => navigate('LightningSettings')} />
</ScrollView>
</SafeBlueArea>
);

2
screen/settings/about.js

@ -23,7 +23,7 @@ const About = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
const handleOnReleaseNotesPress = () => {
navigate('ReleaseNotes');

2
screen/settings/licensing.js

@ -8,7 +8,7 @@ const Licensing = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
return isLoading ? (
(<BlueLoading />)

2
screen/settings/releasenotes.js

@ -9,7 +9,7 @@ const ReleaseNotes = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
return isLoading ? (
(<BlueLoading />)

2
screen/settings/settings.js

@ -10,7 +10,7 @@ const Settings = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
return isLoading ? (
<BlueLoading />

4
screen/wallets/export.js

@ -5,7 +5,7 @@ import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueCopyTex
import PropTypes from 'prop-types';
import Privacy from '../../Privacy';
import Biometric from '../../class/biometrics';
import { LegacyWallet, LightningCustodianWallet, SegwitBech32Wallet, SegwitP2SHWallet } from '../../class';
import { LegacyWallet, LightningCustodianWallet, SegwitBech32Wallet, SegwitP2SHWallet, WatchOnlyWallet } from '../../class';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
let loc = require('../../loc');
@ -96,7 +96,7 @@ export default class WalletExport extends Component {
/>
<BlueSpacing20 />
{this.state.wallet.type === LightningCustodianWallet.type ? (
{this.state.wallet.type === LightningCustodianWallet.type || this.state.wallet.type === WatchOnlyWallet.type ? (
<BlueCopyTextToClipboard text={this.state.wallet.getSecret()} />
) : (
<BlueText style={{ alignItems: 'center', paddingHorizontal: 16, fontSize: 16, color: '#0C2550', lineHeight: 24 }}>

2
screen/wallets/selectWallet.js

@ -21,7 +21,7 @@ const SelectWallet = () => {
useEffect(() => {
setIsLoading(false);
});
}, []);
const renderItem = ({ item }) => {
return (

Loading…
Cancel
Save