Skip to content
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

fix(live-12813): remove the swap webview conditional for demo0 #7022

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading