mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Wallet selection
This commit is contained in:
parent
397c153a3b
commit
ffd4b82832
@ -44,6 +44,7 @@ export default class ManageFunds extends Component {
|
||||
memo: loc.lnd.refill_lnd_balance,
|
||||
fromSecret: wallet.getSecret(),
|
||||
address: toAddress,
|
||||
fromWallet: wallet,
|
||||
});
|
||||
}, 100);
|
||||
} else {
|
||||
|
@ -60,6 +60,7 @@ export default class SendDetails extends Component {
|
||||
let fromSecret;
|
||||
if (props.navigation.state.params) fromSecret = props.navigation.state.params.fromSecret;
|
||||
let fromWallet = null;
|
||||
if (props.navigation.state.params) fromWallet = props.navigation.state.params.fromWallet;
|
||||
|
||||
const wallets = BlueApp.getWallets().filter(wallet => wallet.type !== LightningCustodianWallet.type);
|
||||
|
||||
@ -72,18 +73,6 @@ export default class SendDetails extends Component {
|
||||
fromAddress = fromWallet.getAddress();
|
||||
fromSecret = fromWallet.getSecret();
|
||||
}
|
||||
if (fromWallet === null) return props.navigation.goBack(null);
|
||||
for (let w of wallets) {
|
||||
if (w.getSecret() === fromSecret) {
|
||||
fromWallet = w;
|
||||
break;
|
||||
}
|
||||
|
||||
if (w.getAddress() === fromAddress) {
|
||||
fromWallet = w;
|
||||
}
|
||||
}
|
||||
|
||||
this.state = {
|
||||
isFeeSelectionModalVisible: false,
|
||||
fromAddress,
|
||||
@ -703,6 +692,7 @@ SendDetails.propTypes = {
|
||||
fromAddress: PropTypes.string,
|
||||
satoshiPerByte: PropTypes.string,
|
||||
fromSecret: PropTypes.fromSecret,
|
||||
fromWallet: PropTypes.fromWallet,
|
||||
memo: PropTypes.string,
|
||||
uri: PropTypes.string,
|
||||
}),
|
||||
|
@ -486,7 +486,11 @@ export default class WalletTransactions extends Component {
|
||||
if (this.state.wallet.type === LightningCustodianWallet.type) {
|
||||
navigate('ScanLndInvoice', { fromSecret: this.state.wallet.getSecret() });
|
||||
} else {
|
||||
navigate('SendDetails', { fromAddress: this.state.wallet.getAddress(), fromSecret: this.state.wallet.getSecret() });
|
||||
navigate('SendDetails', {
|
||||
fromAddress: this.state.wallet.getAddress(),
|
||||
fromSecret: this.state.wallet.getSecret(),
|
||||
fromWallet: this.state.wallet,
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user