diff --git a/class/lightning-custodian-wallet.js b/class/lightning-custodian-wallet.js index f53cd88b6..07379e04a 100644 --- a/class/lightning-custodian-wallet.js +++ b/class/lightning-custodian-wallet.js @@ -144,7 +144,6 @@ export class LightningCustodianWallet extends LegacyWallet { if (json && json.error) { throw new Error('API error: ' + json.message + ' (code ' + json.code + ')'); } - this.user_invoices_raw = json; return json; @@ -323,6 +322,7 @@ export class LightningCustodianWallet extends LegacyWallet { txs = txs.concat(this.pending_transactions_raw.slice(), this.transactions_raw.slice().reverse(), this.user_invoices_raw.slice()); // slice so array is cloned // transforming to how wallets/list screen expects it for (let tx of txs) { + tx.fromWallet = this.secret; if (tx.amount) { // pending tx tx.amt = tx.amount * -100000000; diff --git a/ios/BlueWallet/Info.plist b/ios/BlueWallet/Info.plist index 29cd42b66..541e3c48a 100644 --- a/ios/BlueWallet/Info.plist +++ b/ios/BlueWallet/Info.plist @@ -33,7 +33,7 @@ CFBundleVersion - 229 + 230 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/screen/wallets/list.js b/screen/wallets/list.js index 507db0038..f21d96da1 100644 --- a/screen/wallets/list.js +++ b/screen/wallets/list.js @@ -19,7 +19,6 @@ import { Icon } from 'react-native-elements'; import { NavigationEvents } from 'react-navigation'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import PropTypes from 'prop-types'; -import { LightningCustodianWallet } from '../../class'; let EV = require('../../events'); let A = require('../../analytics'); /** @type {AppStorage} */ @@ -421,15 +420,17 @@ export default class WalletsList extends Component { rowData.item.type === 'payment_request' || rowData.item.type === 'paid_invoice' ) { - const lightningWallet = this.state.wallets.filter(wallet => wallet.type === LightningCustodianWallet.type); - if (typeof lightningWallet === 'object') { - if (lightningWallet.length === 1) { - this.props.navigation.navigate('LNDViewInvoice', { - invoice: rowData.item, - fromWallet: lightningWallet[0], - }); + const lightningWallet = this.state.wallets.filter(wallet => { + if (typeof wallet === 'object') { + if (wallet.hasOwnProperty('secret')) { + return wallet.getSecret() === rowData.item.fromWallet; + } } - } + }); + this.props.navigation.navigate('LNDViewInvoice', { + invoice: rowData.item, + fromWallet: lightningWallet[0], + }); } }} badge={{