Exemple #1
0
 def func(_):
     order_info = dict()
     order_info[self.order_id] = wallet.chain_broker.buyer.query_order(
         self.order_id)
     app.unlock()
     if self.order_type == 'file':
         wallet.chain_broker.seller_send_request(order_info)
     else:
         wallet.chain_broker.seller_send_request_stream(order_info)
Exemple #2
0
 def get_proxy_address(proxy_addr):
     msg_hash = self.market_hash
     file_title = self.name
     proxy = proxy_addr
     seller = self.owner_address
     app.unlock()
     wallet.chain_broker.handler.buy_product(msg_hash, file_title,
                                             proxy, seller,
                                             float(self.price.value))
Exemple #3
0
        def exec_():
            app.unlock()
            logger.debug('Buyer Confirm Order: %s', str(order_id))

            def func2(_):
                logger.debug('Buyer Confirmed')
                app.event.emit(app.events.BUYER_CONFIRM, order_id)

            deferToThread(wallet.chain_broker.buyer.confirm_order,
                          order_id).addCallbacks(func2)
Exemple #4
0
    def handle_confirm(self):
        def get_proxy_address(proxy_addr):
            msg_hash = self.market_hash
            file_title = self.name
            proxy = proxy_addr
            seller = self.owner_address
            app.unlock()
            wallet.chain_broker.handler.buy_product(msg_hash, file_title,
                                                    proxy, seller,
                                                    int(self.price.value))

        if not self.password.value:
            app.msgbox.warning("Please input password")
            return
        if app.valid_password(self.password.value):
            app.unlock()
            get_proxy_address(self.proxy.current)
            app.event.emit(app.events.CLICK_PAY)
            self.close()
        else:
            app.msgbox.error("Password mismatch")
Exemple #5
0
 def unlock():
     app.unlock()
Exemple #6
0
 def _deliver(self):
     app.unlock()
     wallet.chain_broker.seller.confirm_order(self.order_id)