move hook to wallet.py