diff --git a/BlueComponents.js b/BlueComponents.js
index fd3abf75..54114d75 100644
--- a/BlueComponents.js
+++ b/BlueComponents.js
@@ -178,7 +178,14 @@ export const BlueNavigationStyle = (navigation, withNavigationCloseButton = fals
headerRight: withNavigationCloseButton ? (
navigation.goBack(null) : customCloseButtonFunction}
+ onPress={
+ customCloseButtonFunction === undefined
+ ? () => {
+ Keyboard.dismiss();
+ navigation.goBack(null);
+ }
+ : customCloseButtonFunction
+ }
>
@@ -1629,6 +1636,7 @@ export class BlueAddressInput extends Component {
{
+ Keyboard.dismiss();
ImagePicker.showImagePicker(
{
title: null,
diff --git a/class/lightning-custodian-wallet.js b/class/lightning-custodian-wallet.js
index 079f30b1..020486ed 100644
--- a/class/lightning-custodian-wallet.js
+++ b/class/lightning-custodian-wallet.js
@@ -49,13 +49,11 @@ export class LightningCustodianWallet extends LegacyWallet {
}
timeToRefreshBalance() {
- // only manual refresh for now
- return false;
+ return (+new Date() - this._lastBalanceFetch) / 1000 > 3600; // 1hr
}
timeToRefreshTransaction() {
- // only manual refresh for now
- return false;
+ return (+new Date() - this._lastTxFetch) / 1000 > 3600; // 1hr
}
static fromJson(param) {
@@ -434,6 +432,7 @@ export class LightningCustodianWallet extends LegacyWallet {
throw new Error('API unexpected response: ' + JSON.stringify(response.body));
}
+ this._lastTxFetch = +new Date();
this.transactions_raw = json;
}
diff --git a/screen/lnd/scanLndInvoice.js b/screen/lnd/scanLndInvoice.js
index 0df2c3ff..26d6b234 100644
--- a/screen/lnd/scanLndInvoice.js
+++ b/screen/lnd/scanLndInvoice.js
@@ -110,6 +110,7 @@ export default class ScanLndInvoice extends React.Component {
isLoading: false,
});
} catch (Err) {
+ Keyboard.dismiss();
this.setState({ isLoading: false });
alert(Err.message);
}
diff --git a/screen/send/details.js b/screen/send/details.js
index 45b9e47b..7c5dcb0d 100644
--- a/screen/send/details.js
+++ b/screen/send/details.js
@@ -284,6 +284,7 @@ export default class SendDetails extends Component {
}
async createTransaction() {
+ Keyboard.dismiss();
this.setState({ isLoading: true });
let error = false;
let requestedSatPerByte = this.state.fee.toString().replace(/\D/g, '');