Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit HERVIER committed Apr 12, 2013
1 parent c6e45d9 commit fc8e380
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion bitpurse/address.py
Expand Up @@ -73,7 +73,7 @@ def __init__(self, jsondict={}):
for tx in jsondict['txs']:
if (tx['timestamp']
+ (60 * 60 * 24 * 7)
> time.time()) and (tx['confirmations'] >= 1):
> time.time()) and (tx['confirmations'] >= 1):

self.transactions.append(TransactionHist(
tx['hash'],
Expand Down
14 changes: 4 additions & 10 deletions bitpurse/wallet.py
Expand Up @@ -13,22 +13,17 @@
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.

from PySide.QtCore import Slot, QObject, \
Signal, Property, QTimer
from PySide.QtGui import QApplication, QClipboard
import urllib2
from PySide.QtCore import Slot
from PySide.QtGui import QApplication
import json
from PBKDF2 import PBKDF2
from Crypto.Cipher import AES
import threading
import os.path

from address import AddressesModel, Address, TransactionHist, TransactionsModel
from transaction import Transaction, TransactionSubmitted
from address import Address, TransactionHist
from settings import Settings
import decimal

from utils import prettyPBitcoin, unpadding, \
from utils import unpadding, \
getDataFromChainblock, \
padding, getAddrFromPrivateKey, \
EC_KEY, getSecret, \
Expand Down Expand Up @@ -463,4 +458,3 @@ def update(self, passKey):
import traceback
traceback.print_exc()
raise

13 changes: 4 additions & 9 deletions bitpurse/walletcontroller.py
Expand Up @@ -17,25 +17,20 @@
Signal, Property, QTimer
from PySide.QtGui import QApplication, QClipboard
import urllib2
import json
from PBKDF2 import PBKDF2
from Crypto.Cipher import AES
import threading
import os.path

from address import AddressesModel, Address, TransactionHist, TransactionsModel
from address import AddressesModel, TransactionsModel
from transaction import Transaction, TransactionSubmitted
from settings import Settings
import decimal

from utils import prettyPBitcoin, unpadding, \
getDataFromChainblock, \
padding, getAddrFromPrivateKey, \
EC_KEY, getSecret, \
SecretToASecret
from utils import prettyPBitcoin, \
getDataFromChainblock

from wallet import Wallet, DataError, WrongPassword


class WalletController(QObject):
onError = Signal(unicode)
onConnected = Signal(bool)
Expand Down

0 comments on commit fc8e380

Please sign in to comment.