Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
live-github-bot[bot] committed Oct 2, 2024
2 parents d85b16b + 6825622 commit 0aa4d67
Show file tree
Hide file tree
Showing 61 changed files with 5,186 additions and 1,465 deletions.
14 changes: 14 additions & 0 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @ledgerhq/live-cli

## 24.6.1

### Patch Changes

- Updated dependencies [[`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0)]:
- @ledgerhq/live-common@34.9.1

## 24.6.1-hotfix.0

### Patch Changes

- Updated dependencies [[`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0)]:
- @ledgerhq/live-common@34.9.1-hotfix.0

## 24.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ledgerhq/live-cli",
"version": "24.6.0",
"version": "24.6.1",
"description": "ledger-live CLI version",
"repository": {
"type": "git",
Expand Down
18 changes: 18 additions & 0 deletions apps/ledger-live-desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# ledger-live-desktop

## 2.87.1

### Patch Changes

- [#7978](https://github.com/LedgerHQ/ledger-live/pull/7978) [`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0) Thanks [@hedi-edelbloute](https://github.com/hedi-edelbloute)! - Cardano fees warning + fix high fees issue

- Updated dependencies [[`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0)]:
- @ledgerhq/live-common@34.9.1

## 2.87.1-hotfix.0

### Patch Changes

- [#7978](https://github.com/LedgerHQ/ledger-live/pull/7978) [`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0) Thanks [@hedi-edelbloute](https://github.com/hedi-edelbloute)! - Cardano fees warning + fix high fees issue

- Updated dependencies [[`77adfc3`](https://github.com/LedgerHQ/ledger-live/commit/77adfc33d4fd7d8f39329f23a36a55029331feb0)]:
- @ledgerhq/live-common@34.9.1-hotfix.0

## 2.87.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions apps/ledger-live-desktop/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.87.1

This release includes small security improvements, UI tweaks, and minor bug fixes.

# 2.87.0

This release includes minor bug fixes.
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "MIT",
"private": true,
"main": "./.webpack/main.bundle.js",
"version": "2.87.0",
"version": "2.87.1",
"scripts": {
"start:prod": "electron ./.webpack/main.bundle.js",
"start": "cross-env NODE_ENV=development node ./tools/main.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function StepDelegationFooter({
}: StepProps) {
invariant(account, "account required");
const { errors } = status;
const canNext = !bridgePending && !errors.amount && transaction;
const canNext = !bridgePending && Object.keys(errors).length === 0 && transaction;

return (
<Box horizontal justifyContent="flex-end" flow={2} grow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { StepProps } from "../types";
import CardanoLedgerPoolIcon from "../LedgerPoolIcon";
import BigNumber from "bignumber.js";
import { useMaybeAccountUnit } from "~/renderer/hooks/useAccountUnit";
import IconExclamationCircle from "~/renderer/icons/ExclamationCircle";
import TranslatedError from "~/renderer/components/TranslatedError";

const FromToWrapper = styled.div``;
const Separator = styled.div`
Expand All @@ -27,8 +29,8 @@ function StepSummary(props: StepProps) {
const feesUnit = useMaybeAccountUnit(account);
if (!account || !transaction) return null;

const { estimatedFees } = status;

const { estimatedFees, warnings } = status;
const { feeTooHigh } = warnings;
const feesCurrency = getAccountCurrency(account);
const showDeposit = !account.cardanoResources?.delegation?.status;
const stakeKeyDeposit = account.cardanoResources?.protocolParams.stakeKeyDeposit;
Expand Down Expand Up @@ -105,7 +107,7 @@ function StepSummary(props: StepProps) {
</Text>
<Box>
<FormattedVal
color={"palette.text.shade80"}
color={feeTooHigh ? "warning" : "palette.text.shade80"}
disableRounding
unit={feesUnit}
alwaysShowValue
Expand All @@ -116,7 +118,7 @@ function StepSummary(props: StepProps) {
/>
<Box textAlign="right">
<CounterValue
color={"palette.text.shade60"}
color={feeTooHigh ? "warning" : "palette.text.shade60"}
fontSize={3}
currency={feesCurrency}
value={estimatedFees}
Expand All @@ -126,6 +128,20 @@ function StepSummary(props: StepProps) {
</Box>
</Box>
</Box>
{feeTooHigh ? (
<Box horizontal justifyContent="flex-end" alignItems="center" color="warning">
<IconExclamationCircle size={10} />
<Text
ff="Inter|Medium"
fontSize={2}
style={{
marginLeft: "5px",
}}
>
<TranslatedError error={feeTooHigh} />
</Text>
</Box>
) : null}
</FromToWrapper>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
Transaction,
TransactionStatus,
} from "@ledgerhq/live-common/families/cardano/types";
const Root = (props: {

const MemoField = (props: {
account: CardanoAccount;
transaction: Transaction;
status: TransactionStatus;
Expand All @@ -32,7 +33,4 @@ const Root = (props: {
);
};

export default {
component: Root,
fields: ["memo"],
};
export default MemoField;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
TransactionStatus,
} from "@ledgerhq/live-common/families/cardano/types";
import { track } from "~/renderer/analytics/segment";

const MemoValueField = ({
onChange,
account,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import {
CardanoAccount,
Transaction,
TransactionStatus,
} from "@ledgerhq/live-common/families/cardano/types";

import MemoField from "./MemoField";

const Root = (props: {
account: CardanoAccount;
transaction: Transaction;
status: TransactionStatus;
onChange: (t: Transaction) => void;
trackProperties?: Record<string, unknown>;
}) => {
return (
<>
<MemoField {...props} />
</>
);
};

export default {
component: Root,
fields: ["memo"],
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { StepProps } from "../types";
import BigNumber from "bignumber.js";
import Alert from "~/renderer/components/Alert";
import { useMaybeAccountUnit } from "~/renderer/hooks/useAccountUnit";
import IconExclamationCircle from "~/renderer/icons/ExclamationCircle";

const FromToWrapper = styled.div``;
const Separator = styled.div`
Expand All @@ -24,7 +25,8 @@ const Separator = styled.div`

function StepSummary(props: StepProps) {
const { account, transaction, status, error } = props;
const { estimatedFees, errors } = status;
const { estimatedFees, errors, warnings } = status;
const { feeTooHigh } = warnings;
const displayError = errors.amount?.message ? errors.amount : "";

const accountUnit = useMaybeAccountUnit(account);
Expand Down Expand Up @@ -72,7 +74,7 @@ function StepSummary(props: StepProps) {
</Text>
<Box>
<FormattedVal
color={"palette.text.shade80"}
color={feeTooHigh ? "warning" : "palette.text.shade80"}
disableRounding
unit={accountUnit}
alwaysShowValue
Expand All @@ -83,7 +85,7 @@ function StepSummary(props: StepProps) {
/>
<Box textAlign="right">
<CounterValue
color={"palette.text.shade60"}
color={feeTooHigh ? "warning" : "palette.text.shade60"}
fontSize={3}
currency={feesCurrency}
value={estimatedFees}
Expand All @@ -93,6 +95,20 @@ function StepSummary(props: StepProps) {
</Box>
</Box>
</Box>
{feeTooHigh ? (
<Box horizontal justifyContent="flex-end" alignItems="center" color="warning">
<IconExclamationCircle size={10} />
<Text
ff="Inter|Medium"
fontSize={2}
style={{
marginLeft: "5px",
}}
>
<TranslatedError error={feeTooHigh} />
</Text>
</Box>
) : null}
</FromToWrapper>
{displayError ? (
<Box grow>
Expand All @@ -114,22 +130,20 @@ export function StepSummaryFooter({
onClose,
}: StepProps) {
const { errors } = status;
const canNext = !errors.amount && !bridgePending && !errors.validators && transaction;
const canNext = Object.keys(errors).length === 0 && !bridgePending && transaction;
return (
<>
<Box horizontal justifyContent="flex-end" flow={2} grow>
<Button mr={1} secondary onClick={onClose}>
<Trans i18nKey="common.cancel" />
</Button>
<Button
id="undelegate-continue-button"
disabled={!canNext}
primary
onClick={() => transitionTo("connectDevice")}
>
<Trans i18nKey="common.continue" />
</Button>
</Box>
</>
<Box horizontal justifyContent="flex-end" flow={2} grow>
<Button mr={1} secondary onClick={onClose}>
<Trans i18nKey="common.cancel" />
</Button>
<Button
id="undelegate-continue-button"
disabled={!canNext}
primary
onClick={() => transitionTo("connectDevice")}
>
<Trans i18nKey="common.continue" />
</Button>
</Box>
);
}
Loading

0 comments on commit 0aa4d67

Please sign in to comment.