-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Send funds back" feature needs to pass "From" account in the route state #451
Comments
Hi there Where is the 'Send funds back' feature? I can't seem to find it when viewing a transaction from the accounts detail page which is where I would expect to see it. Thanks |
it's in the narrow (mobile) layout when clicking on a Receive type transaction |
Is there a way to up the odds of it being incorrect? All the transactions I tried showed the correct return account. |
by changing active account in the sidebar |
Okay. I see it now.
|
|
I understand what needs to be done. I am trying to understand what would be the best way to achieve it. I mean that the method used to pass the amount and the to address is GET (ie in the link). But the 'Send' page does not support receiving the from address in this way. The 'Send' page uses the from address only when an account is not already selected (Total Balance). If an account is selected it uses that account for the from address. So, the way I see it is, we need to include the from address in the GET request so it can be used on the send page? Otherwise we need another way to know that this is a 'Return Funds' send. |
Sorry. I have just re-read the title and for some or other reason understand it differently now. Not sure why I didn't understand it the first time. I think we are talking about the same thing. We need to add the from address to the URL taking us to the 'Send' page? Is that correct? |
not sure how up-to-date this article is, but route state works something like this: https://netbasal.com/set-state-object-when-navigating-in-angular-7-2-b87c5b977bb it's not something that user can set in the url but it can contain data from a different part of the application |
here's an example in existing nault code
Nault/src/app/components/sweeper/sweeper.component.ts Lines 72 to 75 in b05f849
|
Can we not just add the from to the URL as the to and amount are: Nault/src/app/components/send/send.component.ts Lines 132 to 136 in b05f849
Might make it easier for anyone wanting to create their own links to make payments from a certain account? |
i don't remember what were the reasons for preferring state over query params, i guess it might be undesired to give a third party an ability to override default selection of "from" account if they know one of the addresses in your wallet? it makes sense to support "to" and "amount" for the payment details, but "from" address likely should not be settable via url |
If I were trying to steal funds from people I would be much happier to be able to set the TO address rather than the FROM address. Or am I missing something? |
at the moment there is a very slight chance that the selected FROM account is different so it'd be good to make sure it's the one that the funds were originally sent to
The text was updated successfully, but these errors were encountered: