Skip to content

Commit

Permalink
🚩(lld): remove objkt ff
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey committed Oct 17, 2024
1 parent 917c122 commit 76b5ab2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 80 deletions.
7 changes: 7 additions & 0 deletions .changeset/lovely-paws-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ledgerhq/types-live": patch
"ledger-live-desktop": patch
"@ledgerhq/live-common": patch
---

Remove LLD objkt feature flag because we don't support the webview anymore
Original file line number Diff line number Diff line change
@@ -1,73 +1,15 @@
import React, { useCallback } from "react";
import React from "react";
import Delegation from "../Delegation";
import Box from "~/renderer/components/Box";
import Card from "~/renderer/components/Box/Card";
import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import Text from "~/renderer/components/Text";
import styled from "styled-components";
import { SubAccount } from "@ledgerhq/types-live";
import Label from "~/renderer/components/Label";
import Button from "~/renderer/components/ButtonV3";
import { FeatureToggle } from "@ledgerhq/live-common/featureFlags/index";
import { TezosAccount } from "@ledgerhq/live-common/families/tezos/types";

type Props = {
account: TezosAccount | SubAccount;
parentAccount: TezosAccount | undefined | null;
};
const Wrapper = styled(Box).attrs(() => ({
p: 4,
}))`
border-radius: 4px;
justify-content: space-between;
align-items: center;
`;
const TableContainer = styled(Card)`
border-radius: 4px;
overflow: hidden;
`;
const AccountBodyHeader = ({ account, parentAccount }: Props) => {
const history = useHistory();
const { t } = useTranslation();
const onNFTClick = useCallback(() => {
const pathname = `/platform/objkt`;
history.push({
pathname,
state: {
accountId: account.id,
},
});
}, [history, account.id]);
return (
<>
<FeatureToggle featureId="objkt">
<TableContainer mb={6}>
<Wrapper horizontal>
<Box
style={{
maxWidth: "65%",
}}
>
<Text ff="Inter|Bold" color="palette.text.shade100" fontSize={4}>
{t("tezos.objkt.card.title")}
</Text>
<Box mt={2}>
<Label fontSize={4}>{t("tezos.objkt.card.description")}</Label>
</Box>
</Box>
<Box>
<Button variant="color" onClick={onNFTClick}>
<Box horizontal flow={1} alignItems="center">
<Box>{t("tezos.objkt.card.cta")}</Box>
</Box>
</Button>
</Box>
</Wrapper>
</TableContainer>
</FeatureToggle>
<Delegation account={account} parentAccount={parentAccount} />
</>
);
};

const AccountBodyHeader = ({ account, parentAccount }: Props) => (
<Delegation account={account} parentAccount={parentAccount} />
);

export default AccountBodyHeader;
17 changes: 4 additions & 13 deletions apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2256,10 +2256,10 @@
}
},
"memoTag": {
"title": "Need a Tag/Memo?",
"description": "You might need a <0>Tag/Memo</0> for receiving this asset from an exchange. You can use any combination of numbers like 1234.",
"learnMore": "Learn more about Tag/Memo"
}
"title": "Need a Tag/Memo?",
"description": "You might need a <0>Tag/Memo</0> for receiving this asset from an exchange. You can use any combination of numbers like 1234.",
"learnMore": "Learn more about Tag/Memo"
}
},
"send": {
"title": "Send",
Expand Down Expand Up @@ -2778,15 +2778,6 @@
}
}
},
"tezos": {
"objkt": {
"card": {
"title": "NFT (Non Fungible Tokens) collection",
"description": "You can see you Tezos NFTs directly through Objkt inside Ledger Live.",
"cta": "See my NFTs on Objkt"
}
}
},
"bitcoin": {
"inputSelected": "SELECTED",
"toSpend": "Coins to spend",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const DEFAULT_FEATURES: Features = {
...CURRENCY_DEFAULT_FEATURES,

brazeLearn: DEFAULT_FEATURE,
objkt: DEFAULT_FEATURE,
portfolioExchangeBanner: DEFAULT_FEATURE,
postOnboardingAssetsTransfer: DEFAULT_FEATURE,
counterValue: DEFAULT_FEATURE,
Expand Down
2 changes: 0 additions & 2 deletions libs/ledgerjs/packages/types-live/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export type Features = CurrencyFeatures & {
swapWalletApiPartnerList: Feature_SwapWalletApiPartnerList;
stakePrograms: Feature_StakePrograms;
portfolioExchangeBanner: Feature_PortfolioExchangeBanner;
objkt: Feature_Objkt;
editEvmTx: Feature_EditEvmTx;
stakeAccountBanner: Feature_StakeAccountBanner;
newsfeedPage: Feature_NewsfeedPage;
Expand Down Expand Up @@ -535,7 +534,6 @@ export type Feature_PostOnboardingAssetsTransfer = DefaultFeature;
export type Feature_PtxServiceCtaExchangeDrawer = DefaultFeature;
export type Feature_PtxServiceCtaScreens = DefaultFeature;
export type Feature_PortfolioExchangeBanner = DefaultFeature;
export type Feature_Objkt = DefaultFeature;
export type Feature_BrazeLearn = DefaultFeature;
export type Feature_PtxSwapMoonpayProvider = DefaultFeature;
export type Feature_PtxSwapExodusProvider = DefaultFeature;
Expand Down

0 comments on commit 76b5ab2

Please sign in to comment.