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

[feat] Vechain integration #4947

Merged
merged 164 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
41afb53
feat: vet and vethor integration
davidecarpini Mar 2, 2023
9ff4f89
Merge pull request #4 from vechainfoundation/dev/vechain-integration-…
daithihearn Mar 8, 2023
043b338
fix(libs): fix block height
davidecarpini Mar 7, 2023
4dde433
fix(libs): fix error message when vtho not enough
davidecarpini Mar 7, 2023
1e35039
fix(mobile): hide vtho chart
davidecarpini Mar 3, 2023
38d31ac
remove TODO
davidecarpini Mar 8, 2023
36901a3
fix(ledger-live-desktop): add empty graph for VTHO
MirkoGenoni Mar 8, 2023
ac7039f
fix(libs): fix pending operations
MirkoGenoni Mar 8, 2023
dd50e34
fix(ledger-live-desktop): create custom warning component
MirkoGenoni Mar 8, 2023
ad4f3e5
fix(libs): fix to gas calculation
MirkoGenoni Mar 9, 2023
d234826
fix(libs): minor fixes to match PR requirements
MirkoGenoni Mar 13, 2023
7e71e8a
fix(account-units): add ethereum units to vechain account
MirkoGenoni Mar 13, 2023
eee791a
fix(libs): fix naming conventions
MirkoGenoni Mar 14, 2023
3f25e4c
add(hw): add test for vet application
MirkoGenoni Mar 14, 2023
ff2a53f
fix(hw): add coverage for hw-app
MirkoGenoni Mar 14, 2023
41332fa
fix(hw): fix dependencies
MirkoGenoni Mar 14, 2023
d3ff6d7
Fixing estimateGas function
daithihearn Mar 14, 2023
f612e19
fix(mobile): fix i18n
davidecarpini Mar 16, 2023
24c46fc
fix(web): fix i18n
davidecarpini Mar 16, 2023
e9579a7
fix(web): fix warning banner
davidecarpini Mar 16, 2023
36a4bd0
fix(desktop): fix to color and message warning banner
MirkoGenoni Mar 16, 2023
8ff15db
fix(libs): fix for bot tests
MirkoGenoni Apr 4, 2023
e2ed3f0
Merge remote-tracking branch 'upstream/develop' into dev/develop-rebase
MirkoGenoni Apr 11, 2023
73823de
fix(libs/lld): fix to desktop graphs + minor fixes
MirkoGenoni Apr 11, 2023
b07dc93
fix(libs): add vtho fees
MirkoGenoni Apr 11, 2023
bf3a2ed
change token type
MirkoGenoni Apr 12, 2023
5d353e5
fix: mobile vechain fees
davidecarpini Apr 13, 2023
349f84a
fix(libs): correct max VTHO amount sendable
MirkoGenoni Apr 14, 2023
0b5fb20
fix to fees for operations
MirkoGenoni Apr 18, 2023
adc4534
fix to id for token operations
MirkoGenoni Apr 18, 2023
310b512
bot tests
MirkoGenoni Apr 18, 2023
874ba6a
fix: pnpm.lock
davidecarpini Apr 18, 2023
44c8192
fix: bot tests on mainnet
MirkoGenoni Apr 19, 2023
1e0c387
fix: comment out bot tests code
MirkoGenoni Apr 19, 2023
fe0b475
changelog
davidecarpini Apr 19, 2023
3b1b57b
Merge pull request #6 from vechainfoundation/dev/develop-rebase-chang…
davidecarpini Apr 19, 2023
5531494
fix to fees currency icon
MirkoGenoni Apr 19, 2023
619606d
fix(libs): fix VTHO spendable amount
MirkoGenoni Apr 21, 2023
4891a0e
fix(libs): update explorer URL
MirkoGenoni Apr 21, 2023
9b19f98
fix(libs): rollback send footer icon
MirkoGenoni Apr 21, 2023
ade1b14
fix(libs): fix bridge tests
MirkoGenoni Apr 21, 2023
128438b
updated pnpm lock
MirkoGenoni Apr 24, 2023
af0d619
fix(libs):exclude test
MirkoGenoni Apr 24, 2023
7e86196
fix(libs): fix blockref calculation on empty account
MirkoGenoni Apr 24, 2023
59761cd
fix(libs): fix bridge tests for nondeterministic fields
MirkoGenoni Apr 24, 2023
785cd34
fix(libs): fix negative spendable balance
MirkoGenoni Apr 24, 2023
a92ef6b
fix(libs): send warning message not showing
MirkoGenoni Apr 24, 2023
31538ba
fix(libs): update max spendable calculation
MirkoGenoni Apr 27, 2023
b6dba7c
Merge remote-tracking branch 'upstream/develop' into dev/rebase-2804
MirkoGenoni Apr 28, 2023
7c0c4ea
fix(libs): linting errors
MirkoGenoni Apr 28, 2023
20c3d48
update pnpm lock
MirkoGenoni Apr 28, 2023
e4bab65
Merge pull request #8 from vechainfoundation/dev/rebase-2804
MirkoGenoni Apr 28, 2023
e8bc65c
Merge remote-tracking branch 'upstream/develop' into dev/merge-0205
MirkoGenoni May 2, 2023
7b043a0
update pnpm-lock
MirkoGenoni May 2, 2023
68efa65
Merge remote-tracking branch 'upstream/develop' into dev/merge-0205
MirkoGenoni May 2, 2023
9c65f24
Merge remote-tracking branch 'upstream/develop' into dev/merge-0205
MirkoGenoni May 3, 2023
a461946
Merge pull request #9 from vechainfoundation/dev/merge-0205
MirkoGenoni May 3, 2023
d22ccbd
Merge remote-tracking branch 'upstream/develop' into dev/merge-0505
MirkoGenoni May 5, 2023
f738ccc
update pnpm lock
MirkoGenoni May 5, 2023
35d15b6
fix(lld): remove dependency to custom component
MirkoGenoni May 5, 2023
5604f1f
fix(libs): update icon colors
MirkoGenoni May 5, 2023
c11a134
Merge pull request #10 from vechainfoundation/dev/merge-0505
davidecarpini May 5, 2023
be56ef6
fix(lld):add account banner
MirkoGenoni May 9, 2023
6a2690a
Merge pull request #12 from vechainfoundation/dev/add-banner
davidecarpini May 12, 2023
3a7bbf7
fix(libs): add reverse proxy url
MirkoGenoni May 16, 2023
3b4c71a
fix(libs): fix chain tag
MirkoGenoni May 16, 2023
a989aac
Merge pull request #13 from vechainfoundation/dev/add-reverse-proxy-url
davidecarpini May 16, 2023
1e4f3a2
Merge branch 'develop-merge-2023-06-14' into vechain-integration-merg…
davidecarpini Jun 14, 2023
228920f
chore: lint fixes
davidecarpini Jun 14, 2023
cdfae90
fix: network import
davidecarpini Jun 14, 2023
84c80a1
fix: remove unused desktop files
davidecarpini Jun 14, 2023
e38037c
Merge pull request #15 from vechainfoundation/vechain-integration-mer…
davidecarpini Jun 14, 2023
3d83d85
fix: podfile and pnpm locks
davidecarpini Jun 15, 2023
b0b2a24
Merge pull request #16 from vechainfoundation/vechain-integration-mer…
davidecarpini Jun 15, 2023
9a071a5
Merge branch 'ledger-develop-2023-90-06' into feat/vechain-integratio…
davidecarpini Sep 6, 2023
5ca4421
fix: errors
davidecarpini Sep 4, 2023
abc5088
fix: mock bridge missing property
davidecarpini Sep 4, 2023
033f32b
fix: comments
davidecarpini Sep 5, 2023
2af833e
fix: 21 comments of ledger MR
davidecarpini Sep 11, 2023
6400b22
fix: 12 more comments
davidecarpini Sep 11, 2023
8024484
fix: 8 more comments
davidecarpini Sep 12, 2023
d11c186
fix: error on js-transaction
davidecarpini Sep 12, 2023
b6b9b57
Merge pull request #23 from vechainfoundation/carpini/fix-21-comments…
davidecarpini Sep 13, 2023
7287ace
fix bridge tests with a new frozen seed phrase and a new account to t…
davidecarpini Sep 18, 2023
b92c6ca
Import placeholder instead of require
bitkris-dev Sep 22, 2023
f99345f
Merge pull request #26 from vechainfoundation/kris/import-placeholder
davidecarpini Sep 25, 2023
22eff80
fix: vtho const and from block parameter (#27)
davidecarpini Sep 26, 2023
d414db3
fix: remove static max fees value with a dynamic one (#28)
davidecarpini Sep 26, 2023
774ed04
Revert "fix: remove static max fees value with a dynamic one (#28)" (…
davidecarpini Sep 26, 2023
481c901
Carpini/testing transaction max fees 2023 09 25 (#30)
davidecarpini Sep 26, 2023
63a925e
fix: bot test (#31)
davidecarpini Oct 2, 2023
8a2a7ee
Merge remote-tracking branch 'ledger-origin/develop' into feat/merge-…
davidecarpini Oct 2, 2023
32b2bc3
fix: pnpm lock
davidecarpini Oct 2, 2023
5f1d02a
Merge pull request #33 from vechainfoundation/carpini/merge-2023-10-02-2
davidecarpini Oct 2, 2023
9ee9510
fix: bot test
davidecarpini Oct 2, 2023
b1b3a10
Merge pull request #34 from vechainfoundation/carpini/fixing-bot-test…
davidecarpini Oct 2, 2023
fec4c63
fix: comments and bot test
davidecarpini Oct 4, 2023
f55a30a
fix: add changelog
davidecarpini Oct 4, 2023
b225b4d
Merge pull request #35 from vechainfoundation/carpini/fix-comments-an…
davidecarpini Oct 4, 2023
8105f2c
fix: split bot test and add invariant
davidecarpini Oct 5, 2023
68a6bf8
Merge pull request #37 from vechainfoundation/carpini/fix-bot-test-20…
davidecarpini Oct 5, 2023
9ebfbd1
Merge remote-tracking branch 'ledger-origin/develop' into carpini/mer…
davidecarpini Oct 5, 2023
17040f9
fix: update snapshot
davidecarpini Oct 5, 2023
ce84b8b
fix: optimistic update
davidecarpini Oct 5, 2023
2bd22e8
Merge pull request #38 from vechainfoundation/carpini/merge-develop-2…
davidecarpini Oct 6, 2023
c976439
Merge pull request #4607 from vechainfoundation/feat/vechain-support
hedi-edelbloute Oct 6, 2023
adf8bea
update pnpm lock
hedi-edelbloute Oct 9, 2023
6b3fa6c
replace token type to fix test
hedi-edelbloute Oct 9, 2023
7187701
fix: dependencies
davidecarpini Oct 10, 2023
a4b3a75
Merge pull request #39 from vechainfoundation/carpini/merge-2023-10-10
davidecarpini Oct 10, 2023
dba2465
fix: pnpm-lock
davidecarpini Oct 11, 2023
a3f26d6
Merge pull request #40 from vechainfoundation/carpini/merge-2023-10-10
davidecarpini Oct 11, 2023
643b73a
Merge pull request #4989 from vechainfoundation/feat/vechain-support
hedi-edelbloute Oct 11, 2023
1886788
Update bot spec: device type and app name
hakim-adamik Oct 12, 2023
744f2bb
Merge remote-tracking branch 'ledger/develop' into HEAD
hakim-adamik Oct 12, 2023
8eb33a1
specs edit
hedi-edelbloute Oct 17, 2023
03c4a89
vet only test
hedi-edelbloute Oct 17, 2023
f93d246
restore vtho
hedi-edelbloute Oct 18, 2023
748e5ce
Merge branch 'develop' into feat/vechain
hedi-edelbloute Oct 18, 2023
223f6ef
fix bot + add logs
hedi-edelbloute Oct 18, 2023
e82cfdd
composite test
hedi-edelbloute Oct 18, 2023
342b746
add logs
hedi-edelbloute Oct 18, 2023
d3ef719
add logs
hedi-edelbloute Oct 18, 2023
6550280
fix logs
hedi-edelbloute Oct 18, 2023
a4d1d10
add logs
hedi-edelbloute Oct 18, 2023
43ac61b
add missing currency supported
hedi-edelbloute Oct 18, 2023
f1f87e0
Feat/vechain support (#5135)
davidecarpini Oct 20, 2023
03d1084
Cleanup a bit mutations in bot spec
hakim-adamik Oct 20, 2023
765f4fa
Add feature flag for Vechain currency (LLD + LLM)
hakim-adamik Oct 20, 2023
4887836
Also filter all tokens of currencies with feature flag disabled
hakim-adamik Oct 20, 2023
15a401f
Merge remote-tracking branch 'ledger/develop' into HEAD
hakim-adamik Oct 20, 2023
4fa0c41
remove logs
hedi-edelbloute Oct 23, 2023
7afe3d1
rollback to previous onSpeculosCreated usage
hedi-edelbloute Oct 24, 2023
2dd9a56
remove first button press
hedi-edelbloute Oct 27, 2023
295299a
force nano app version
hedi-edelbloute Oct 27, 2023
ee9a325
add log
hedi-edelbloute Oct 30, 2023
8497a02
test with single spec
hedi-edelbloute Nov 6, 2023
38ca5f2
missing hook
hedi-edelbloute Nov 6, 2023
9528f0f
nano x trial
hedi-edelbloute Nov 6, 2023
ed9a8df
change onspeculoscreated hook
hedi-edelbloute Nov 6, 2023
4db3f57
add log
hedi-edelbloute Nov 6, 2023
3f29b35
split back mutations
hedi-edelbloute Nov 8, 2023
f056330
remove logs
hedi-edelbloute Nov 8, 2023
1a13c25
Merge branch 'develop' into feat/vechain
hedi-edelbloute Nov 9, 2023
841aab1
fix pnpm lock
hedi-edelbloute Nov 9, 2023
7b735f8
Merge remote-tracking branch 'ledger/develop' into HEAD
hakim-adamik Nov 9, 2023
cb176b7
Add missing dependency + update pnpm-lock.yaml
hakim-adamik Nov 9, 2023
00969f9
fix lint issues
hedi-edelbloute Nov 9, 2023
0c60cd7
add abandonseed
hedi-edelbloute Nov 9, 2023
5e7af72
remove git status
hedi-edelbloute Nov 9, 2023
b6e7ac4
remove useless import
hedi-edelbloute Nov 9, 2023
fb39575
fix integ tests
hedi-edelbloute Nov 13, 2023
1a08ed1
Merge branch 'develop' into feat/vechain
hedi-edelbloute Nov 13, 2023
77004a0
Merge branch 'develop' into feat/vechain
hedi-edelbloute Nov 15, 2023
2119bc6
update doc hw-app-vet
hedi-edelbloute Nov 15, 2023
e0a6d5e
edit token id
hedi-edelbloute Nov 15, 2023
5e14ab9
fix type error
hedi-edelbloute Nov 15, 2023
3245efc
Merge branch 'develop' into feat/vechain
hedi-edelbloute Nov 15, 2023
ff94c6c
fix unit test
hedi-edelbloute Nov 16, 2023
f6b9727
update snapshots
hedi-edelbloute Nov 16, 2023
6fb14a6
update snapshot'
hedi-edelbloute Nov 16, 2023
1d3a3e3
fix integ test
hedi-edelbloute Nov 16, 2023
5da7218
update token id
hedi-edelbloute Nov 16, 2023
7d81ed4
fix integ tests
hedi-edelbloute Nov 16, 2023
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
13 changes: 13 additions & 0 deletions .changeset/stupid-suns-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@ledgerhq/cryptoassets": minor
"@ledgerhq/hw-app-vet": minor
"@ledgerhq/crypto-icons-ui": minor
"ledger-live-desktop": minor
"live-mobile": minor
"@ledgerhq/live-common": minor
"@ledgerhq/coin-framework": minor
"@ledgerhq/live-cli": minor
"@ledgerhq/live-env": minor
---

vechain integration
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 @@ -80,6 +80,7 @@ setSupportedCurrencies([
"sei_network",
"persistence",
"quicksilver",
"vechain",
"internet_computer",
"klaytn",
"polygon_zk_evm",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const tokensWithUnsupportedGraph = ["vechain/vip180/vtho"];
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ setSupportedCurrencies([
"moonriver",
"velas_evm",
"syscoin",
"vechain",
"internet_computer",
"klaytn",
"polygon_zk_evm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const listSupportedTokens = () =>
listTokens().filter(token => isCurrencySupported(token.parentCurrency));

const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const mock = useEnv("MOCK");

const axelar = useFeature("currencyAxelar");
const stargaze = useFeature("currencyStargaze");
const secretNetwork = useFeature("currencySecretNetwork");
Expand Down Expand Up @@ -68,8 +70,8 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const base = useFeature("currencyBase");
const baseGoerli = useFeature("currencyBaseGoerli");
const klaytn = useFeature("currencyKlaytn");
const mock = useEnv("MOCK");
const injective = useFeature("currencyInjective");
const vechain = useFeature("currencyVechain");
const casper = useFeature("currencyCasper");
const neonEvm = useFeature("currencyNeonEvm");
const lukso = useFeature("currencyLukso");
Expand Down Expand Up @@ -112,6 +114,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
base_goerli: baseGoerli,
klaytn,
injective,
vechain,
casper,
neon_evm: neonEvm,
lukso,
Expand Down Expand Up @@ -153,23 +156,29 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
baseGoerli,
klaytn,
injective,
vechain,
casper,
neonEvm,
lukso,
],
);

const currencies = useMemo(() => {
const currencies = (listSupportedCurrencies() as CryptoOrTokenCurrency[]).concat(
listSupportedTokens(),
);
const supportedCurrenciesAndTokens = (
listSupportedCurrencies() as CryptoOrTokenCurrency[]
).concat(listSupportedTokens());

const deactivatedCurrencies = mock
? [] // mock mode: all currencies are available for playwrigth tests
: Object.entries(featureFlaggedCurrencies)
.filter(([, feature]) => !feature?.enabled)
.map(([name]) => name);
return currencies.filter(c => !deactivatedCurrencies.includes(c.id));
.map(([id]) => id);

return supportedCurrenciesAndTokens.filter(
c =>
(c.type === "CryptoCurrency" && !deactivatedCurrencies.includes(c.id)) ||
(c.type === "TokenCurrency" && !deactivatedCurrencies.includes(c.parentCurrency.id)),
);
}, [featureFlaggedCurrencies, mock]);

const url =
Expand All @@ -186,7 +195,6 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
) : currency ? (
<CurrencyDownStatusAlert currencies={[currency]} />
) : null}
{/* $FlowFixMe: onChange type is not good */}
<SelectCurrency currencies={currencies} autoFocus onChange={setCurrency} value={currency} />
<FullNodeStatus currency={currency} />
{currency && currency.type === "TokenCurrency" ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback } from "react";
import { useSelector } from "react-redux";
import { useBalanceHistoryWithCountervalue } from "~/renderer/actions/portfolio";
import { useBalanceHistoryWithCountervalue, usePortfolio } from "~/renderer/actions/portfolio";
import { BigNumber } from "bignumber.js";
import { formatShort } from "@ledgerhq/live-common/currencies/index";
import { Account, AccountLike } from "@ledgerhq/types-live";
Expand All @@ -15,6 +15,11 @@ import FormattedDate from "~/renderer/components/FormattedDate";
import { Data, Item } from "~/renderer/components/Chart/types";
import { getLLDCoinFamily } from "~/renderer/families";

import PlaceholderChart from "~/renderer/components/PlaceholderChart";
import Alert from "~/renderer/components/Alert";
import { useTranslation } from "react-i18next";
import { tokensWithUnsupportedGraph } from "~/helpers/tokensWithUnsupportedGraph";

type Props = {
chartColor: string;
account: AccountLike;
Expand All @@ -31,6 +36,8 @@ export default function AccountBalanceSummary({
setCountervalueFirst,
mainAccount,
}: Props) {
const { t } = useTranslation();
const portfolio = usePortfolio();
const [range] = useTimeRange();
const counterValue = useSelector(counterValueCurrencySelector);
const { history, countervalueAvailable, countervalueChange, cryptoChange } =
Expand Down Expand Up @@ -105,23 +112,37 @@ export default function AccountBalanceSummary({
</Box>

<Box px={5} ff="Inter" fontSize={4} color="palette.text.shade80" pt={5}>
<Chart
magnitude={chartMagnitude}
color={chartColor}
// TODO we need to make Date non optional in live-common
data={history as Data}
height={200}
tickXScale={range}
valueKey={displayCountervalue ? "countervalue" : "value"}
renderTickY={
discreetMode
? () => ""
: displayCountervalue
? renderTickYCounterValue
: renderTickYCryptoValue
}
renderTooltip={renderTooltip}
/>
{account.type === "TokenAccount" &&
tokensWithUnsupportedGraph.includes(account.token.id) ? (
<>
<Alert type="secondary" noIcon={false}>
<span>{t("graph.noGraphWarning")}</span>
</Alert>
<PlaceholderChart
magnitude={counterValue.units[0].magnitude}
data={portfolio.balanceHistory}
tickXScale={range}
/>
</>
) : (
<Chart
magnitude={chartMagnitude}
color={chartColor}
// TODO we need to make Date non optional in live-common
data={history as Data}
height={200}
tickXScale={range}
valueKey={displayCountervalue ? "countervalue" : "value"}
renderTickY={
discreetMode
? () => ""
: displayCountervalue
? renderTickYCounterValue
: renderTickYCryptoValue
}
renderTooltip={renderTooltip}
/>
)}
</Box>
{AccountBalanceSummaryFooter && (
<AccountBalanceSummaryFooter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { CryptoCurrency, Currency, TokenCurrency, Unit } from "@ledgerhq/types-c
import Chart from "~/renderer/components/Chart";
import Box, { Card } from "~/renderer/components/Box";
import FormattedVal from "~/renderer/components/FormattedVal";
import { useCurrencyPortfolio } from "~/renderer/actions/portfolio";
import { useCurrencyPortfolio, usePortfolio } from "~/renderer/actions/portfolio";
import AssetBalanceSummaryHeader from "./AssetBalanceSummaryHeader";
import { discreetModeSelector } from "~/renderer/reducers/settings";
import FormattedDate from "~/renderer/components/FormattedDate";
import { Data } from "~/renderer/components/Chart/types";
import { PortfolioRange } from "@ledgerhq/types-live";
import PlaceholderChart from "~/renderer/components/PlaceholderChart";
import Alert from "~/renderer/components/Alert";
import { useTranslation } from "react-i18next";
import { tokensWithUnsupportedGraph } from "~/helpers/tokensWithUnsupportedGraph";

type Props = {
counterValue: Currency;
Expand All @@ -29,6 +33,8 @@ export default function BalanceSummary({
chartColor,
currency,
}: Props) {
const { t } = useTranslation();
const portfolio = usePortfolio();
const { history, countervalueAvailable, countervalueChange, cryptoChange } = useCurrencyPortfolio(
{
currency,
Expand Down Expand Up @@ -90,23 +96,36 @@ export default function BalanceSummary({
</Box>

<Box px={5} ff="Inter" fontSize={4} color="palette.text.shade80" pt={6}>
<Chart
magnitude={chartMagnitude}
color={chartColor}
// TODO make date non optional
data={history as Data}
height={200}
tickXScale={range}
valueKey={displayCountervalue ? "countervalue" : "value"}
renderTickY={
discreetMode
? () => ""
: displayCountervalue
? renderTickYCounterValue
: renderTickYCryptoValue
}
renderTooltip={renderTooltip}
/>
{currency.type === "TokenCurrency" && tokensWithUnsupportedGraph.includes(currency.id) ? (
<>
<Alert type="secondary" noIcon={false}>
<span>{t("graph.noGraphWarning")}</span>
</Alert>
<PlaceholderChart
magnitude={counterValue.units[0].magnitude}
data={portfolio.balanceHistory}
tickXScale={range}
/>
</>
) : (
<Chart
magnitude={chartMagnitude}
color={chartColor}
// TODO make date non optional
data={history as Data}
height={200}
tickXScale={range}
valueKey={displayCountervalue ? "countervalue" : "value"}
renderTickY={
discreetMode
? () => ""
: displayCountervalue
? renderTickYCounterValue
: renderTickYCryptoValue
}
renderTooltip={renderTooltip}
/>
)}
</Box>
</Card>
);
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/src/sentry/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const ignoreErrors = [
"DisconnectedDevice",
"DisconnectedDeviceDuringOperation",
"EthAppPleaseEnableContractData",
"VechainAppPleaseEnableContractDataAndMultiClause",
"failed with status code",
"GetAppAndVersionUnsupportedFormat",
"Invalid channel",
Expand Down
17 changes: 16 additions & 1 deletion apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3570,6 +3570,9 @@
}
}
},
"graph": {
"noGraphWarning": "The graph is not available for this token"
},
"near": {
"account": {
"stakedBalance": "Staked balance",
Expand Down Expand Up @@ -5280,6 +5283,18 @@
"title": "Not enough EGLD to pay the transaction fees",
"description": "Please send some EGLD to your account to pay for transactions."
},
"NotEnoughVTHO": {
"title": "Sorry, insufficient VTHO funds",
"description": "Please make sure the account has enough VTHO."
},
"MustBeVechain": {
"title": "Not a vechain account",
"description": "Please make sure the coin is VTHO or VET"
},
"ImpossibleToCalculateAmountAndFees": {
"title": "Impossible to calculate amount and fees",
"description": "Impossible to calculate amount and fees"
},
"NotEnoughBalance": {
"title": "Sorry, insufficient funds",
"description": "Please make sure the account has enough funds."
Expand Down Expand Up @@ -5973,4 +5988,4 @@
"recoverRestore": {
"title": "Connect and unlock your Ledger"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/ledger-live-mobile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const excludedErrorName = [
// bad usage of device
"BleError",
"EthAppPleaseEnableContractData",
"VechainAppPleaseEnableContractDataAndMultiClause",
"CantOpenDevice",
"DisconnectedDevice",
"DisconnectedDeviceDuringOperation",
Expand Down
60 changes: 38 additions & 22 deletions apps/ledger-live-mobile/src/components/AccountGraphCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import { NavigatorName, ScreenName } from "../const";
import { track } from "../analytics";
import { StackNavigatorNavigation } from "./RootNavigator/types/helpers";
import { BaseNavigatorStackParamList } from "./RootNavigator/types/BaseNavigator";
import { GraphPlaceholder } from "./Graph/Placeholder";
import { tokensWithUnsupportedGraph } from "./Graph/tokensWithUnsupportedGraph";

const { width } = getWindowDimensions();

Expand Down Expand Up @@ -150,29 +152,43 @@ function AccountGraphCard({
parentAccount={parentAccount}
currency={currency}
/>

<Flex height={120} alignItems="center" justifyContent="center" onTouchEnd={handleGraphTouch}>
{!loading ? (
<Transitions.Fade duration={400} status="entering">
<Graph
isInteractive
height={120}
width={width}
color={graphColor}
data={history}
mapValue={useCounterValue ? mapCounterValue : mapCryptoValue}
onItemHover={setHoverItem}
verticalRangeRatio={10}
fill={colors.background.main}
{account.type === "TokenAccount" && tokensWithUnsupportedGraph.includes(account.token.id) ? (
<GraphPlaceholder />
) : (
<>
<Flex
height={120}
alignItems="center"
justifyContent="center"
onTouchEnd={handleGraphTouch}
>
{!loading ? (
<Transitions.Fade duration={400} status="entering">
<Graph
isInteractive
height={120}
width={width}
color={graphColor}
data={history}
mapValue={useCounterValue ? mapCounterValue : mapCryptoValue}
onItemHover={setHoverItem}
verticalRangeRatio={10}
fill={colors.background.main}
/>
</Transitions.Fade>
) : (
<InfiniteLoader size={32} />
)}
</Flex>
<Flex bg="background.main">
<GraphTabs
activeIndex={activeRangeIndex}
onChange={updateRange}
labels={rangesLabels}
/>
</Transitions.Fade>
) : (
<InfiniteLoader size={32} />
)}
</Flex>
<Flex bg="background.main">
<GraphTabs activeIndex={activeRangeIndex} onChange={updateRange} labels={rangesLabels} />
</Flex>
</Flex>
</>
)}
<Footer renderAccountSummary={renderAccountSummary} />
</Flex>
);
Expand Down
Loading
Loading