This commit is contained in:
Overtorment 2019-01-01 00:09:10 +00:00
parent 8633bc2638
commit e4cc953c6d
4 changed files with 4 additions and 9 deletions

View file

@ -128,6 +128,8 @@ const CreateTransactionStackNavigator = createStackNavigator({
Success: {
screen: Success,
},
// Select Wallet. Mostly for deep-linking
SelectWallet: {
screen: SelectWallet,
},
@ -261,7 +263,6 @@ const MainBottomTabs = createStackNavigator(
header: null,
},
},
// Select Wallet. Mostly for deep-linking
},
{
mode: 'modal',

View file

@ -28,14 +28,12 @@ async function getPreferredCurrency() {
async function updateExchangeRate() {
if (+new Date() - exchangeRates[STRUCT.LAST_UPDATED] <= 30 * 60 * 1000) {
// not updating too often
console.log('not updating too often');
return;
}
try {
preferredFiatCurrency = JSON.parse(await AsyncStorage.getItem(AppStorage.PREFERRED_CURRENCY));
} catch (_) {
console.log('error :-( default will be used');
}
preferredFiatCurrency = preferredFiatCurrency || FiatUnit.USD;
@ -63,7 +61,6 @@ async function updateExchangeRate() {
let interval = false;
async function startUpdater() {
if (interval) {
console.log('clear interval');
clearInterval(interval);
exchangeRates[STRUCT.LAST_UPDATED] = 0;
}

View file

@ -4,7 +4,6 @@ import { BlueNavigationStyle, BlueButton } from '../../BlueComponents';
import PropTypes from 'prop-types';
import { BitcoinUnit } from '../../models/bitcoinUnits';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
/** @type {AppStorage} */
let EV = require('../../events');
let loc = require('../../loc');
@ -128,7 +127,7 @@ export default class LNDCreateInvoice extends Component {
>
<TextInput
onChangeText={text => this.setState({ memo: text })}
placeholder={loc.send.details.note_placeholder}
placeholder={'invoice description'}
value={this.state.memo}
numberOfLines={1}
style={{ flex: 1, marginHorizontal: 8, minHeight: 33 }}

View file

@ -47,9 +47,7 @@ export default class LNDViewInvoice extends Component {
if (updatedUserInvoice.ispaid) {
// we fetched the invoice, and it is paid :-)
this.setState({ isFetchingInvoices: false });
console.log('isFetchingInvoices set to false');
ReactNativeHapticFeedback.trigger('notificationSuccess', false);
console.log('clear interval');
clearInterval(this.fetchInvoiceInterval);
this.fetchInvoiceInterval = undefined;
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED);
@ -72,7 +70,7 @@ export default class LNDViewInvoice extends Component {
this.props.navigation.dismiss();
}
}
}, 5000);
}, 3000);
}
componentWillUnmount() {