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

Multiversx rebranding #36

Draft
wants to merge 31 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
be7add7
initial renaming
popenta Sep 25, 2024
d081323
second part of renaming
popenta Sep 26, 2024
f79d41f
more renaming
popenta Sep 27, 2024
4a699ef
rename lld directory
popenta Sep 27, 2024
c6e33dc
fix import statements
popenta Sep 27, 2024
2ebb813
rename env api endpoints
popenta Sep 30, 2024
9d78df0
rename coin module
popenta Sep 30, 2024
2bd6bb3
rename package in ledger live common
popenta Oct 1, 2024
27de651
rename hw app
popenta Oct 1, 2024
e801856
fixes after hw app renaming
popenta Oct 1, 2024
48c06ab
add entry in package.json for hw app
popenta Oct 1, 2024
d7db850
rename llm directory
popenta Oct 1, 2024
abb4847
update dependencies
popenta Oct 2, 2024
8d7dec0
Merge branch 'develop' into multiversx-rebranding
popenta Oct 2, 2024
015a441
Merge branch 'develop' into multiversx-rebranding
popenta Oct 3, 2024
d4e75e5
update to latest core package
popenta Oct 3, 2024
fdba5f6
add axios as dependency
popenta Oct 3, 2024
cb5c05c
add client name for network provider
popenta Oct 3, 2024
49aa79c
update snapshot
popenta Oct 3, 2024
d3ab71f
rename using capital X
popenta Oct 3, 2024
5897e3f
Merge branch 'develop' into multiversx-rebranding
popenta Oct 14, 2024
658826c
revert token id back to elrond
popenta Oct 14, 2024
41287d9
Merge branch 'develop' into multiversx-rebranding
popenta Oct 25, 2024
a4567c6
add pnpm lock
popenta Oct 25, 2024
16e7f42
Merge branch 'develop' into multiversx-rebranding
popenta Dec 6, 2024
5c600ff
fix abandon seed address for currency
popenta Dec 6, 2024
60e1dda
fix explorer url
popenta Dec 6, 2024
907afa5
Merge branch 'develop' into multiversx-rebranding
popenta Dec 6, 2024
b718af2
Merge branch 'develop' into multiversx-rebranding
popenta Dec 18, 2024
67328d8
revert to old currency id
popenta Dec 18, 2024
a33d716
generate changeset
popenta Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .changeset/blue-clocks-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ledgerhq/hw-app-multiversx": patch
"@ledgerhq/coin-multiversx": patch
---

Rebranding from 'Elrond' to 'MultiversX'
1 change: 1 addition & 0 deletions apps/cli/src/live-common-setup-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ setSupportedCurrencies([
"dash",
"tron",
"tezos",
// "multiversx",
"elrond",
"ethereum_classic",
"zcash",
Expand Down
6 changes: 3 additions & 3 deletions apps/ledger-live-desktop/src/config/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const urls = {
algorandStakingRewards: "https://support.ledger.com/article/360015897740-zd",
nearStakingRewards: "https://support.ledger.com/article/360020450619-zd",
polkadotFeesInfo: "https://support.ledger.com/article/360016289919-zd",
elrondStaking: "https://support.ledger.com/article/7228337345693-zd",
multiversxStaking: "https://support.ledger.com/article/7228337345693-zd",
xpubLearnMore: "https://support.ledger.com/article/360011069619-zd",
ledgerValidator: "https://www.ledger.com/staking",
// Banners
Expand Down Expand Up @@ -145,8 +145,8 @@ export const urls = {
cryptoOrg: {
website: "https://cronos-pos.org",
},
elrond: {
website: "https://elrond.com",
multiversx: {
website: "https://multiversx.com",
},
figment: {
website: "https://www.figment.io",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ setSupportedCurrencies([
"dash",
"tron",
"tezos",
// "multiversx",
"elrond",
"ethereum_classic",
"zcash",
Expand Down
30 changes: 0 additions & 30 deletions apps/ledger-live-desktop/src/renderer/families/elrond/modals.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
Balance,
Title,
TitleWrapper,
} from "~/renderer/families/elrond/blocks/Summary";
} from "~/renderer/families/multiversx/blocks/Summary";
import { DelegationType } from "./types";
import { ElrondAccount } from "@ledgerhq/live-common/families/elrond/types";
import { MultiversXAccount } from "@ledgerhq/live-common/families/multiversx/types";
import { SubAccount } from "@ledgerhq/types-live";
import { useAccountUnit } from "~/renderer/hooks/useAccountUnit";

Expand All @@ -26,23 +26,27 @@ interface BalanceType {
amount: BigNumber;
}

const Summary = (props: { account: ElrondAccount }) => {
const Summary = (props: { account: MultiversXAccount }) => {
const { account } = props;
const [balance, setBalance] = useState<BigNumber>(account.spendableBalance);
const [delegationsResources, setDelegationResources] = useState(
account.elrondResources ? account.elrondResources.delegations : [],
account.multiversxResources ? account.multiversxResources.delegations : [],
);
const discreet = useDiscreetMode();
const locale = useSelector(localeSelector);
const unit = useAccountUnit(account);
const fetchDelegations = useCallback(() => {
setBalance(account.spendableBalance);
setDelegationResources(account.elrondResources ? account.elrondResources.delegations : []);
setDelegationResources(
account.multiversxResources ? account.multiversxResources.delegations : [],
);
return () => {
setBalance(account.spendableBalance);
setDelegationResources(account.elrondResources ? account.elrondResources.delegations : []);
setDelegationResources(
account.multiversxResources ? account.multiversxResources.delegations : [],
);
};
}, [account.elrondResources, account.spendableBalance]);
}, [account.multiversxResources, account.spendableBalance]);
const delegations = useMemo(
(): BigNumber =>
delegationsResources.reduce(
Expand Down Expand Up @@ -110,7 +114,7 @@ const Summary = (props: { account: ElrondAccount }) => {
);
};

function AccountBalanceSummaryFooter({ account }: { account: ElrondAccount | SubAccount }) {
function AccountBalanceSummaryFooter({ account }: { account: MultiversXAccount | SubAccount }) {
if (account.type !== "Account") return null;
return <Summary account={account} />;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/multiversx/helpers";
import { useMultiversXRandomizedValidators } from "@ledgerhq/live-common/families/multiversx/react";
import { MultiversXAccount } from "@ledgerhq/live-common/families/multiversx/types";
import { SubAccount } from "@ledgerhq/types-live";
import { useCallback, useMemo } from "react";
import { useDispatch } from "react-redux";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/elrond/helpers";
import { useElrondRandomizedValidators } from "@ledgerhq/live-common/families/elrond/react";
import { openModal } from "~/renderer/actions/modals";
import IconCoins from "~/renderer/icons/Coins";
import { SubAccount } from "@ledgerhq/types-live";
import { ElrondAccount } from "@ledgerhq/live-common/families/elrond/types";
import { useGetStakeLabelLocaleBased } from "~/renderer/hooks/useGetStakeLabelLocaleBased";
import IconCoins from "~/renderer/icons/Coins";

const AccountHeaderManageActions = (props: {
account: ElrondAccount | SubAccount;
parentAccount?: ElrondAccount | null;
account: MultiversXAccount | SubAccount;
parentAccount?: MultiversXAccount | null;
source?: string;
}) => {
const { account, source } = props;
const dispatch = useDispatch();
const label = useGetStakeLabelLocaleBased();
const validators = useElrondRandomizedValidators();
const validators = useMultiversXRandomizedValidators();

const earnRewardEnabled = useMemo(
() => account.type === "Account" && hasMinimumDelegableBalance(account),
[account],
);

const hasDelegations =
account.type === "Account" && account.elrondResources
? account.elrondResources.delegations.length > 0
account.type === "Account" && account.multiversxResources
? account.multiversxResources.delegations.length > 0
: false;

const onClick = useCallback(() => {
Expand All @@ -34,15 +34,15 @@ const AccountHeaderManageActions = (props: {
dispatch(openModal("MODAL_NO_FUNDS_STAKE", { account }));
} else if (hasDelegations) {
dispatch(
openModal("MODAL_ELROND_DELEGATE", {
openModal("MODAL_MULTIVERSX_DELEGATE", {
account,
validators,
source,
}),
);
} else {
dispatch(
openModal("MODAL_ELROND_REWARDS_INFO", {
openModal("MODAL_MULTIVERSX_REWARDS_INFO", {
account,
validators,
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Fragment, useState } from "react";
import { ElrondAccount } from "@ledgerhq/live-common/families/elrond/types";
import { MultiversXAccount } from "@ledgerhq/live-common/families/multiversx/types";
import { Trans, useTranslation } from "react-i18next";
import { SubAccount } from "@ledgerhq/types-live";
import styled from "styled-components";
Expand All @@ -13,7 +13,7 @@ import AccountSubHeaderDrawer from "~/renderer/components/AccountSubHeader/Accou
import Alert from "~/renderer/components/Alert";

export interface AccountSubHeaderPropsType {
account: ElrondAccount | SubAccount;
account: MultiversXAccount | SubAccount;
}

const CardContent = styled(Box)`
Expand Down Expand Up @@ -43,8 +43,8 @@ const AccountSubHeader = ({ account }: AccountSubHeaderPropsType) => {
const { t } = useTranslation();

const isGuarded =
account.type === "Account" && account.elrondResources
? account.elrondResources.isGuarded
account.type === "Account" && account.multiversxResources
? account.multiversxResources.isGuarded
: false;

const openDrawer = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useDispatch } from "react-redux";
import { Trans } from "react-i18next";
import styled from "styled-components";
import { BigNumber } from "bignumber.js";
import { useElrondRandomizedValidators } from "@ledgerhq/live-common/families/elrond/react";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/elrond/helpers";
import { useMultiversXRandomizedValidators } from "@ledgerhq/live-common/families/multiversx/react";
import { denominate } from "@ledgerhq/live-common/families/multiversx/helpers";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/multiversx/helpers";
import Text from "~/renderer/components/Text";
import Button from "~/renderer/components/Button";
import Box from "~/renderer/components/Box";
Expand All @@ -15,16 +15,20 @@ import ToolTip from "~/renderer/components/Tooltip";
import ClaimRewards from "~/renderer/icons/ClaimReward";
import DelegateIcon from "~/renderer/icons/Delegate";
import TableContainer, { TableHeader } from "~/renderer/components/TableContainer";
import Unbondings from "~/renderer/families/elrond/components/Unbondings";
import Delegations from "~/renderer/families/elrond/components/Delegations";
import Unbondings from "~/renderer/families/multiversx/components/Unbondings";
import Delegations from "~/renderer/families/multiversx/components/Delegations";
import { urls } from "~/config/urls";
import { openURL } from "~/renderer/linking";
import { openModal } from "~/renderer/actions/modals";
import { DelegationType, ElrondFamily, UnbondingType } from "~/renderer/families/elrond/types";
import { ElrondAccount } from "@ledgerhq/live-common/families/elrond/types";
import {
DelegationType,
MultiversXFamily,
UnbondingType,
} from "~/renderer/families/multiversx/types";
import { MultiversXAccount } from "@ledgerhq/live-common/families/multiversx/types";

export interface DelegationPropsType {
account: ElrondAccount;
account: MultiversXAccount;
}
const Wrapper = styled(Box).attrs(() => ({
p: 3,
Expand All @@ -37,9 +41,9 @@ const Wrapper = styled(Box).attrs(() => ({
/* eslint-disable react/display-name */
const Delegation = (props: DelegationPropsType) => {
const { account } = props;
const validators = useElrondRandomizedValidators();
const validators = useMultiversXRandomizedValidators();
const [delegationResources, setDelegationResources] = useState<DelegationType[]>(
account.elrondResources ? account.elrondResources.delegations : [],
account.multiversxResources ? account.multiversxResources.delegations : [],
);

const dispatch = useDispatch();
Expand Down Expand Up @@ -96,13 +100,17 @@ const Delegation = (props: DelegationPropsType) => {
[delegationResources, findValidator],
);
const fetchDelegations = useCallback(() => {
setDelegationResources(account.elrondResources ? account.elrondResources.delegations : []);
setDelegationResources(
account.multiversxResources ? account.multiversxResources.delegations : [],
);
return () =>
setDelegationResources(account.elrondResources ? account.elrondResources.delegations : []);
}, [account.elrondResources]);
setDelegationResources(
account.multiversxResources ? account.multiversxResources.delegations : [],
);
}, [account.multiversxResources]);
const onEarnRewards = useCallback(() => {
dispatch(
openModal("MODAL_ELROND_REWARDS_INFO", {
openModal("MODAL_MULTIVERSX_REWARDS_INFO", {
account,
validators,
delegations,
Expand All @@ -112,7 +120,7 @@ const Delegation = (props: DelegationPropsType) => {
const onDelegate = useCallback(() => {
if (validators) {
dispatch(
openModal("MODAL_ELROND_DELEGATE", {
openModal("MODAL_MULTIVERSX_DELEGATE", {
account,
validators,
delegations,
Expand All @@ -123,7 +131,7 @@ const Delegation = (props: DelegationPropsType) => {
const onClaimRewards = useCallback(() => {
if (validators && delegations) {
dispatch(
openModal("MODAL_ELROND_CLAIM_REWARDS", {
openModal("MODAL_MULTIVERSX_CLAIM_REWARDS", {
account,
validators,
delegations,
Expand Down Expand Up @@ -215,7 +223,7 @@ const Delegation = (props: DelegationPropsType) => {
<Box mt={2}>
<LinkWithExternalIcon
label={<Trans i18nKey="elrond.delegation.emptyState.info" />}
onClick={() => openURL(urls.elrondStaking)}
onClick={() => openURL(urls.multiversxStaking)}
/>
</Box>
</Box>
Expand Down Expand Up @@ -251,7 +259,7 @@ const Delegation = (props: DelegationPropsType) => {
);
};

const EarnRewards: ElrondFamily["AccountBodyHeader"] = ({ account }) => {
const EarnRewards: MultiversXFamily["AccountBodyHeader"] = ({ account }) => {
return account.type === "Account" ? <Delegation account={account} /> : null;
};

Expand Down
Loading
Loading