예제 #1
0
 def addTxnsForCompletedRequestsInWallet(self, reqs: Iterable,
                                         wallet: Wallet):
     for req in reqs:
         reply, status = self.client.getReply(req.reqId)
         if status == "CONFIRMED":
             # TODO Figure out the actual implementation of
             # TODO     `buildCompletedTxnFromReply`. This is just a stub
             # TODO     implementation
             txn = buildCompletedTxnFromReply(req, reply)
             # TODO Move this logic in wallet
             if txn['txnType'] == ATTRIB and txn['data'] is not None:
                 attr = list(txn['data'].keys())[0]
                 if attr in wallet.attributeEncKeys:
                     key = wallet.attributeEncKeys.pop(attr)
                     txn['secretKey'] = key
             wallet.addCompletedTxn(txn)
예제 #2
0
 def addTxnsForCompletedRequestsInWallet(self, reqs: Iterable, wallet:
 Wallet):
     for req in reqs:
         reply, status = self.client.getReply(req.reqId)
         if status == "CONFIRMED":
             # TODO Figure out the actual implementation of
             # TODO     `buildCompletedTxnFromReply`. This is just a stub
             # TODO     implementation
             txn = buildCompletedTxnFromReply(req, reply)
             # TODO Move this logic in wallet
             if txn['txnType'] == ATTRIB and txn['data'] is not None:
                 attr = list(txn['data'].keys())[0]
                 if attr in wallet.attributeEncKeys:
                     key = wallet.attributeEncKeys.pop(attr)
                     txn['secretKey'] = key
             wallet.addCompletedTxn(txn)