Skip to content
Snippets Groups Projects

Draft: initial user flow for creating a wallet

Merged Janssen, D.D. (Dylan, Student M-CS) requested to merge 2-implement_all_user_flows into main
2 files
+ 5
6
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
6
@@ -43,10 +43,8 @@ def start(update: Update, context: CallbackContext):
else:
update.effective_message.reply_text("You cannot join a wallet twice")
# TODO. when the last one is added send mnemonics to users
user.set_state(1)
# TODO: clear variables
user.set_variable({})
reply_msg, reply_markup = generate_message(1)
update.effective_message.reply_text(reply_msg, reply_markup=reply_markup)
@@ -90,8 +88,8 @@ def choose_wallet(update: Update, context: CallbackContext):
def wallet_options(update: Update, context: CallbackContext, user: AppUser):
query = update.callback_query.data
print("We are in the wallet options: " + query)
wallet_name = update.callback_query.data
user.set_variable("wallet_name", wallet_name)
next_state = user.next_state()
reply_msg, reply_markup = generate_message(next_state)
update.effective_message.reply_text(reply_msg, reply_markup=reply_markup)
@@ -146,7 +144,7 @@ def name_wallet(update: Update, context: CallbackContext, user: AppUser):
for request in wallet_requests:
update.effective_message.reply_text("Hi, please join this wallet as co-signer.\n"
"Wallet name= {}\n"
"https://t.me/BitcoinLibTestbot&start={}".format(variables['wallet_name'], request["token"]))
"https://t.me/BitcoinLibTestbot?start={}".format(variables['wallet_name'], request["token"]))
next_state = user.next_state()
reply_msg, reply_markup = generate_message(next_state)
Loading