Lotto: refactor cli and to transfer lotto_db to lotto_wallet