Browse Source

Merge branch 'master' of github.com:BlueWallet/BlueWallet into blueaddressinput

pulltorefresh
Marcos Rodriguez Vélez 6 years ago
parent
commit
ad987f893f
  1. 2
      android/app/build.gradle
  2. 8
      class/lightning-custodian-wallet.js
  3. 2
      ios/BlueWallet/Info.plist
  4. 2
      package-lock.json
  5. 4
      package.json
  6. 2
      screen/lnd/lndViewInvoice.js
  7. 8
      screen/wallets/transactions.js

2
android/app/build.gradle

@ -102,7 +102,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "3.6.3"
versionName "3.7.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}

8
class/lightning-custodian-wallet.js

@ -49,13 +49,13 @@ export class LightningCustodianWallet extends LegacyWallet {
}
timeToRefreshBalance() {
// lndhub calls are cheap, so why not refresh constantly
return true;
// only manual refresh for now
return false;
}
timeToRefreshTransaction() {
// lndhub calls are cheap, so why not refresh the list constantly
return true;
// only manual refresh for now
return false;
}
static fromJson(param) {

2
ios/BlueWallet/Info.plist

@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.6.3</string>
<string>3.7.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

2
package-lock.json

@ -1,6 +1,6 @@
{
"name": "BlueWallet",
"version": "3.6.0",
"version": "3.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

4
package.json

@ -1,6 +1,6 @@
{
"name": "BlueWallet",
"version": "3.6.0",
"version": "3.7.0",
"devDependencies": {
"babel-eslint": "^10.0.1",
"babel-jest": "^24.0.0",
@ -18,7 +18,7 @@
},
"scripts": {
"prepare": "./patches/fix_mangle.sh; git apply patches/minifier.js.patch; git apply patches/minify.js.patch; git apply patches/transaction_builder.js.patch; git apply ./patches/transaction.js.patch; test -f sentry.sh && ./sentry.sh || true",
"clean": "rm -r -f node_modules/",
"clean": "cd android/; ./gradlew clean; cd ..; rm -r -f /tmp/metro-cache/; rm -r -f node_modules/; npm cache clean --force; npm i; npm start -- --reset-cache",
"start": "node node_modules/react-native/local-cli/cli.js start",
"android": "react-native run-android",
"ios": "react-native run-ios",

2
screen/lnd/lndViewInvoice.js

@ -67,7 +67,7 @@ export default class LNDViewInvoice extends Component {
ReactNativeHapticFeedback.trigger('notificationSuccess', false);
clearInterval(this.fetchInvoiceInterval);
this.fetchInvoiceInterval = undefined;
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED);
EV(EV.enum.REMOTE_TRANSACTIONS_COUNT_CHANGED); // remote because we want to refetch from server tx list and balance
} else {
const currentDate = new Date();
const now = (currentDate.getTime() / 1000) | 0;

8
screen/wallets/transactions.js

@ -146,12 +146,17 @@ export default class WalletTransactions extends Component {
setTimeout(async function() {
// more responsive
let noErr = true;
let smthChanged = false;
try {
/** @type {LegacyWallet} */
let wallet = that.state.wallet;
const oldBalance = wallet.getBalance();
await wallet.fetchBalance();
if (oldBalance !== wallet.getBalance()) smthChanged = true;
let start = +new Date();
const oldTxLen = wallet.getTransactions().length;
await wallet.fetchTransactions();
if (oldTxLen !== wallet.getTransactions().length) smthChanged = true;
if (wallet.fetchPendingTransactions) {
await wallet.fetchPendingTransactions();
}
@ -164,7 +169,8 @@ export default class WalletTransactions extends Component {
noErr = false;
console.warn(err);
}
if (noErr) {
if (noErr && smthChanged) {
console.log('saving to disk');
await BlueApp.saveToDisk(); // caching
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED); // let other components know they should redraw
}

Loading…
Cancel
Save