-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: support CAL test pub key (#8349)
* fix: fix support CALL moonpay sell * refactor: remove providerDataCache in sell * test: fix test * fix: support CAL test in sell * fix: fix set MOCK_EXCHANGE_TEST_CONFIG * refactor: remove extra id * refactor: remove extra change * fix: remove extra id * refactor: remove extra change * chore: remove debugger * chore: remove extra comment * fix: add MOCK_EXCHANGE_TEST_PARTNER env variable * chore: improve CODEOWNER * fix: fix test * chore: remove console.log * chore: remove redundant git owner * refactor: move env variables and improve tests * chore: remove console.log * fix: fix logic * chore: remove extra export * Update apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/ExchangeTestPartnerMode.tsx Co-authored-by: Kevin Le Seigle <[email protected]> * Update apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/ExchangeTestPartnerMode.tsx Co-authored-by: Kevin Le Seigle <[email protected]> * chore: fix lint --------- Co-authored-by: Kevin Le Seigle <[email protected]>
- Loading branch information
Showing
13 changed files
with
180 additions
and
78 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
31 changes: 31 additions & 0 deletions
31
...live-desktop/src/renderer/screens/settings/sections/Developer/ExchangeTestPartnerMode.tsx
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,31 @@ | ||
import React, { useState } from "react"; | ||
import { setEnv, getEnv } from "@ledgerhq/live-env"; | ||
import Switch from "~/renderer/components/Switch"; | ||
import Box from "~/renderer/components/Box"; | ||
import { useTranslation } from "react-i18next"; | ||
import { SettingsSectionRow } from "../../SettingsSection"; | ||
|
||
const ExchangeTestPartnerMode = () => { | ||
const { t } = useTranslation(); | ||
const [enableExchangeTestPartnerMode, setEnableExchangeDevMode] = useState<boolean>( | ||
getEnv("MOCK_EXCHANGE_TEST_PARTNER"), | ||
); | ||
|
||
const handleChangeSwitch = () => { | ||
setEnableExchangeDevMode(!enableExchangeTestPartnerMode); | ||
setEnv("MOCK_EXCHANGE_TEST_PARTNER", !enableExchangeTestPartnerMode); | ||
}; | ||
|
||
return ( | ||
<SettingsSectionRow | ||
title={t("settings.developer.exchangeTestPartnerMode.title")} | ||
desc={t("settings.developer.exchangeTestPartnerMode.desc")} | ||
> | ||
<Box grow horizontal flow={2} alignItems="center"> | ||
<Switch isChecked={enableExchangeTestPartnerMode} onChange={handleChangeSwitch} /> | ||
</Box> | ||
</SettingsSectionRow> | ||
); | ||
}; | ||
|
||
export default ExchangeTestPartnerMode; |
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
Oops, something went wrong.