Skip to content

Commit

Permalink
Merge pull request #23 from multiversx/fixes
Browse files Browse the repository at this point in the history
Fixed ledger live imports
  • Loading branch information
popenta authored Aug 20, 2024
2 parents 5e4a6ce + fee268b commit 40c4d26
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useMemo } from "react";
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/elrond/helpers/hasMinimumDelegableBalance";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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/denominate";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/elrond/helpers/hasMinimumDelegableBalance";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { hasMinimumDelegableBalance } from "@ledgerhq/live-common/families/elrond/helpers";
import Text from "~/renderer/components/Text";
import Button from "~/renderer/components/Button";
import Box from "~/renderer/components/Box";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useMemo, Fragment, useCallback, ReactNode } from "react";
import { BigNumber } from "bignumber.js";
import { Trans } from "react-i18next";
import { useDispatch } from "react-redux";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import Box from "~/renderer/components/Box/Box";
import CheckCircle from "~/renderer/icons/CheckCircle";
import ToolTip from "~/renderer/components/Tooltip";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo, useCallback, useState, useEffect } from "react";
import { BigNumber } from "bignumber.js";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import Box from "~/renderer/components/Box";
import FirstLetterIcon from "~/renderer/components/FirstLetterIcon";
import Label from "~/renderer/components/Label";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Fragment, useCallback } from "react";
import { Trans } from "react-i18next";
import { BigNumber } from "bignumber.js";
import { getAccountBridge } from "@ledgerhq/live-common/bridge/index";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import invariant from "invariant";
import TrackPage from "~/renderer/analytics/TrackPage";
import Box from "~/renderer/components/Box";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Trans } from "react-i18next";
import styled from "styled-components";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { SyncOneAccountOnMount } from "@ledgerhq/live-common/bridge/react/index";
import TrackPage from "~/renderer/analytics/TrackPage";
import Box from "~/renderer/components/Box";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo, useState, useCallback } from "react";
import { useTranslation } from "react-i18next";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import FirstLetterIcon from "~/renderer/components/FirstLetterIcon";
import Box from "~/renderer/components/Box";
import Label from "~/renderer/components/Label";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from "react";
import { useTranslation, Trans } from "react-i18next";
import styled from "styled-components";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { SyncOneAccountOnMount } from "@ledgerhq/live-common/bridge/react/index";
import TrackPage from "~/renderer/analytics/TrackPage";
import Box from "~/renderer/components/Box";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo, useCallback, useState, useEffect } from "react";
import { BigNumber } from "bignumber.js";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import Box from "~/renderer/components/Box";
import FirstLetterIcon from "~/renderer/components/FirstLetterIcon";
import Label from "~/renderer/components/Label";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Trans } from "react-i18next";
import styled from "styled-components";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { SyncOneAccountOnMount } from "@ledgerhq/live-common/bridge/react/index";
import TrackPage from "~/renderer/analytics/TrackPage";
import Box from "~/renderer/components/Box";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Fragment, useCallback } from "react";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { getAccountBridge } from "@ledgerhq/live-common/bridge/index";
import { Trans } from "react-i18next";
import { BigNumber } from "bignumber.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useCallback, useMemo, useEffect } from "react";
import { Trans } from "react-i18next";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { useDispatch } from "react-redux";
import Box from "~/renderer/components/Box/Box";
import ExclamationCircleThin from "~/renderer/icons/ExclamationCircleThin";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ELROND_EXPLORER_URL,
ELROND_LEDGER_VALIDATOR_ADDRESS,
} from "@ledgerhq/live-common/families/elrond/constants";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers/denominate";
import { denominate } from "@ledgerhq/live-common/families/elrond/helpers";
import { useElrondPreloadData } from "@ledgerhq/live-common/families/elrond/react";
import { ElrondProvider, ElrondOperation } from "@ledgerhq/live-common/families/elrond/types";
import { Account, Operation } from "@ledgerhq/types-live";
Expand Down
2 changes: 2 additions & 0 deletions libs/ledger-live-common/src/families/elrond/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "@ledgerhq/coin-elrond/helpers/denominate";
export * from "@ledgerhq/coin-elrond/helpers/hasMinimumDelegableBalance";
3 changes: 2 additions & 1 deletion libs/ledgerjs/packages/hw-app-elrond/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"@ledgerhq/hw-transport": "workspace:^",
"bip32-path": "^0.4.2",
"@multiversx/sdk-core": "^13.3.0",
"bignumber.js": "^9.0.1"
"bignumber.js": "^9.0.1",
"protobufjs": "^7.2.6"
},
"devDependencies": {
"@ledgerhq/hw-transport-mocker": "workspace:^",
Expand Down
29 changes: 26 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40c4d26

Please sign in to comment.