Changeset 321 for trunk

Show
Ignore:
Timestamp:
05/31/09 13:13:02 (3 years ago)
Author:
ocjhb
Message:

coin transfer working again

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/sandbox/jhb/mobile/ocwallet.py

    r320 r321  
    387387        bt.send(self.wallet.listenSum(bt.receive())) 
    388388        self.feedback(u'Receive coins: receiving...') 
    389         bt.send(self.wallet.listenSpend(bt.receive(),transport)) 
     389        bt.send(self.wallet.listenSpend(transport,bt.receive())) 
    390390        import e32 
    391391        e32.ao_sleep(1)     
     
    555555#Try to use a password on the data file. Repeat till its sucessfully loaded 
    556556password = '' 
     557wbpath = storagepath+'wallet.bin' 
     558 
    557559while 0: #don't use the password protected storage, too slow atm. 
    558560    password = appuifw.query(u'password','text') 
     
    563565    storage = oc2storage.CryptedStorage() 
    564566    storage.setPassword(password) 
    565     storage.setFilename(storagepath+'wallet.bin') 
     567    storage.setFilename(wbpath) 
    566568    try: 
    567569        storage.restore() 
     
    571573        pass 
    572574storage = oc2storage.Storage() 
    573 storage.setFilename(storagepath+'wallet.bin') 
    574 tmp = open(storagepath+'wallet.bin') 
    575 tmpcontent = tmp.read() 
    576 tmp.close() 
    577 if tmpcontent.startswith('salt'): 
    578     os.remove(storagepath+'wallet.bin') 
     575storage.setFilename(wbpath) 
     576if os.path.exists(wbpath): 
     577    tmp = open(wbpath) 
     578    tmpcontent = tmp.read() 
     579    tmp.close() 
     580    if tmpcontent.startswith('salt'): 
     581        os.remove(wbpath) 
    579582storage.restore()     
    580583