dev-ptera/thebananostand

Unable to send from secondary wallet when using ?request=send

gbl08ma opened this issue · 7 comments

Not sure what happened recently-ish but I stopped seeing the accounts for wallets other than my main one when opening The Banano Stand from an external website to make a payment. Only the accounts for the first wallet I have configured are showing up on the modal flow that is triggered by ?request=send, but the wallets are loaded fine if I close the modal.

Thanks for bringing this up! I was able to recreate the issue locally; not sure when this broke but I’ll have a patch out ASAP.

Hey @gbl08ma do you have multiple accounts already pre-loaded on your dashboard when you open the wallet? I thought I was able to recreate the issue but I only had 1 account loaded in the wallet. Here's a gif of what I'm seeing:

dashboard-accounts-loading-in

Secondary wallet (multiple seeds), not account. Previously the dropdown would show me the addresses of all seeds and now it only shows the addresses of the first wallet I have configured. If I close the popup, I can switch to the other wallets fine, so it's not a problem unlocking those wallets.

Secondary wallet (multiple seeds), not account. Previously the dropdown would show me the addresses of all seeds and now it only shows the addresses of the first wallet I have configured. If I close the popup, I can switch to the other wallets fine, so it's not a problem unlocking those wallets.

Hey sorry for the delay on this; revisiting the issue I believe this is how the app always behaved.

Whenever someone with multiple wallets loads the app, only the active wallet (most-recently selected one, set in local storage) & accounts are loaded. I'm not storing any public addresses in local storage, just the indexes of each account per wallet so on load, the dialog only has access to the active wallet's account list as it's fetched.

There's a work-around for this but isn't user-friendly (close dialog, select wallet, refresh the page). I've got two ideas in mind for how to patch this:

-- Change the send/receive/change request via params prompt from a dialog on-load to an action banner. That way, a user can load the app like normal & click the prompt themselves to start the requested action workflow once they've chosen which wallet is active.

-- Add an additional step in the dialog workflow to select wallet, keep the rest of the workflow the same.

I'm leaning forwards the first option since I've never liked how the app is still loading in the background when the dialog opens.

I am absolutely certain that I was able to send from an account on the third wallet I have configured, when opening with ?request=send, and I did that possibly dozens of times without fail. Then one day it stopped working, but it's possible I did not pay attention to the fact I had last selected a different wallet on another tab. I can confirm that if I take care to select the right wallet on one tab before opening the new tab with ?request=send, I can send from the wallet I want. Still, I think it would make sense to allow selecting the wallet to send from within the ?request=send session. I think the simplest way to do that without changing the current flow too much, would be to add a "Use a different wallet" option on this screen (or to outright have two dropdowns there, one for the wallet and another for the account, with the one for the wallet only appearing if the user has multiple wallets configured, to keep things simpler for other users):
image

Sounds like the multiple tabs was what was causing this to happen 👀
To provide the quickest fix I'll just add a wallet select in the flow so it'll look like this:

image

This is added in #121 & should be deployed shortly 👍