def METHOD_NAME(self, invoice_id: int, tx_hash: Optional[bytes]=None) -> None:
    with self._account.get_wallet().get_invoice_table() as table:
        # Block waiting for the write to succeed here.
        with SynchronousWriter() as writer:
            table.update_transaction([ (tx_hash, invoice_id) ],
                completion_callback=writer.get_callback())
            assert writer.succeeded()