-
Notifications
You must be signed in to change notification settings - Fork 66
Add currency conversion setting #249
base: master
Are you sure you want to change the base?
Conversation
EddWills95
commented
Nov 1, 2020
•
edited
Loading
edited
- Adds a currency selector for conversion and the logic to make the call to the manager in order to fetch the correct price
- Currently supports: "USD", "EUR", "GBP" (but could obviously any)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the whole code, "Currency"or "Fiat Currency" sounds better to me than "Conversion Currency".
I also would not use the window local storage to store this user preference, but the user file. See this. I'm working on a commit to do that.
Co-authored-by: Lounès Ksouri <[email protected]>
9b9a611
to
d35a055
Compare
Co-authored-by: Lounès Ksouri <[email protected]>
…s95/umbrel-dashboard into add-price-symbol-setting
Just created 3 PRs relating to user settings : getumbrel/umbrel#302, getumbrel/umbrel-manager#58, #250. Can you try use this code to set your |
I think it makes sense to hang tight for this PR: #250 |
Fixed some issues
src/helpers/api.js
Outdated
@@ -93,7 +93,8 @@ const API = { | |||
|
|||
const requestOptions = { | |||
method: "get", | |||
url | |||
url, | |||
params: data.params || {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this used for? I don't see where data
is passed in to API.get(url, data)
anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He added it to specify currency for the price route, but finally he chose to use query parameters instead of a data body. We should just discard these changes now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
Also @lukechilds, we have a little issue we could not yet figure out how to solve. On the page load or reload, it seems that the I think it comes from the umbrel-dashboard/src/layouts/DashboardLayout.vue Lines 203 to 214 in e48061a
Maybe I'm wrong... For the time being, I've set a return in case the currency is not defined: umbrel-dashboard/src/store/modules/bitcoin.js Lines 387 to 388 in e48061a
But honestly I don't think it's the good solution (and it doesn't really solve the problem haha). What do you think? |
change settings POST route Co-authored-by: Lounès Ksouri <[email protected]>