src/apps/wallets/wallet.py
def owns(self, tx_out, bip32_derivations, script=None):
        """
        Checks that psbt scope belongs to the wallet.
        """
        # quick check for the scriptpubkey type
        if tx_out.script_pubkey.script_type() != self.descriptor.scriptpubkey_type():
            return False
        # quick check of the script length
        if script and (len(script.data) != self.descriptor.script_len):
            return False
        derivation = self.get_derivation(bip32_derivations)

        # derivation not found
        if derivation is None:
            return False
        # check that script_pubkey matches
        sc, _ = self.script_pubkey(derivation)
        return sc == tx_out.script_pubkey

        Checks that psbt scope belongs to the wallet.
        
Checks that psbt scope belongs to the wallet.
Checks that psbt scope belongs to the wallet .
def owns(self, tx_out, bip32_derivations, script=None):
        if tx_out.script_pubkey.script_type() != self.descriptor.scriptpubkey_type():
            return False
        if script and (len(script.data) != self.descriptor.script_len):
            return False
        derivation = self.get_derivation(bip32_derivations)
        if derivation is None:
            return False
        sc, _ = self.script_pubkey(derivation)
        return sc == tx_out.script_pubkey
def owns ( self , tx_out , bip32_derivations , script = None ) : if tx_out . script_pubkey . script_type ( ) != self . descriptor . scriptpubkey_type ( ) : return False if script and ( len ( script . data ) != self . descriptor . script_len ) : return False derivation = self . get_derivation ( bip32_derivations ) if derivation is None : return False sc , _ = self . script_pubkey ( derivation ) return sc == tx_out . script_pubkey
Checks that psbt scope belongs to the wallet.
Checks that psbt scope belongs to the wallet .
"""
        Checks that psbt scope belongs to the wallet.
        """ # quick check for the scriptpubkey type # quick check of the script length # derivation not found # check that script_pubkey matches
self
tx_out
bip32_derivations
script