| 265 | | tid = self.makeSerial() |
| 266 | | response = self.requestTransfer(transport,tid,None,data,paycoins) |
| 267 | | coins = currency['coins'] |
| 268 | | for coin in paycoins: |
| 269 | | coins.pop(coins.index(coin)) |
| 270 | | coins.extend(self.unblindWithSignatures(secrets,response.signatures)) |
| 271 | | self.storage.save() |
| | 265 | if secrets: |
| | 266 | tid = self.makeSerial() |
| | 267 | response = self.requestTransfer(transport,tid,None,data,paycoins) |
| | 268 | coins = currency['coins'] |
| | 269 | for coin in paycoins: |
| | 270 | coins.pop(coins.index(coin)) |
| | 271 | coins.extend(self.unblindWithSignatures(secrets,response.signatures)) |
| | 272 | self.storage.save() |
| 282 | | paycoins = [] |
| 283 | | for value in pay: |
| 284 | | for coin in oldcoins: |
| 285 | | if int(coin.denomination) == value: |
| 286 | | paycoins.append(oldcoins.pop(oldcoins.index(coin))) |
| 287 | | break |
| 288 | | |
| 289 | | secrets,data = self.prepareBlanks(transport,cdd,blank) |
| 290 | | return paycoins,secrets,data |
| | 283 | if blank: |
| | 284 | paycoins = [] |
| | 285 | for value in pay: |
| | 286 | for coin in oldcoins: |
| | 287 | if int(coin.denomination) == value: |
| | 288 | paycoins.append(oldcoins.pop(oldcoins.index(coin))) |
| | 289 | break |
| | 290 | |
| | 291 | secrets,data = self.prepareBlanks(transport,cdd,blank) |
| | 292 | return paycoins,secrets,data |
| | 293 | else: |
| | 294 | return [],[],[] |