@ledgerhq/live-countervalues-react 0.14.5 → 0.14.6-nightly.20260609030647
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +5 -6
- package/src/react.test.ts +16 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @ledgerhq/live-countervalues-react
|
|
2
2
|
|
|
3
|
+
## 0.14.6-nightly.20260609030647
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#18243](https://github.com/LedgerHQ/ledger-live/pull/18243) [`2437b0d`](https://github.com/LedgerHQ/ledger-live/commit/2437b0d319034b241e207e170a39f343bc26cab1) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Drop the unused `@ledgerhq/cryptoassets` dependency. coin-kaspa and hw-app-vet never imported it. live-countervalues and live-countervalues-react only used it in tests, which now rely on local currency fixtures, removing the dependency from the runtime graph.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c606898`](https://github.com/LedgerHQ/ledger-live/commit/c606898e4994768eadd99f2dea9575f92b3f9339), [`9ddf006`](https://github.com/LedgerHQ/ledger-live/commit/9ddf006bc2897a2393f1a9595b3c6a43d0c35bf7), [`9901502`](https://github.com/LedgerHQ/ledger-live/commit/990150200e70bc3ea55c5cfc41e1c77f24cc315b), [`d149f27`](https://github.com/LedgerHQ/ledger-live/commit/d149f271f18a1727558fa046aa6bc38c391c2649), [`2437b0d`](https://github.com/LedgerHQ/ledger-live/commit/2437b0d319034b241e207e170a39f343bc26cab1), [`d649cf3`](https://github.com/LedgerHQ/ledger-live/commit/d649cf31ecf8b2e18ab78109e6b201ff9766cc33), [`d081ef1`](https://github.com/LedgerHQ/ledger-live/commit/d081ef1892a34fa1751fba4d774867ff11bae20b), [`d19f9de`](https://github.com/LedgerHQ/ledger-live/commit/d19f9debb00e15edbaa7d2cedfcb0d2b5ced4f80), [`e6c617b`](https://github.com/LedgerHQ/ledger-live/commit/e6c617b91062f82f70d020212189a806d2452166), [`ddfb84c`](https://github.com/LedgerHQ/ledger-live/commit/ddfb84cf0caf68cfaba75aa7c015b2029051fe78), [`04e3349`](https://github.com/LedgerHQ/ledger-live/commit/04e33498ffd5d7a81ad86436a75b1562ca263356), [`cc4dd4d`](https://github.com/LedgerHQ/ledger-live/commit/cc4dd4db5e312da55966a6f0a8daa90e75e4dd94), [`bbc72fe`](https://github.com/LedgerHQ/ledger-live/commit/bbc72fe2ad0cee010349ab3b2e5a1e369dd9e840), [`8c9596d`](https://github.com/LedgerHQ/ledger-live/commit/8c9596de8eeec00f8d660a42448c6eb65c3aa9b2), [`5842a85`](https://github.com/LedgerHQ/ledger-live/commit/5842a85907c7418a393b0dffee756bff52370024)]:
|
|
10
|
+
- @ledgerhq/types-live@6.111.0-nightly.20260609030647
|
|
11
|
+
- @ledgerhq/ledger-wallet-framework@2.1.0-nightly.20260609030647
|
|
12
|
+
- @ledgerhq/live-countervalues@0.18.7-nightly.20260609030647
|
|
13
|
+
|
|
3
14
|
## 0.14.5
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-countervalues-react",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6-nightly.20260609030647",
|
|
4
4
|
"description": "Ledger Live countervalues React module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger"
|
|
@@ -25,12 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"bignumber.js": "9",
|
|
28
|
-
"@ledgerhq/types-live": "6.
|
|
28
|
+
"@ledgerhq/types-live": "6.111.0-nightly.20260609030647",
|
|
29
29
|
"@ledgerhq/types-cryptoassets": "7.37.0",
|
|
30
|
-
"@ledgerhq/
|
|
31
|
-
"@ledgerhq/
|
|
32
|
-
"@ledgerhq/live-hooks": "0.6.0"
|
|
33
|
-
"@ledgerhq/ledger-wallet-framework": "^2.0.0"
|
|
30
|
+
"@ledgerhq/live-countervalues": "0.18.7-nightly.20260609030647",
|
|
31
|
+
"@ledgerhq/ledger-wallet-framework": "^2.1.0-nightly.20260609030647",
|
|
32
|
+
"@ledgerhq/live-hooks": "0.6.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@types/node": "24.12.0",
|
package/src/react.test.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { useTrackingPairForAccounts } from ".";
|
|
2
2
|
import { genAccount } from "@ledgerhq/ledger-wallet-framework/mocks/account";
|
|
3
3
|
import { renderHook, act } from "@testing-library/react";
|
|
4
|
-
import { getFiatCurrencyByTicker } from "@ledgerhq/cryptoassets";
|
|
5
4
|
import { inferTrackingPairForAccounts } from "@ledgerhq/live-countervalues/logic";
|
|
6
5
|
import { TrackingPair } from "@ledgerhq/live-countervalues/types";
|
|
6
|
+
import type { FiatCurrency } from "@ledgerhq/types-cryptoassets";
|
|
7
|
+
|
|
8
|
+
const usd: FiatCurrency = {
|
|
9
|
+
type: "FiatCurrency",
|
|
10
|
+
name: "US Dollar",
|
|
11
|
+
ticker: "USD",
|
|
12
|
+
symbol: "$",
|
|
13
|
+
units: [{ name: "dollar", code: "USD", magnitude: 2, showAllDigits: true, prefixCode: true }],
|
|
14
|
+
};
|
|
15
|
+
const eur: FiatCurrency = {
|
|
16
|
+
type: "FiatCurrency",
|
|
17
|
+
name: "Euro",
|
|
18
|
+
ticker: "EUR",
|
|
19
|
+
symbol: "€",
|
|
20
|
+
units: [{ name: "euro", code: "EUR", magnitude: 2, showAllDigits: true, prefixCode: true }],
|
|
21
|
+
};
|
|
7
22
|
|
|
8
23
|
describe("useTrackingPairForAccounts", () => {
|
|
9
24
|
const accounts = Array(20)
|
|
10
25
|
.fill(null)
|
|
11
26
|
.map((_, i) => genAccount("test" + i));
|
|
12
|
-
const usd = getFiatCurrencyByTicker("USD");
|
|
13
|
-
const eur = getFiatCurrencyByTicker("EUR");
|
|
14
27
|
const trackingPairs = inferTrackingPairForAccounts(accounts, usd);
|
|
15
28
|
|
|
16
29
|
test("it returns same tracking pairs as when using inferTrackingPairForAccounts", async () => {
|