Update App.js

This commit is contained in:
Marcos Rodriguez 2019-09-17 13:27:09 -04:00
parent c86bd12eb0
commit 5c437c138b

6
App.js
View File

@ -51,7 +51,11 @@ export default class App extends React.Component {
const isAddressFromStoredWallet = BlueApp.getWallets().some(wallet =>
wallet.chain === Chain.ONCHAIN ? wallet.weOwnAddress(clipboard) : wallet.isInvoiceGeneratedByWallet(clipboard),
);
if (this.state.clipboardContent !== clipboard && (this.isBitcoinAddress(clipboard) || this.isLightningInvoice(clipboard) || this.isLnUrl(clipboard))) {
if (
!isAddressFromStoredWallet &&
this.state.clipboardContent !== clipboard &&
(this.isBitcoinAddress(clipboard) || this.isLightningInvoice(clipboard) || this.isLnUrl(clipboard))
) {
this.setState({ isClipboardContentModalVisible: true });
}
this.setState({ clipboardContent: clipboard });