diff --git a/apps/cli/src/live-common-setup-base.ts b/apps/cli/src/live-common-setup-base.ts index 397bf4a700d0..29841c3ffa05 100644 --- a/apps/cli/src/live-common-setup-base.ts +++ b/apps/cli/src/live-common-setup-base.ts @@ -102,6 +102,7 @@ setSupportedCurrencies([ "zksync", "zksync_sepolia", "mantra", + "zenrock", ]); for (const k in process.env) setEnvUnsafe(k as EnvName, process.env[k]); diff --git a/apps/ledger-live-desktop/src/live-common-set-supported-currencies.ts b/apps/ledger-live-desktop/src/live-common-set-supported-currencies.ts index 6f0ee7060dad..ee30bf464456 100644 --- a/apps/ledger-live-desktop/src/live-common-set-supported-currencies.ts +++ b/apps/ledger-live-desktop/src/live-common-set-supported-currencies.ts @@ -96,4 +96,5 @@ setSupportedCurrencies([ "zksync", "zksync_sepolia", "mantra", + "zenrock", ]); diff --git a/apps/ledger-live-desktop/src/renderer/modals/AddAccounts/steps/StepChooseCurrency.tsx b/apps/ledger-live-desktop/src/renderer/modals/AddAccounts/steps/StepChooseCurrency.tsx index ff8771d32721..f7a325214247 100644 --- a/apps/ledger-live-desktop/src/renderer/modals/AddAccounts/steps/StepChooseCurrency.tsx +++ b/apps/ledger-live-desktop/src/renderer/modals/AddAccounts/steps/StepChooseCurrency.tsx @@ -85,6 +85,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => { const zksync = useFeature("currencyZkSync"); const zksyncSepolia = useFeature("currencyZkSyncSepolia"); const mantra = useFeature("currencyMantra"); + const zenrock = useFeature("currencyZenrock"); const featureFlaggedCurrencies = useMemo( (): Partial | null>> => ({ @@ -138,6 +139,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => { zksync, zksync_sepolia: zksyncSepolia, mantra, + zenrock, }), [ axelar, @@ -190,6 +192,7 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => { zksync, zksyncSepolia, mantra, + zenrock, ], ); diff --git a/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-darwin.json b/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-darwin.json index b68c11c448b1..ad81134c7289 100644 --- a/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-darwin.json +++ b/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-darwin.json @@ -808,5 +808,14 @@ "family": "cosmos", "color": "#ffb386", "decimals": 6 + }, + { + "type": "CryptoCurrency", + "id": "zenrock", + "ticker": "ROCK", + "name": "Zenrock", + "family": "cosmos", + "color": "#080c44", + "decimals": 6 } ] \ No newline at end of file diff --git a/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-linux.json b/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-linux.json index b68c11c448b1..ad81134c7289 100644 --- a/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-linux.json +++ b/apps/ledger-live-desktop/tests/specs/services/wallet-api.spec.ts-snapshots/wallet-api-currencies-linux.json @@ -808,5 +808,14 @@ "family": "cosmos", "color": "#ffb386", "decimals": 6 + }, + { + "type": "CryptoCurrency", + "id": "zenrock", + "ticker": "ROCK", + "name": "Zenrock", + "family": "cosmos", + "color": "#080c44", + "decimals": 6 } ] \ No newline at end of file diff --git a/apps/ledger-live-mobile/src/live-common-setup.ts b/apps/ledger-live-mobile/src/live-common-setup.ts index 0509a0de73a2..f9067e02c0e8 100644 --- a/apps/ledger-live-mobile/src/live-common-setup.ts +++ b/apps/ledger-live-mobile/src/live-common-setup.ts @@ -129,6 +129,7 @@ setSupportedCurrencies([ "zksync", "zksync_sepolia", "mantra", + "zenrock", ]); if (Config.BLE_LOG_LEVEL) BluetoothTransport.setLogLevel(Config.BLE_LOG_LEVEL); diff --git a/apps/ledger-live-mobile/src/screens/AddAccounts/01-SelectCrypto.tsx b/apps/ledger-live-mobile/src/screens/AddAccounts/01-SelectCrypto.tsx index 8423433e7f6d..0c35336f0cc0 100644 --- a/apps/ledger-live-mobile/src/screens/AddAccounts/01-SelectCrypto.tsx +++ b/apps/ledger-live-mobile/src/screens/AddAccounts/01-SelectCrypto.tsx @@ -107,6 +107,7 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) { const zksync = useFeature("currencyZkSync"); const zksyncSepolia = useFeature("currencyZkSyncSepolia"); const mantra = useFeature("currencyMantra"); + const zenrock = useFeature("currencyZenrock"); const featureFlaggedCurrencies = useMemo( (): Partial | null>> => ({ @@ -160,6 +161,7 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) { zksync, zksync_sepolia: zksyncSepolia, mantra, + zenrock, }), [ axelar, @@ -212,6 +214,7 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) { zksync, zksyncSepolia, mantra, + zenrock, ], ); diff --git a/apps/web-tools/live-common-setup.ts b/apps/web-tools/live-common-setup.ts index c9d959db1272..4331fae24cfa 100644 --- a/apps/web-tools/live-common-setup.ts +++ b/apps/web-tools/live-common-setup.ts @@ -70,4 +70,5 @@ setSupportedCurrencies([ "linea", "linea_sepolia", "mantra", + "zenrock", ]); diff --git a/libs/coin-framework/src/currencies/__snapshots__/formatCurrencyUnit.test.ts.snap b/libs/coin-framework/src/currencies/__snapshots__/formatCurrencyUnit.test.ts.snap index fb7b7c19a8de..37602a20d7de 100644 --- a/libs/coin-framework/src/currencies/__snapshots__/formatCurrencyUnit.test.ts.snap +++ b/libs/coin-framework/src/currencies/__snapshots__/formatCurrencyUnit.test.ts.snap @@ -324,6 +324,8 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Zcash unit (zcash) 1`] = `"123.456.789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Zenrock unit (Zenrock) 1`] = `"12.345.678.900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Zilliqa unit (ZIL) 1`] = `"12.345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -656,6 +658,8 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Zcash unit (zcash) 1`] = `"123,456,789.00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Zenrock unit (Zenrock) 1`] = `"12,345,678,900.000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Zilliqa unit (ZIL) 1`] = `"12,345.678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale en-US should correctly format dYdX unit (dYdX) 1`] = `"0.012345678900000000- -dydx"`; @@ -988,6 +992,8 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Zcash unit (zcash) 1`] = `"123.456.789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Zenrock unit (Zenrock) 1`] = `"12.345.678.900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Zilliqa unit (ZIL) 1`] = `"12.345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -1320,6 +1326,8 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Zcash unit (zcash) 1`] = `"123 456 789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Zenrock unit (Zenrock) 1`] = `"12 345 678 900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Zilliqa unit (ZIL) 1`] = `"12 345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -1652,6 +1660,8 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Zcash unit (zcash) 1`] = `"123,456,789.00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Zenrock unit (Zenrock) 1`] = `"12,345,678,900.000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Zilliqa unit (ZIL) 1`] = `"12,345.678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format dYdX unit (dYdX) 1`] = `"0.012345678900000000- -dydx"`; @@ -1984,6 +1994,8 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Zcash unit (zcash) 1`] = `"123,456,789.00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Zenrock unit (Zenrock) 1`] = `"12,345,678,900.000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Zilliqa unit (ZIL) 1`] = `"12,345.678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format dYdX unit (dYdX) 1`] = `"0.012345678900000000- -dydx"`; @@ -2316,6 +2328,8 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Zcash unit (zcash) 1`] = `"123.456.789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Zenrock unit (Zenrock) 1`] = `"12.345.678.900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Zilliqa unit (ZIL) 1`] = `"12.345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -2648,6 +2662,8 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Zcash unit (zcash) 1`] = `"123 456 789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Zenrock unit (Zenrock) 1`] = `"12 345 678 900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Zilliqa unit (ZIL) 1`] = `"12 345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -2980,6 +2996,8 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Zcash unit (zcash) 1`] = `"123.456.789,00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Zenrock unit (Zenrock) 1`] = `"12.345.678.900,000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Zilliqa unit (ZIL) 1`] = `"12.345,678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format dYdX unit (dYdX) 1`] = `"0,012345678900000000- -dydx"`; @@ -3312,6 +3330,8 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Zcash unit (zcash) 1`] = `"123,456,789.00000000- -ZEC"`; +exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Zenrock unit (Zenrock) 1`] = `"12,345,678,900.000000- -ROCK"`; + exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Zilliqa unit (ZIL) 1`] = `"12,345.678900000000- -ZIL"`; exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format dYdX unit (dYdX) 1`] = `"0.012345678900000000- -dydx"`; @@ -3644,6 +3664,8 @@ exports[`formatCurrencyUnit with default options should correctly format ZKsync exports[`formatCurrencyUnit with default options should correctly format Zcash unit (zcash) 1`] = `"123,456,789"`; +exports[`formatCurrencyUnit with default options should correctly format Zenrock unit (Zenrock) 1`] = `"12,345,678,900"`; + exports[`formatCurrencyUnit with default options should correctly format Zilliqa unit (ZIL) 1`] = `"12,345.6"`; exports[`formatCurrencyUnit with default options should correctly format dYdX unit (dYdX) 1`] = `"0.0123456"`; diff --git a/libs/coin-modules/coin-cosmos/src/chain/Zenrock.ts b/libs/coin-modules/coin-cosmos/src/chain/Zenrock.ts new file mode 100644 index 000000000000..c243537e9648 --- /dev/null +++ b/libs/coin-modules/coin-cosmos/src/chain/Zenrock.ts @@ -0,0 +1,20 @@ +import CosmosBase from "./cosmosBase"; + +class Zenrock extends CosmosBase { + stakingDocUrl: string; + unbondingPeriod: number; + prefix: string; + validatorPrefix: string; + // Provided by coin config + ledgerValidator!: string; + lcd!: string; + constructor() { + super(); + this.stakingDocUrl = ""; + this.unbondingPeriod = 21; + this.prefix = "zen"; + this.validatorPrefix = `${this.prefix}valoper`; + } +} + +export default Zenrock; diff --git a/libs/coin-modules/coin-cosmos/src/chain/chain.ts b/libs/coin-modules/coin-cosmos/src/chain/chain.ts index 0eb41b83ad07..a08f9602b25f 100644 --- a/libs/coin-modules/coin-cosmos/src/chain/chain.ts +++ b/libs/coin-modules/coin-cosmos/src/chain/chain.ts @@ -17,6 +17,7 @@ import Coreum from "./Coreum"; import Injective from "./Injective"; import Dydx from "./Dydx"; import Mantra from "./Mantra"; +import Zenrock from "./Zenrock"; const cosmosChainParams: { [key: string]: CosmosBase } = {}; export default function cryptoFactory(currencyId: string): CosmosBase { @@ -78,6 +79,9 @@ export default function cryptoFactory(currencyId: string): CosmosBase { case "mantra": cosmosChainParams[currencyId] = new Mantra(); break; + case "zenrock": + cosmosChainParams[currencyId] = new Zenrock(); + break; default: throw new Error(`${currencyId} is not supported`); } diff --git a/libs/coin-modules/coin-cosmos/src/chain/chain.unit.test.ts b/libs/coin-modules/coin-cosmos/src/chain/chain.unit.test.ts index 0e129ac5e43e..d418904d20b3 100644 --- a/libs/coin-modules/coin-cosmos/src/chain/chain.unit.test.ts +++ b/libs/coin-modules/coin-cosmos/src/chain/chain.unit.test.ts @@ -21,6 +21,7 @@ describe("cryptoFactory test", () => { "stargaze", "stride", "mantra", + "zenrock", ]; currencies.forEach(currency => { expect(cryptoFactory(currency)).not.toBeNull(); diff --git a/libs/coin-modules/coin-cosmos/src/config.ts b/libs/coin-modules/coin-cosmos/src/config.ts index 01e6c0611c4a..075e40b3fdb7 100644 --- a/libs/coin-modules/coin-cosmos/src/config.ts +++ b/libs/coin-modules/coin-cosmos/src/config.ts @@ -168,6 +168,16 @@ export const cosmosConfig: CosmosConfig = { }, }, }, + config_currency_zenrock: { + type: "object", + default: { + lcd: "https://api.diamond.zenrocklabs.io", + minGasPrice: 0.1, + status: { + type: "active", + }, + }, + }, }; import buildCoinConfig, { type CurrencyConfig } from "@ledgerhq/coin-framework/config"; diff --git a/libs/coin-modules/coin-cosmos/src/specs.ts b/libs/coin-modules/coin-cosmos/src/specs.ts index 3bc3414d37ee..edc0b896e1fc 100644 --- a/libs/coin-modules/coin-cosmos/src/specs.ts +++ b/libs/coin-modules/coin-cosmos/src/specs.ts @@ -599,6 +599,15 @@ const mantra = { }), }; +const zenrockMinimalTransactionAmount = new BigNumber(20000); +const zenrock = { + ...generateGenericCosmosTest("zenrock", false, { + minViableAmount: zenrockMinimalTransactionAmount, + mutations: cosmosLikeMutations(zenrockMinimalTransactionAmount), + skipOperationHistory: true, + }), +}; + export default { axelar, cosmos, @@ -615,4 +624,5 @@ export default { coreum, injective, mantra, + zenrock, }; diff --git a/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts b/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts index 20286d62377d..3cb566b993b1 100644 --- a/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts +++ b/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts @@ -104,6 +104,7 @@ setSupportedCurrencies([ "zksync", "zksync_sepolia", "mantra", + "zenrock", ]); LiveConfig.setConfig(liveConfig); diff --git a/libs/ledger-live-common/src/account/helpers.ts b/libs/ledger-live-common/src/account/helpers.ts index a08c1db8f86f..8fe27c476af5 100644 --- a/libs/ledger-live-common/src/account/helpers.ts +++ b/libs/ledger-live-common/src/account/helpers.ts @@ -79,6 +79,7 @@ export const getVotesCount = ( case "cosmos": case "coreum": case "mantra": + case "zenrock": return (mainAccount as CosmosAccount)?.cosmosResources?.delegations.length || 0; default: return 0; diff --git a/libs/ledger-live-common/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap b/libs/ledger-live-common/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap index 0b512765d462..13ecbf3deefb 100644 --- a/libs/ledger-live-common/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +++ b/libs/ledger-live-common/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap @@ -1636,6 +1636,7 @@ exports[`sortCurrenciesByIds snapshot 1`] = ` "zksync_sepolia", "binance_beacon_chain", "mantra", + "zenrock", "ethereum/erc20/$aapl", "ethereum/erc20/$based", "ethereum/erc20/$die", diff --git a/libs/ledger-live-common/src/currencies/mock.ts b/libs/ledger-live-common/src/currencies/mock.ts index f05492cca109..b5154dadbce1 100644 --- a/libs/ledger-live-common/src/currencies/mock.ts +++ b/libs/ledger-live-common/src/currencies/mock.ts @@ -40,6 +40,7 @@ export const IDS = [ "persistence", "onomy", "mantra", + "zenrock", ]; export const CURRENCIES_LIST: CryptoCurrency[] = [ diff --git a/libs/ledger-live-common/src/currencies/sortByMarketcap.test.ts b/libs/ledger-live-common/src/currencies/sortByMarketcap.test.ts index 903b0195de9f..0b01f5318771 100644 --- a/libs/ledger-live-common/src/currencies/sortByMarketcap.test.ts +++ b/libs/ledger-live-common/src/currencies/sortByMarketcap.test.ts @@ -32,6 +32,7 @@ test("sortCurrenciesByIds simulate staking from portfolio", () => { "persistence", "onomy", "mantra", + "zenrock", "quicksilver", ]); }); diff --git a/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap index 45ba4af65bdb..27b2f55ac428 100644 --- a/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +++ b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap @@ -3,7 +3,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` [ { - "balance": "1653056", + "balance": "1640550", "currencyId": "cosmos", "derivationMode": "", "freshAddress": "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", @@ -12,7 +12,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` "index": 0, "pendingOperations": [], "seedIdentifier": "0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a", - "spendableBalance": "123448", + "spendableBalance": "343568", "swapHistory": [], "syncHash": undefined, "used": true, @@ -35,7 +35,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` "xpub": "cosmos108uy5q9jt59gwugq5yrdhkzcd9jryslmpcstk5", }, { - "balance": "283297", + "balance": "270551", "currencyId": "cosmos", "derivationMode": "", "freshAddress": "cosmos1cgc696ay2pg6d4gcejek2y8la66j7e5y3c7kyw", @@ -44,7 +44,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` "index": 2, "pendingOperations": [], "seedIdentifier": "0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a", - "spendableBalance": "15348", + "spendableBalance": "2602", "swapHistory": [], "syncHash": undefined, "used": true, @@ -67,7 +67,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` "xpub": "cosmos14tg4vsd0q745fxhzn329pkx0krqtszcxyzl5ku", }, { - "balance": "13833", + "balance": "0", "currencyId": "cosmos", "derivationMode": "", "freshAddress": "cosmos18q6ad294dw5wf7nueq7ctleehxh9fgt8dcecr9", @@ -76,7 +76,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = ` "index": 4, "pendingOperations": [], "seedIdentifier": "0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a", - "spendableBalance": "13833", + "spendableBalance": "0", "swapHistory": [], "syncHash": undefined, "used": true, @@ -173,6 +173,30 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "DELEGATE", "value": "6250", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23259007, + "extra": { + "memo": "Ledger Live", + "sourceValidator": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "validators": [ + { + "address": "cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c", + "amount": "1000", + }, + ], + }, + "fee": "24674", + "hasFailed": false, + "hash": "0801EA295E478958C28C80A078D9B5F7A31FBAAF35446BB3C1A34B0063FCC31D", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-0801EA295E478958C28C80A078D9B5F7A31FBAAF35446BB3C1A34B0063FCC31D-REDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 151, + "type": "REDELEGATE", + "value": "24674", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -631,6 +655,29 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "DELEGATE", "value": "10233", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258999, + "extra": { + "memo": "Ledger Live", + "validators": [ + { + "address": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "amount": "1000", + }, + ], + }, + "fee": "9267", + "hasFailed": false, + "hash": "358651A67517D2C4F3F3FDC2C425A90843E839E561094F93CB1FDBAFA61F3D6B", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-358651A67517D2C4F3F3FDC2C425A90843E839E561094F93CB1FDBAFA61F3D6B-DELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 150, + "type": "DELEGATE", + "value": "9267", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -707,6 +754,27 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "5286", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258811, + "extra": { + "memo": "FROMSAMY", + }, + "fee": "2790", + "hasFailed": false, + "hash": "419EF8A9E89F48A48421BBD784768C2A376BC67BD2C08DC4D047707D0615AE7C", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-419EF8A9E89F48A48421BBD784768C2A376BC67BD2C08DC4D047707D0615AE7C-IN", + "recipients": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "senders": [ + "cosmos1g6evzkcnjyy3nfxyu5jdl5nw3pweshv8sqd26c", + ], + "transactionSequenceNumber": 9, + "type": "IN", + "value": "1000000", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -750,6 +818,30 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "REDELEGATE", "value": "7500", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23257943, + "extra": { + "memo": "Ledger Live", + "sourceValidator": "cosmosvaloper156gqf9837u7d4c4678yt3rl4ls9c5vuursrrzf", + "validators": [ + { + "address": "cosmosvaloper10wljxpl03053h9690apmyeakly3ylhejrucvtm", + "amount": "18978", + }, + ], + }, + "fee": "33332", + "hasFailed": false, + "hash": "4486AA51F00DF071A50574B3A9E951F880023D41322669B305D243C4003E0418", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-4486AA51F00DF071A50574B3A9E951F880023D41322669B305D243C4003E0418-REDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 143, + "type": "REDELEGATE", + "value": "33332", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -774,6 +866,29 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "REDELEGATE", "value": "80517", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258910, + "extra": { + "memo": "Ledger Live", + "validators": [ + { + "address": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "amount": "1000", + }, + ], + }, + "fee": "7955", + "hasFailed": false, + "hash": "4F698C06B845451CA6A26BD9D716316D9691E1743609159D199CEDDF00CC45ED", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-4F698C06B845451CA6A26BD9D716316D9691E1743609159D199CEDDF00CC45ED-DELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 148, + "type": "DELEGATE", + "value": "7955", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -1028,6 +1143,25 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "4340", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23437965, + "extra": {}, + "fee": "1073", + "hasFailed": false, + "hash": "7931308440251BB22C73842AE7FD5C5DB9A58E9EC1691D365F1846D0C92B372C", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-7931308440251BB22C73842AE7FD5C5DB9A58E9EC1691D365F1846D0C92B372C-OUT", + "recipients": [ + "osmo10a3k4hvk37cc4hnxctw4p95fhscd2z6h2rmx0aukc6rm8u9qqx9smfsh7u", + ], + "senders": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "transactionSequenceNumber": 152, + "type": "OUT", + "value": "401073", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -1194,6 +1328,30 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "5286", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258863, + "extra": { + "memo": "Ledger Live", + "sourceValidator": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "validators": [ + { + "address": "cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c", + "amount": "10000", + }, + ], + }, + "fee": "19500", + "hasFailed": false, + "hash": "8741EEBE3F516449C3CCCF66ED92FB4F5EF9DB265739C4D6CAFF89C5014B43F4", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-8741EEBE3F516449C3CCCF66ED92FB4F5EF9DB265739C4D6CAFF89C5014B43F4-REDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 147, + "type": "REDELEGATE", + "value": "19500", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -1356,6 +1514,30 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "6178", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258918, + "extra": { + "memo": "Ledger Live", + "sourceValidator": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "validators": [ + { + "address": "cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c", + "amount": "1000", + }, + ], + }, + "fee": "24612", + "hasFailed": false, + "hash": "9A3CE7CABDF7271DB74500D9B46285C3B5E955955C9401825EABD092A12CA781", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-9A3CE7CABDF7271DB74500D9B46285C3B5E955955C9401825EABD092A12CA781-REDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 149, + "type": "REDELEGATE", + "value": "24612", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -1647,6 +1829,30 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "103791", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258127, + "extra": { + "memo": "Ledger Live", + "sourceValidator": "cosmosvaloper1hjct6q7npsspsg3dgvzk3sdf89spmlpfdn6m9d", + "validators": [ + { + "address": "cosmosvaloper1clpqr4nrk4khgkxj78fcwwh6dl3uw4epsluffn", + "amount": "8417", + }, + ], + }, + "fee": "33335", + "hasFailed": false, + "hash": "B5BB73618C0FF857DB2B5EC601886A9AA8283F62E5738AB3DA7B710C9BDEABBC", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-B5BB73618C0FF857DB2B5EC601886A9AA8283F62E5738AB3DA7B710C9BDEABBC-REDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 144, + "type": "REDELEGATE", + "value": "33335", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -1955,6 +2161,29 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "REDELEGATE", "value": "9850", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23040103, + "extra": { + "memo": "Ledger Live", + "validators": [ + { + "address": "cosmosvaloper10wljxpl03053h9690apmyeakly3ylhejrucvtm", + "amount": "50000", + }, + ], + }, + "fee": "17659", + "hasFailed": false, + "hash": "D3C380962F51ACD5F292B28E0ADB4CAA2507E224C082ECC5E043BA05F63D69AD", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-D3C380962F51ACD5F292B28E0ADB4CAA2507E224C082ECC5E043BA05F63D69AD-DELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 142, + "type": "DELEGATE", + "value": "17659", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -2061,6 +2290,67 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "IN", "value": "8800", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258456, + "extra": {}, + "fee": "3081", + "hasFailed": false, + "hash": "E0AF83410D7893F5AE4EBBFC20F77310D1F65EC7CC91BFC0729F1FD84F9B8A31", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-E0AF83410D7893F5AE4EBBFC20F77310D1F65EC7CC91BFC0729F1FD84F9B8A31-IN", + "recipients": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "senders": [ + "cosmos18q6ad294dw5wf7nueq7ctleehxh9fgt8dcecr9", + ], + "transactionSequenceNumber": 0, + "type": "IN", + "value": "10752", + }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258504, + "extra": { + "memo": "Ledger Live", + "validators": [ + { + "address": "cosmosvaloper10wljxpl03053h9690apmyeakly3ylhejrucvtm", + "amount": "294625", + }, + ], + }, + "fee": "15993", + "hasFailed": false, + "hash": "EDD4FDAA421A7DFE72DD7C3CF7C479129C3C933E862850468128C3B439178FD1", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-EDD4FDAA421A7DFE72DD7C3CF7C479129C3C933E862850468128C3B439178FD1-UNDELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 145, + "type": "UNDELEGATE", + "value": "15993", + }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258494, + "extra": {}, + "fee": "2746", + "hasFailed": false, + "hash": "EE18525B84240DEA8EE0B3A993E1B790ABBC121E9B2FE0099D81455AB924DB54", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-EE18525B84240DEA8EE0B3A993E1B790ABBC121E9B2FE0099D81455AB924DB54-IN", + "recipients": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "senders": [ + "cosmos1cgc696ay2pg6d4gcejek2y8la66j7e5y3c7kyw", + ], + "transactionSequenceNumber": 36, + "type": "IN", + "value": "10000", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -2080,6 +2370,27 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "IN", "value": "50000", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23528802, + "extra": { + "memo": "OsmosisFE", + }, + "fee": "5661", + "hasFailed": false, + "hash": "F65F217DB93523BA48F5B902C052241B18BEA05CB037B92F424B5B17FC3AA795", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-F65F217DB93523BA48F5B902C052241B18BEA05CB037B92F424B5B17FC3AA795-OUT", + "recipients": [ + "osmo1g84934jpu3v5de5yqukkkhxmcvsw3u2a6al3md", + ], + "senders": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "transactionSequenceNumber": 153, + "type": "OUT", + "value": "451160", + }, { "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", "blockHash": null, @@ -2103,6 +2414,29 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "REWARD", "value": "281690", }, + { + "accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:", + "blockHash": null, + "blockHeight": 23258848, + "extra": { + "memo": "Ledger Live", + "validators": [ + { + "address": "cosmosvaloper1q6d3d089hg59x6gcx92uumx70s5y5wadklue8s", + "amount": "10000", + }, + ], + }, + "fee": "9289", + "hasFailed": false, + "hash": "FFCAC73EB50698A6BD7B7B87A1DCC5D75FE47352C8BD8D2A5D777A947C1E5487", + "id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-FFCAC73EB50698A6BD7B7B87A1DCC5D75FE47352C8BD8D2A5D777A947C1E5487-DELEGATE", + "recipients": [], + "senders": [], + "transactionSequenceNumber": 146, + "type": "DELEGATE", + "value": "9289", + }, ], [ { @@ -3232,6 +3566,25 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "OUT", "value": "103342", }, + { + "accountId": "js:2:cosmos:cosmos1cgc696ay2pg6d4gcejek2y8la66j7e5y3c7kyw:", + "blockHash": null, + "blockHeight": 23258494, + "extra": {}, + "fee": "2746", + "hasFailed": false, + "hash": "EE18525B84240DEA8EE0B3A993E1B790ABBC121E9B2FE0099D81455AB924DB54", + "id": "js:2:cosmos:cosmos1cgc696ay2pg6d4gcejek2y8la66j7e5y3c7kyw:-EE18525B84240DEA8EE0B3A993E1B790ABBC121E9B2FE0099D81455AB924DB54-OUT", + "recipients": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "senders": [ + "cosmos1cgc696ay2pg6d4gcejek2y8la66j7e5y3c7kyw", + ], + "transactionSequenceNumber": 36, + "type": "OUT", + "value": "12746", + }, ], [ { @@ -3369,6 +3722,25 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = ` "type": "IN", "value": "12833", }, + { + "accountId": "js:2:cosmos:cosmos18q6ad294dw5wf7nueq7ctleehxh9fgt8dcecr9:", + "blockHash": null, + "blockHeight": 23258456, + "extra": {}, + "fee": "3081", + "hasFailed": false, + "hash": "E0AF83410D7893F5AE4EBBFC20F77310D1F65EC7CC91BFC0729F1FD84F9B8A31", + "id": "js:2:cosmos:cosmos18q6ad294dw5wf7nueq7ctleehxh9fgt8dcecr9:-E0AF83410D7893F5AE4EBBFC20F77310D1F65EC7CC91BFC0729F1FD84F9B8A31-OUT", + "recipients": [ + "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl", + ], + "senders": [ + "cosmos18q6ad294dw5wf7nueq7ctleehxh9fgt8dcecr9", + ], + "transactionSequenceNumber": 0, + "type": "OUT", + "value": "13833", + }, ], [], ] diff --git a/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap index 6c5a83e56382..bb879e4cbb75 100644 --- a/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap +++ b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap @@ -39,128 +39,7 @@ exports[`mantra currency bridge scanAccounts mantra seed 1 1`] = ` exports[`mantra currency bridge scanAccounts mantra seed 1 2`] = ` [ - [ - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 446099, - "extra": {}, - "fee": "1950", - "hasFailed": false, - "hash": "4855629335DD67EEB42CC089311697D7F5FAE587CD7E33F81E0AAE5227B4FB8F", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-4855629335DD67EEB42CC089311697D7F5FAE587CD7E33F81E0AAE5227B4FB8F-IN", - "recipients": [ - "mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn", - ], - "senders": [ - "mantra1g84934jpu3v5de5yqukkkhxmcvsw3u2aedx9w9", - ], - "transactionSequenceNumber": 6, - "type": "IN", - "value": "1000000", - }, - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 446137, - "extra": {}, - "fee": "1949", - "hasFailed": false, - "hash": "8F9934B90FC0006941F24FA783970CCC6480F991725E8D7A0BFDB3E917DECCB0", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-8F9934B90FC0006941F24FA783970CCC6480F991725E8D7A0BFDB3E917DECCB0-OUT", - "recipients": [ - "mantra1g84934jpu3v5de5yqukkkhxmcvsw3u2aedx9w9", - ], - "senders": [ - "mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn", - ], - "transactionSequenceNumber": 1, - "type": "OUT", - "value": "301949", - }, - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 446147, - "extra": { - "memo": "Ledger Live", - }, - "fee": "2385", - "hasFailed": false, - "hash": "AAC85BCAA8EB83298CABABB6A6574082C056092C7139FD8C8ED8849A207B8C8A", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-AAC85BCAA8EB83298CABABB6A6574082C056092C7139FD8C8ED8849A207B8C8A-REWARD", - "recipients": [], - "senders": [], - "transactionSequenceNumber": 2, - "type": "REWARD", - "value": "0", - }, - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 446122, - "extra": { - "memo": "Ledger Live", - "validators": [ - { - "address": "mantravaloper1y8hxa8q0qk6h2fxtugkx67re38k03888eeqmpd", - "amount": "500000", - }, - ], - }, - "fee": "2906", - "hasFailed": false, - "hash": "B1FE340869D47C458F2B6CCD6029E9996B3CC957BE01E8426A7686E50B2987B4", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-B1FE340869D47C458F2B6CCD6029E9996B3CC957BE01E8426A7686E50B2987B4-DELEGATE", - "recipients": [], - "senders": [], - "transactionSequenceNumber": 0, - "type": "DELEGATE", - "value": "2906", - }, - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 445531, - "extra": {}, - "fee": "2125", - "hasFailed": false, - "hash": "E6FA7ACE758FE1C371CDE0503651D07D3F25F65BE2A57B642CC5F3B3D6A3A5F7", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-E6FA7ACE758FE1C371CDE0503651D07D3F25F65BE2A57B642CC5F3B3D6A3A5F7-IN", - "recipients": [ - "mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn", - ], - "senders": [ - "mantra1g84934jpu3v5de5yqukkkhxmcvsw3u2aedx9w9", - ], - "transactionSequenceNumber": 5, - "type": "IN", - "value": "20000", - }, - { - "accountId": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:", - "blockHash": null, - "blockHeight": 620191, - "extra": { - "memo": "Ledger Live", - "validators": [ - { - "address": "mantravaloper1y8hxa8q0qk6h2fxtugkx67re38k03888eeqmpd", - "amount": "10000", - }, - ], - }, - "fee": "3331", - "hasFailed": false, - "hash": "FD8D25ECA06DC0EB86864C40BB445A52919C7D12C2957BB74F7FA0122E0A4DFD", - "id": "js:2:mantra:mantra1gyauvl44q2apn3u3aujm36q8zrj74vry7n5nvn:-FD8D25ECA06DC0EB86864C40BB445A52919C7D12C2957BB74F7FA0122E0A4DFD-DELEGATE", - "recipients": [], - "senders": [], - "transactionSequenceNumber": 3, - "type": "DELEGATE", - "value": "3331", - }, - ], + [], [], ] `; diff --git a/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/zenrock.integration.test.ts.snap b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/zenrock.integration.test.ts.snap new file mode 100644 index 000000000000..3251a02d8498 --- /dev/null +++ b/libs/ledger-live-common/src/families/cosmos/datasets/__snapshots__/zenrock.integration.test.ts.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`zenrock currency bridge scanAccounts zenrock seed 1 1`] = ` +[ + { + "balance": "0", + "currencyId": "zenrock", + "derivationMode": "", + "freshAddress": "zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc", + "freshAddressPath": "44'/118'/0'/0/0", + "id": "js:2:zenrock:zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc:", + "index": 0, + "pendingOperations": [], + "seedIdentifier": "03d5e0ebb3f1ae2afe87e5d5a24b5029a59cc12f8fd1056840091b2f0b97e54e83", + "spendableBalance": "0", + "swapHistory": [], + "syncHash": undefined, + "used": false, + "xpub": "zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc", + }, +] +`; + +exports[`zenrock currency bridge scanAccounts zenrock seed 1 2`] = ` +[ + [], +] +`; diff --git a/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.integration.test.ts b/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.integration.test.ts new file mode 100644 index 000000000000..72d528893fab --- /dev/null +++ b/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.integration.test.ts @@ -0,0 +1,14 @@ +import { DatasetTest } from "@ledgerhq/types-live"; +import { testBridge } from "../../../__tests__/test-helpers/bridge"; +import "../../../__tests__/test-helpers/setup"; +import type { Transaction } from "../types"; +import zenrock from "./zenrock"; + +const dataset: DatasetTest = { + implementations: ["js"], + currencies: { + zenrock, + }, +}; + +testBridge(dataset); diff --git a/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.ts b/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.ts new file mode 100644 index 000000000000..2056fd9b9e97 --- /dev/null +++ b/libs/ledger-live-common/src/families/cosmos/datasets/zenrock.ts @@ -0,0 +1,67 @@ +import { fromTransactionRaw } from "@ledgerhq/coin-cosmos/transaction"; +import { CurrenciesData } from "@ledgerhq/types-live"; +import { BigNumber } from "bignumber.js"; +import type { Transaction } from "../types"; + +const dataset: CurrenciesData = { + FIXME_ignoreAccountFields: ["cosmosResources", "operationsCount", "operations"], + FIXME_ignorePreloadFields: ["validators"], + scanAccounts: [ + { + name: "zenrock seed 1", + apdus: ` + => 5504000018037a656e2c00008076000080000000800000000000000000 + <= 03d5e0ebb3f1ae2afe87e5d5a24b5029a59cc12f8fd1056840091b2f0b97e54e837a656e3167796175766c3434713261706e33753361756a6d333671387a726a37347672793034766b72639000 + => 5504000018037a656e2c00008076000080000000800000000000000000 + <= 03d5e0ebb3f1ae2afe87e5d5a24b5029a59cc12f8fd1056840091b2f0b97e54e837a656e3167796175766c3434713261706e33753361756a6d333671387a726a37347672793034766b72639000 + `, + }, + ], + accounts: [ + { + FIXME_tests: ["balance is sum of ops", "pendingOperations are cleaned up"], + raw: { + id: "js:2:zenrock:zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc:", + seedIdentifier: "03d5e0ebb3f1ae2afe87e5d5a24b5029a59cc12f8fd1056840091b2f0b97e54e83", + freshAddress: "zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc", + xpub: "zen1gyauvl44q2apn3u3aujm36q8zrj74vry04vkrc", + freshAddressPath: "44'/118'/0'/0/0", + derivationMode: "", + index: 0, + currencyId: "zenrock", + operationsCount: 0, + operations: [], + pendingOperations: [], + lastSyncDate: "", + balance: "0", + spendableBalance: "0", + blockHeight: 431928, + }, + transactions: [ + { + name: "Normal transaction", + transaction: fromTransactionRaw({ + amount: "10000", + recipient: "zen1704dk997ccmk5x8smn8secphckfvbgxxfd99ssr", + useAllAmount: false, + family: "cosmos", + mode: "send", + networkInfo: null, + fees: "8744", + gas: "87440", + validators: [], + memo: "", + sourceValidator: "", + }), + expectedStatus: () => ({ + errors: {}, + warnings: {}, + amount: BigNumber("10000"), + }), + }, + ], + }, + ], +}; + +export default dataset; diff --git a/libs/ledger-live-common/src/featureFlags/defaultFeatures.ts b/libs/ledger-live-common/src/featureFlags/defaultFeatures.ts index 38e52e64b3c2..aa3e77ebf279 100644 --- a/libs/ledger-live-common/src/featureFlags/defaultFeatures.ts +++ b/libs/ledger-live-common/src/featureFlags/defaultFeatures.ts @@ -83,6 +83,7 @@ export const CURRENCY_DEFAULT_FEATURES = { currencyZkSync: DEFAULT_FEATURE, currencyZkSyncSepolia: DEFAULT_FEATURE, currencyMantra: DEFAULT_FEATURE, + currencyZenrock: DEFAULT_FEATURE, }; /** diff --git a/libs/ledgerjs/packages/cryptoassets/src/abandonseed.ts b/libs/ledgerjs/packages/cryptoassets/src/abandonseed.ts index 0eed424a6c34..d755e6ac8a03 100644 --- a/libs/ledgerjs/packages/cryptoassets/src/abandonseed.ts +++ b/libs/ledgerjs/packages/cryptoassets/src/abandonseed.ts @@ -113,6 +113,7 @@ const abandonSeedAddresses: Partial> = { zksync: EVM_DEAD_ADDRESS, zksync_sepolia: EVM_DEAD_ADDRESS, mantra: "mantra12jypwtxm7npfszx5x9780fhz0j3ken696fdp33", + zenrock: "zen1704dk997ccmk5x8smn8secphckfvbgxxfd99xxr", }; /** diff --git a/libs/ledgerjs/packages/cryptoassets/src/currencies.ts b/libs/ledgerjs/packages/cryptoassets/src/currencies.ts index d329e4269816..261fa2dbd274 100644 --- a/libs/ledgerjs/packages/cryptoassets/src/currencies.ts +++ b/libs/ledgerjs/packages/cryptoassets/src/currencies.ts @@ -4348,6 +4348,35 @@ export const cryptocurrenciesById: Record = { }, ], }, + zenrock: { + type: "CryptoCurrency", + id: "zenrock", + coinType: CoinType.ATOM, + name: "Zenrock", + managerAppName: "Cosmos", + ticker: "ROCK", + scheme: "zenrock", + color: "#080c44", + family: "cosmos", + units: [ + { + name: "Zenrock", + code: "ROCK", + magnitude: 6, + }, + { + name: "Micro-Zenrock", + code: "urock", + magnitude: 0, + }, + ], + explorerViews: [ + { + tx: "https://explorer.diamond.zenrocklabs.io/transactions/$hash", + address: "https://explorer.diamond.zenrocklabs.io/validators/$address", + }, + ], + }, }; const cryptocurrenciesByScheme: Record = {}; diff --git a/libs/ledgerjs/packages/types-cryptoassets/src/index.ts b/libs/ledgerjs/packages/types-cryptoassets/src/index.ts index b9b0bc1d672e..6280c7b10e6a 100644 --- a/libs/ledgerjs/packages/types-cryptoassets/src/index.ts +++ b/libs/ledgerjs/packages/types-cryptoassets/src/index.ts @@ -148,7 +148,6 @@ export type CryptoCurrencyId = | "syscoin" | "internet_computer" | "injective" - | "mantra" | "telos_evm" | "klaytn" | "polygon_zk_evm" @@ -167,7 +166,8 @@ export type CryptoCurrencyId = | "etherlink" | "zksync" | "zksync_sepolia" - | "mantra"; + | "mantra" + | "zenrock"; export type LedgerExplorerId = | "btc" diff --git a/libs/ledgerjs/packages/types-live/src/feature.ts b/libs/ledgerjs/packages/types-live/src/feature.ts index 67c5ff181e93..e726ad4c4231 100644 --- a/libs/ledgerjs/packages/types-live/src/feature.ts +++ b/libs/ledgerjs/packages/types-live/src/feature.ts @@ -124,6 +124,7 @@ export type CurrencyFeatures = { currencyZkSync: DefaultFeature; currencyZkSyncSepolia: DefaultFeature; currencyMantra: DefaultFeature; + currencyZenrock: DefaultFeature; }; /** diff --git a/libs/ui/packages/crypto-icons/src/svg/ROCK.svg b/libs/ui/packages/crypto-icons/src/svg/ROCK.svg new file mode 100644 index 000000000000..dd39dd79692b --- /dev/null +++ b/libs/ui/packages/crypto-icons/src/svg/ROCK.svg @@ -0,0 +1,10 @@ + + + + + + + + + +