Skip to content

Commit

Permalink
fix(live-12813): remove the swap webview conditional for demo0 (#7022)
Browse files Browse the repository at this point in the history
* fix: rm conditionanl webview display

chore: add changeset

* fix: demo 1 enable check
  • Loading branch information
liviuciulinaru committed Jun 6, 2024
1 parent 7e3f604 commit 1953578
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-houses-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

remove the swap webview conditional for demo0
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ const SwapWebView = ({
const locale = useSelector(languageSelector);
const redirectToHistory = useRedirectToSwapHistory();
const enablePlatformDevTools = useSelector(enablePlatformDevToolsSelector);

const manifestID = useSwapLiveAppManifestID();
const isDemo1Enabled = manifestID?.startsWith(SwapWebManifestIDs.Demo1);
const hasSwapState = !!swapState;
const customPTXHandlers = usePTXCustomHandlers(manifest);

Expand Down Expand Up @@ -261,10 +262,12 @@ const SwapWebView = ({

// Keep the previous UI
// Display only the disabled swap button

if (
swapState.error ||
swapState.fromAmount === "0" ||
!(fromCurrency && addressFrom && toCurrency && addressTo)
isDemo1Enabled &&
(swapState.error ||
swapState.fromAmount === "0" ||
!(fromCurrency && addressFrom && toCurrency && addressTo))
) {
return (
<Box width="100%">
Expand Down

0 comments on commit 1953578

Please sign in to comment.