Browse Source

WIP: lnd tx list refreshed upon sucessfull payInvoice

localNotifications
Overtorment 6 years ago
parent
commit
a35008758d
  1. 2
      screen/lnd/scanLndInvoice.js
  2. 2
      screen/wallets/list.js

2
screen/lnd/scanLndInvoice.js

@ -15,6 +15,7 @@ import {
/** @type {AppStorage} */ /** @type {AppStorage} */
let BlueApp = require('../../BlueApp'); let BlueApp = require('../../BlueApp');
let currency = require('../../currency'); let currency = require('../../currency');
let EV = require('../../events');
const { width } = Dimensions.get('window'); const { width } = Dimensions.get('window');
export default class ScanLndInvoice extends React.Component { export default class ScanLndInvoice extends React.Component {
@ -129,6 +130,7 @@ export default class ScanLndInvoice extends React.Component {
} }
console.log('payInvoice took', (end - start) / 1000, 'sec'); console.log('payInvoice took', (end - start) / 1000, 'sec');
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED);
alert('Success'); alert('Success');
this.props.navigation.goBack(); this.props.navigation.goBack();

2
screen/wallets/list.js

@ -63,6 +63,7 @@ export default class WalletsList extends Component {
isLoading: true, isLoading: true,
}; };
EV(EV.enum.WALLETS_COUNT_CHANGED, this.refreshFunction.bind(this)); EV(EV.enum.WALLETS_COUNT_CHANGED, this.refreshFunction.bind(this));
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED, this.refreshTransactions.bind(this));
} }
async componentDidMount() { async componentDidMount() {
@ -173,7 +174,6 @@ export default class WalletsList extends Component {
showManageFundsBigButton: false, showManageFundsBigButton: false,
showManageFundsSmallButton: false, showManageFundsSmallButton: false,
showSendButton: false, showSendButton: false,
// TODO: погуглить че это за ебала ds.cloneWithRows, можно ли быстрее сделать прогрузку транзакций на экран
dataSource: BlueApp.getTransactions(index), dataSource: BlueApp.getTransactions(index),
}); });

Loading…
Cancel
Save