Update old_wallet.py

add sanity check