Skip to content

Commit

Permalink
fix: swap history status translations (#6658)
Browse files Browse the repository at this point in the history
* Bugfix/fix wrong param format swap (#5392)

* fix: fix wrong param format swap

* chore: add changeset

* fix: swap history status translations
  • Loading branch information
sarneijim committed Apr 12, 2024
1 parent da68689 commit be3748b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-cherries-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Fix swap history status translations
5 changes: 5 additions & 0 deletions .changeset/grumpy-pillows-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": patch
---

Fix format param swap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { MappedSwapOperation } from "@ledgerhq/live-common/exchange/swap/types";
import { getProviderName } from "@ledgerhq/live-common/exchange/swap/utils/index";
import React from "react";
import { useTranslation } from "react-i18next";
import styled, { DefaultTheme } from "styled-components";
import Box from "~/renderer/components/Box";
import CryptoCurrencyIcon from "~/renderer/components/CryptoCurrencyIcon";
Expand Down Expand Up @@ -102,6 +103,7 @@ const OperationRow = ({
const fromCurrency = getAccountCurrency(fromAccount);
const toCurrency = getAccountCurrency(toAccount);
const dateFormatted = useDateFormatted(operation.date, hourFormat);
const { t } = useTranslation();

return (
<Row
Expand All @@ -112,17 +114,7 @@ const OperationRow = ({
alignItems={"center"}
onClick={() => openSwapOperationDetailsModal(mappedSwapOperation)}
>
<Tooltip
content={
<span
style={{
textTransform: "capitalize",
}}
>
{status}
</span>
}
>
<Tooltip content={<span>{t(`swap2.history.status.${status}`)}</span>}>
<Status status={status}>
<IconSwap size={12} />
{isSwapOperationPending(status) ? (
Expand Down
9 changes: 8 additions & 1 deletion apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,14 @@
"description": "Either you have not made any swaps yet, or Ledger Live has been reset in the meantime."
},
"export": "Export operations",
"exporting": "Exporting..."
"exporting": "Exporting...",
"status": {
"pending": "Pending",
"onhold": "Onhold",
"expired": "Expired",
"finished": "Finished",
"refunded": "Refunded"
}
},
"exchangeDrawer": {
"title": "Confirm your Exchange",
Expand Down

0 comments on commit be3748b

Please sign in to comment.