-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hirad/ Account switcher demo total asset change (#5622)
* Account switcher total asset is shown correctly * Changed currency that is shown * fix--api call is put in useEffect now * Made the condition shorter * Removed the redundant parameter in the exchange_rates call * Pulled from master * Pulled from master * Added currency exchange to real account tab of account switcher
- Loading branch information
1 parent
3e5a645
commit 23c6946
Showing
4 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/core/src/Utils/ExchangeCurrencyRate/exchange_currency_rate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import BinarySocket from '_common/base/socket_base'; | ||
|
||
export const getExchangeRate = async (from_currency, to_currency) => { | ||
const { exchange_rates } = await BinarySocket.exchange_rates(from_currency); | ||
|
||
return exchange_rates.rates[to_currency]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './exchange_currency_rate'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23c6946
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.
Successfully deployed to the following URLs:
deriv-app – ./
binary.sx
deriv-app.vercel.app
deriv-app.binary.sx
deriv-app-git-master.binary.sx