forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] Nijil / WALL-3488 / Application crashes after trading accounts…
… creation in Trader's Hub (deriv-com#14183) * feat: useAccountList hook * fix: infinite useEffect loop * chore: remove useAccountList hook * chore: handle useEffect infinite loops by removing the useModal() dependancies * chore: update useDerivAccountsList hook * fix: undefined balance caused application crash * chore: remove unused import * feat: select default account * feat: remove unneded condition * feat: missing else * feat: fixed default behavriour * feat: removed unnecesay tests * feat: removed unused imports * chore: remove unwanted imports and variables * fix: types and other fixes * fix: type error * fix: eslint error * fix: memory leak due to useDerivAccountList hook * fix: options listing not updating after adding trading account * fix: apply changes based on comments received * fix: missing item in dependancy array * fix: handle default wallet if there's no USD wallet * chore: cleanup * fix: account creation success modal is not showin in responsive * fix: apply review comments * fix: remove unused type * chore: rename variables for better clarity --------- Co-authored-by: Wojciech Brygola <[email protected]>
- Loading branch information
1 parent
58001e6
commit fea435f
Showing
20 changed files
with
196 additions
and
156 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
/** | ||
* Gets the active `loginid` for the current user from the `localStorage`. | ||
*/ | ||
const getActiveLoginIDFromLocalStorage = (loginIDKey?: string) => { | ||
const active_loginid = localStorage.getItem('active_loginid'); | ||
const active_custom_loginid = loginIDKey ? localStorage.getItem(loginIDKey) : undefined; | ||
|
||
return active_custom_loginid ?? active_loginid ?? undefined; | ||
const getActiveLoginIDFromLocalStorage = (loginid_key = 'active_loginid') => { | ||
const active_custom_loginid = localStorage.getItem(loginid_key); | ||
return active_custom_loginid ?? undefined; | ||
}; | ||
|
||
export default getActiveLoginIDFromLocalStorage; |
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
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
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
Oops, something went wrong.