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

OUTDATED - Smartling translations are updated for PR#9230 from feat/coin-mina #9626

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bf3ca0a
feat(mina): add mina blockchain
lawRathod May 14, 2024
b2bb7bf
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
e045433
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
0f437ec
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
bfd58fd
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
a6baf06
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
61e5d84
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
875fb60
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
6df42cf
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
d32aab7
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
0cbfb63
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
9fc59ae
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
ad90bd2
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
2c4fd13
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
bfb892b
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
73c0a35
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
bae8657
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
8dfe441
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
30f075c
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
56f94cb
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
fa9f18a
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
dcdf010
File apps/ledger-live-desktop/static/i18n/en/app.json was updated on …
smartling-github-connector[bot] Mar 21, 2025
be7c6b8
File apps/ledger-live-mobile/src/locales/en/common.json was updated o…
smartling-github-connector[bot] Mar 21, 2025
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
15 changes: 15 additions & 0 deletions .changeset/witty-socks-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@ledgerhq/types-cryptoassets": minor
"@ledgerhq/cryptoassets": minor
"@ledgerhq/types-live": minor
"@ledgerhq/crypto-icons-ui": minor
"@ledgerhq/coin-mina": minor
"ledger-live-desktop": minor
"live-mobile": minor
"@ledgerhq/live-common": minor
"@ledgerhq/coin-framework": minor
"@ledgerhq/web-tools": minor
"@ledgerhq/live-cli": minor
---

Add support for mina blockchain
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 @@ -110,6 +110,7 @@ setSupportedCurrencies([
"zenrock",
"sonic",
"sonic_blaze",
"mina",
]);

for (const k in process.env) setEnvUnsafe(k as EnvName, process.env[k]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ setSupportedCurrencies([
"zenrock",
"sonic",
"sonic_blaze",
"mina",
]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from "react";
import AccountSubHeader from "../../components/AccountSubHeader/index";

export default function MinaAccountSubHeader() {
return <AccountSubHeader family="Mina" team="Zondax"></AccountSubHeader>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React, { useCallback } from "react";
import { getAccountBridge } from "@ledgerhq/live-common/bridge/index";
import invariant from "invariant";
import { Account } from "@ledgerhq/types-live";
import { Transaction, TransactionStatus } from "@ledgerhq/live-common/families/mina/types";
import { useTranslation } from "react-i18next";
import MemoTagField from "~/newArch/features/MemoTag/components/MemoTagField";

const MemoField = ({
onChange,
account,
transaction,
status,
}: {
onChange: (a: Transaction) => void;
account: Account;
transaction: Transaction;
status: TransactionStatus;
}) => {
invariant(transaction.family === "mina", "Memo: Mina family expected");

const { t } = useTranslation();

const bridge = getAccountBridge(account);

const onMemoFieldChange = useCallback(
(value: string) => {
if (value !== "") onChange(bridge.updateTransaction(transaction, { memo: value }));
else onChange(bridge.updateTransaction(transaction, { memo: undefined }));
},
[onChange, transaction, bridge],
);

// We use transaction as an error here.
// on the ledger-live desktop
return (
<MemoTagField
warning={status.warnings.transaction}
error={status.errors.transaction}
value={transaction.memo}
placeholder={t("families.mina.memoPlaceholder")}
onChange={onMemoFieldChange}
spellCheck="false"
/>
);
};

export default MemoField;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react";
import MemoField from "./MemoField";
import Box from "~/renderer/components/Box";
import { Transaction, TransactionStatus } from "@ledgerhq/live-common/families/mina/types";
import { Account } from "@ledgerhq/types-live";

const Root = (props: {
account: Account;
transaction: Transaction;
status: TransactionStatus;
onChange: (a: Transaction) => void;
trackProperties?: object;
}) => {
return (
<Box flow={1}>
<Box
horizontal
alignItems="center"
justifyContent="space-between"
style={{ width: "50%", paddingRight: 28 }}
></Box>
<Box mb={15} horizontal alignItems="center" justifyContent="space-between">
<Box grow={1}>
<MemoField {...props} />
</Box>
</Box>
</Box>
);
};

export default {
component: Root,
// Transaction is used here to prevent user to forward
fields: ["memo", "transaction"],
};
12 changes: 12 additions & 0 deletions apps/ledger-live-desktop/src/renderer/families/mina/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import AccountSubHeader from "./AccountSubHeader";
import sendAmountFields from "./SendAmountFields";
import operationDetails from "./operationDetails";
import { MinaFamily } from "./types";

const family: MinaFamily = {
AccountSubHeader,
operationDetails,
sendAmountFields,
};

export default family;
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from "react";
import { Trans } from "react-i18next";
import {
OpDetailsTitle,
OpDetailsData,
OpDetailsSection,
} from "~/renderer/drawers/OperationDetails/styledComponents";
import Ellipsis from "~/renderer/components/Ellipsis";
import { MinaOperation } from "@ledgerhq/live-common/families/mina/types";
import { formatCurrencyUnit } from "@ledgerhq/coin-framework/currencies/formatCurrencyUnit";
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
import BigNumber from "bignumber.js";

type OperationDetailsExtraProps = {
operation: MinaOperation;
};

const OperationDetailsExtra = ({ operation }: OperationDetailsExtraProps) => {
const { extra } = operation;
const sections = [];
if (extra.memo) {
sections.push(
<OpDetailsSection key={extra.memo}>
<OpDetailsTitle>
<Trans i18nKey={`operationDetails.extra.memo`} />
</OpDetailsTitle>
<OpDetailsData>
<Ellipsis>{extra.memo}</Ellipsis>
</OpDetailsData>
</OpDetailsSection>,
);
}

if (extra.accountCreationFee !== "0") {
sections.push(
<OpDetailsSection key={extra.accountCreationFee}>
<OpDetailsTitle>
<Trans i18nKey={`operationDetails.extra.accountCreationFee`} />
</OpDetailsTitle>
<OpDetailsData>
{formatCurrencyUnit(
getCryptoCurrencyById("mina").units[0],
new BigNumber(extra.accountCreationFee),
{ showCode: true },
)}
</OpDetailsData>
</OpDetailsSection>,
);
}

return sections;
};

export default {
OperationDetailsExtra,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {
MinaAccount,
MinaOperation,
Transaction,
TransactionStatus,
} from "@ledgerhq/live-common/families/mina/types";
import { LLDCoinFamily } from "../types";

export type MinaFamily = LLDCoinFamily<MinaAccount, Transaction, TransactionStatus, MinaOperation>;
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const zenrock = useFeature("currencyZenrock");
const sonic = useFeature("currencySonic");
const sonicBlaze = useFeature("currencySonicBlaze");
const mina = useFeature("currencyMina");

const featureFlaggedCurrencies = useMemo(
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
Expand Down Expand Up @@ -150,6 +151,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
zenrock,
sonic,
sonic_blaze: sonicBlaze,
mina: mina,
}),
[
aptos,
Expand Down Expand Up @@ -208,6 +210,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
zenrock,
sonic,
sonicBlaze,
mina,
],
);

Expand Down
45 changes: 43 additions & 2 deletions apps/ledger-live-desktop/static/i18n/ar/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,8 @@
"palletMethod" : "الطريقة",
"transferAmount" : "مبلغ التحويل",
"validatorsCount" : "({{number}}) مدقق",
"version" : "الإصدار"
"version" : "الإصدار",
"accountCreationFee" : "رسوم إنشاء الحساب"
}
},
"operationList" : {
Expand Down Expand Up @@ -4229,7 +4230,7 @@
"nfts" : {
"title" : "المجموعات المخفية للرموز غير القابلة للاستبدال",
"description" : "إعادة تعيين قائمة المجموعات المخفية",
"reset" : "إعادة تعيين"
"reset" : "Reset ({{count}})"
},
"exchangeDeveloperMode" : {
"title" : "وضع المطور لمنصة التداول",
Expand Down Expand Up @@ -4340,6 +4341,32 @@
},
"back" : "رجوع"
},
"debugNfts" : {
"title" : "NFTs Tools",
"description" : "Provides some useful tools to handle NFTs in Ledger Live",
"cta" : "Open",
"tabs" : {
"config" : "Configuration",
"generatorAndDestructor" : "Generators & Destructors"
},
"configuration" : {
"supported" : "Supported NFT Chain",
"supported_other" : "Supported NFT Chains",
"nms" : {
"title" : "NFT Metadata Service (NMS)",
"env" : "Environment : {{env}}"
}
},
"generatorAndDestructor" : {
"genAcc" : "Generate Accounts",
"genAccDesc" : "Generate an accounts with NFTs",
"cta" : "Generate",
"deleteAcc" : "Delete Accounts",
"deleteAccDesc" : "Delete all accounts from store",
"delete" : "Delete"
},
"back" : "Go back"
},
"debugWalletSync" : {
"title" : "مُصحِّح أخطاء مزامنة Ledger",
"description" : "يسمح لك بإطلاق تدفق مزامنة Ledger محدد أو التحقق من الحالة الحالية لمزامنة Ledger",
Expand Down Expand Up @@ -5515,6 +5542,11 @@
"memo" : "علامة/ملاحظة (تسمية الوجهة)",
"memoPlaceholder" : "اختياري",
"requiredMemoPlaceholder" : "مطلوب"
},
"mina" : {
"memoPlaceholder" : "اختياري",
"memo" : "ملاحظة (تسمية الوجهة)",
"memoWarningText" : "قيمة الملاحظة يمكن أن تكون سلسلةً أقصر من أو تساوي 32 حرفاً"
}
},
"errors" : {
Expand Down Expand Up @@ -6545,6 +6577,15 @@
"swap" : "مبادلة",
"deposit" : "إيداع"
}
},
"InvalidMemoMina" : {
"title" : "نص علامة الملاحظة (تسمية الوجهة) لا يمكن أن يكون أطول من 32 حرفاً"
},
"AccountCreationFeeWarning" : {
"title" : "هذه المعاملة ستُكلّف رسوم إنشاء حساب بقيمة {{fee}}"
},
"AmountTooSmall" : {
"title" : "الحد الأدنى للمبلغ المطلوب لهذه المعاملة هو {{amount}}"
}
},
"cryptoOrg" : {
Expand Down
45 changes: 43 additions & 2 deletions apps/ledger-live-desktop/static/i18n/de/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,8 @@
"palletMethod" : "Methode",
"transferAmount" : "Betrag transferieren",
"validatorsCount" : "Validatoren ({{number}})",
"version" : "Version"
"version" : "Version",
"accountCreationFee" : "Kontoerstellungsgebühr"
}
},
"operationList" : {
Expand Down Expand Up @@ -4229,7 +4230,7 @@
"nfts" : {
"title" : "Ausgeblendete NFT-Sammlungen",
"description" : "Liste der ausgeblendeten NFT-Sammlungen zurücksetzen",
"reset" : "Zurücksetzen"
"reset" : "Reset ({{count}})"
},
"exchangeDeveloperMode" : {
"title" : "Entwicklermodus für Börsen",
Expand Down Expand Up @@ -4340,6 +4341,32 @@
},
"back" : "Zurückgehen"
},
"debugNfts" : {
"title" : "NFTs Tools",
"description" : "Provides some useful tools to handle NFTs in Ledger Live",
"cta" : "Open",
"tabs" : {
"config" : "Configuration",
"generatorAndDestructor" : "Generators & Destructors"
},
"configuration" : {
"supported" : "Supported NFT Chain",
"supported_other" : "Supported NFT Chains",
"nms" : {
"title" : "NFT Metadata Service (NMS)",
"env" : "Environment : {{env}}"
}
},
"generatorAndDestructor" : {
"genAcc" : "Generate Accounts",
"genAccDesc" : "Generate an accounts with NFTs",
"cta" : "Generate",
"deleteAcc" : "Delete Accounts",
"deleteAccDesc" : "Delete all accounts from store",
"delete" : "Delete"
},
"back" : "Go back"
},
"debugWalletSync" : {
"title" : "Ledger Sync-Debugger",
"description" : "Hiermit kannst du einen bestimmten Ledger Sync-Ablauf starten oder den aktuellen Status von Ledger Sync überprüfen",
Expand Down Expand Up @@ -5515,6 +5542,11 @@
"memo" : "Tag/Memo",
"memoPlaceholder" : "Optional",
"requiredMemoPlaceholder" : "Erforderlich"
},
"mina" : {
"memoPlaceholder" : "Optional",
"memo" : "Memo",
"memoWarningText" : "Der Wert von Memo kann eine Zeichenfolge mit maximal 32 Zeichen sein"
}
},
"errors" : {
Expand Down Expand Up @@ -6545,6 +6577,15 @@
"swap" : "Swappen",
"deposit" : "Einzahlen"
}
},
"InvalidMemoMina" : {
"title" : "Der Memotext darf nicht länger als 32 Zeichen sein."
},
"AccountCreationFeeWarning" : {
"title" : "Für diese Transaktion fällt eine Kontoerstellungsgebühr in Höhe von {{fee}} an"
},
"AmountTooSmall" : {
"title" : "Der Mindestbetrag für diese Transaktion beläuft sich auf {{amount}}"
}
},
"cryptoOrg" : {
Expand Down
Loading
Loading