From a35008758da91a2ea29248012cc8154a52560cbe Mon Sep 17 00:00:00 2001 From: Overtorment Date: Wed, 3 Oct 2018 01:36:00 +0100 Subject: [PATCH] WIP: lnd tx list refreshed upon sucessfull payInvoice --- screen/lnd/scanLndInvoice.js | 2 ++ screen/wallets/list.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/screen/lnd/scanLndInvoice.js b/screen/lnd/scanLndInvoice.js index 5753e599..90804f7e 100644 --- a/screen/lnd/scanLndInvoice.js +++ b/screen/lnd/scanLndInvoice.js @@ -15,6 +15,7 @@ import { /** @type {AppStorage} */ let BlueApp = require('../../BlueApp'); let currency = require('../../currency'); +let EV = require('../../events'); const { width } = Dimensions.get('window'); 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'); + EV(EV.enum.TRANSACTIONS_COUNT_CHANGED); alert('Success'); this.props.navigation.goBack(); diff --git a/screen/wallets/list.js b/screen/wallets/list.js index 945e29c5..297f09ee 100644 --- a/screen/wallets/list.js +++ b/screen/wallets/list.js @@ -63,6 +63,7 @@ export default class WalletsList extends Component { isLoading: true, }; EV(EV.enum.WALLETS_COUNT_CHANGED, this.refreshFunction.bind(this)); + EV(EV.enum.TRANSACTIONS_COUNT_CHANGED, this.refreshTransactions.bind(this)); } async componentDidMount() { @@ -173,7 +174,6 @@ export default class WalletsList extends Component { showManageFundsBigButton: false, showManageFundsSmallButton: false, showSendButton: false, - // TODO: погуглить че это за ебала ds.cloneWithRows, можно ли быстрее сделать прогрузку транзакций на экран dataSource: BlueApp.getTransactions(index), });