Skip to content

Commit ba4d56f

Browse files
committed
feat: adding adi currency support
1 parent 0d48370 commit ba4d56f

File tree

18 files changed

+287
-0
lines changed

18 files changed

+287
-0
lines changed

.changeset/shy-balloons-sniff.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@ledgerhq/cryptoassets": minor
3+
"@ledgerhq/types-live": minor
4+
"@ledgerhq/coin-evm": minor
5+
"@ledgerhq/live-currency-format": minor
6+
"ledger-live-desktop": minor
7+
"live-mobile": minor
8+
"@ledgerhq/live-common": minor
9+
"@ledgerhq/web-tools": minor
10+
"@ledgerhq/live-cli": minor
11+
---
12+
13+
adding adi currency support

apps/cli/src/live-common-setup-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ setWalletAPIVersion(WALLET_API_VERSION);
1313
setSupportedCurrencies([
1414
"aptos",
1515
"aptos_testnet",
16+
"adi",
1617
"bitcoin",
1718
"ethereum",
1819
"bsc",

apps/ledger-live-desktop/src/live-common-set-supported-currencies.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ setSupportedCurrencies([
6565
"near",
6666
"aptos",
6767
"aptos_testnet",
68+
"adi",
6869
"icon",
6970
"icon_berlin_testnet",
7071
"optimism",

apps/ledger-live-desktop/tests/fixtures/wallet-api.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,15 @@ export const expectedCurrencyList = [
717717
color: "#FFCD29",
718718
decimals: 8,
719719
},
720+
{
721+
type: "CryptoCurrency",
722+
id: "adi",
723+
ticker: "ADI",
724+
name: "Adi",
725+
family: "ethereum",
726+
color: "#0066CC",
727+
decimals: 18,
728+
},
720729
{
721730
type: "CryptoCurrency",
722731
id: "optimism",

apps/ledger-live-mobile/src/live-common-setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ setSupportedCurrencies([
122122
"lukso",
123123
"aptos",
124124
"aptos_testnet",
125+
"adi",
125126
"linea",
126127
"linea_sepolia",
127128
"blast",

apps/ledger-live-mobile/src/mvvm/features/Web3Hub/utils/api/mocks/manifests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export const mocks: AppManifest[] = [
145145
"somnia",
146146
"zero_gravity",
147147
"unichain",
148+
"adi",
148149
],
149150
content: {
150151
shortDescription: {

apps/web-tools/src/live-common-setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ setSupportedCurrencies([
4343
"decred",
4444
"digibyte",
4545
"algorand",
46+
"adi",
4647
"qtum",
4748
"bitcoin_gold",
4849
"komodo",

libs/coin-modules/coin-evm/src/editTransaction/__snapshots__/getFormattedFeeFields.test.ts.snap

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale de-DE should correctly
99
}
1010
`;
1111

12+
exports[`getFormattedFeeFields with tx type 0 with locale de-DE should correctly format fee fields for Adi unit 1`] = `
13+
{
14+
"formattedFeeValue": "0,000105 ADI",
15+
"formattedGasPrice": "0 ADI",
16+
"formattedMaxFeePerGas": "0 ADI",
17+
"formattedMaxPriorityFeePerGas": "0 ADI",
18+
}
19+
`;
20+
1221
exports[`getFormattedFeeFields with tx type 0 with locale de-DE should correctly format fee fields for Akroma unit 1`] = `
1322
{
1423
"formattedFeeValue": "1.050.000 AKA",
@@ -720,6 +729,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale en-US should correctly
720729
}
721730
`;
722731

732+
exports[`getFormattedFeeFields with tx type 0 with locale en-US should correctly format fee fields for Adi unit 1`] = `
733+
{
734+
"formattedFeeValue": "0.000105 ADI",
735+
"formattedGasPrice": "0 ADI",
736+
"formattedMaxFeePerGas": "0 ADI",
737+
"formattedMaxPriorityFeePerGas": "0 ADI",
738+
}
739+
`;
740+
723741
exports[`getFormattedFeeFields with tx type 0 with locale en-US should correctly format fee fields for Akroma unit 1`] = `
724742
{
725743
"formattedFeeValue": "1,050,000 AKA",
@@ -1431,6 +1449,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale es-ES should correctly
14311449
}
14321450
`;
14331451

1452+
exports[`getFormattedFeeFields with tx type 0 with locale es-ES should correctly format fee fields for Adi unit 1`] = `
1453+
{
1454+
"formattedFeeValue": "0,000105 ADI",
1455+
"formattedGasPrice": "0 ADI",
1456+
"formattedMaxFeePerGas": "0 ADI",
1457+
"formattedMaxPriorityFeePerGas": "0 ADI",
1458+
}
1459+
`;
1460+
14341461
exports[`getFormattedFeeFields with tx type 0 with locale es-ES should correctly format fee fields for Akroma unit 1`] = `
14351462
{
14361463
"formattedFeeValue": "1.050.000 AKA",
@@ -2142,6 +2169,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale fr-FR should correctly
21422169
}
21432170
`;
21442171

2172+
exports[`getFormattedFeeFields with tx type 0 with locale fr-FR should correctly format fee fields for Adi unit 1`] = `
2173+
{
2174+
"formattedFeeValue": "0,000105 ADI",
2175+
"formattedGasPrice": "0 ADI",
2176+
"formattedMaxFeePerGas": "0 ADI",
2177+
"formattedMaxPriorityFeePerGas": "0 ADI",
2178+
}
2179+
`;
2180+
21452181
exports[`getFormattedFeeFields with tx type 0 with locale fr-FR should correctly format fee fields for Akroma unit 1`] = `
21462182
{
21472183
"formattedFeeValue": "1 050 000 AKA",
@@ -2853,6 +2889,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale ja-JP should correctly
28532889
}
28542890
`;
28552891

2892+
exports[`getFormattedFeeFields with tx type 0 with locale ja-JP should correctly format fee fields for Adi unit 1`] = `
2893+
{
2894+
"formattedFeeValue": "0.000105 ADI",
2895+
"formattedGasPrice": "0 ADI",
2896+
"formattedMaxFeePerGas": "0 ADI",
2897+
"formattedMaxPriorityFeePerGas": "0 ADI",
2898+
}
2899+
`;
2900+
28562901
exports[`getFormattedFeeFields with tx type 0 with locale ja-JP should correctly format fee fields for Akroma unit 1`] = `
28572902
{
28582903
"formattedFeeValue": "1,050,000 AKA",
@@ -3564,6 +3609,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale ko-KR should correctly
35643609
}
35653610
`;
35663611

3612+
exports[`getFormattedFeeFields with tx type 0 with locale ko-KR should correctly format fee fields for Adi unit 1`] = `
3613+
{
3614+
"formattedFeeValue": "0.000105 ADI",
3615+
"formattedGasPrice": "0 ADI",
3616+
"formattedMaxFeePerGas": "0 ADI",
3617+
"formattedMaxPriorityFeePerGas": "0 ADI",
3618+
}
3619+
`;
3620+
35673621
exports[`getFormattedFeeFields with tx type 0 with locale ko-KR should correctly format fee fields for Akroma unit 1`] = `
35683622
{
35693623
"formattedFeeValue": "1,050,000 AKA",
@@ -4275,6 +4329,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale pt-BR should correctly
42754329
}
42764330
`;
42774331

4332+
exports[`getFormattedFeeFields with tx type 0 with locale pt-BR should correctly format fee fields for Adi unit 1`] = `
4333+
{
4334+
"formattedFeeValue": "0,000105 ADI",
4335+
"formattedGasPrice": "0 ADI",
4336+
"formattedMaxFeePerGas": "0 ADI",
4337+
"formattedMaxPriorityFeePerGas": "0 ADI",
4338+
}
4339+
`;
4340+
42784341
exports[`getFormattedFeeFields with tx type 0 with locale pt-BR should correctly format fee fields for Akroma unit 1`] = `
42794342
{
42804343
"formattedFeeValue": "1.050.000 AKA",
@@ -4986,6 +5049,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale ru-RU should correctly
49865049
}
49875050
`;
49885051

5052+
exports[`getFormattedFeeFields with tx type 0 with locale ru-RU should correctly format fee fields for Adi unit 1`] = `
5053+
{
5054+
"formattedFeeValue": "0,000105 ADI",
5055+
"formattedGasPrice": "0 ADI",
5056+
"formattedMaxFeePerGas": "0 ADI",
5057+
"formattedMaxPriorityFeePerGas": "0 ADI",
5058+
}
5059+
`;
5060+
49895061
exports[`getFormattedFeeFields with tx type 0 with locale ru-RU should correctly format fee fields for Akroma unit 1`] = `
49905062
{
49915063
"formattedFeeValue": "1 050 000 AKA",
@@ -5697,6 +5769,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale tr-TR should correctly
56975769
}
56985770
`;
56995771

5772+
exports[`getFormattedFeeFields with tx type 0 with locale tr-TR should correctly format fee fields for Adi unit 1`] = `
5773+
{
5774+
"formattedFeeValue": "0,000105 ADI",
5775+
"formattedGasPrice": "0 ADI",
5776+
"formattedMaxFeePerGas": "0 ADI",
5777+
"formattedMaxPriorityFeePerGas": "0 ADI",
5778+
}
5779+
`;
5780+
57005781
exports[`getFormattedFeeFields with tx type 0 with locale tr-TR should correctly format fee fields for Akroma unit 1`] = `
57015782
{
57025783
"formattedFeeValue": "1.050.000 AKA",
@@ -6408,6 +6489,15 @@ exports[`getFormattedFeeFields with tx type 0 with locale zh-CN should correctly
64086489
}
64096490
`;
64106491

6492+
exports[`getFormattedFeeFields with tx type 0 with locale zh-CN should correctly format fee fields for Adi unit 1`] = `
6493+
{
6494+
"formattedFeeValue": "0.000105 ADI",
6495+
"formattedGasPrice": "0 ADI",
6496+
"formattedMaxFeePerGas": "0 ADI",
6497+
"formattedMaxPriorityFeePerGas": "0 ADI",
6498+
}
6499+
`;
6500+
64116501
exports[`getFormattedFeeFields with tx type 0 with locale zh-CN should correctly format fee fields for Akroma unit 1`] = `
64126502
{
64136503
"formattedFeeValue": "1,050,000 AKA",
@@ -7119,6 +7209,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale de-DE should correctly
71197209
}
71207210
`;
71217211

7212+
exports[`getFormattedFeeFields with tx type 2 with locale de-DE should correctly format fee fields for Adi unit 1`] = `
7213+
{
7214+
"formattedFeeValue": "0,000042 ADI",
7215+
"formattedGasPrice": "0 ADI",
7216+
"formattedMaxFeePerGas": "0 ADI",
7217+
"formattedMaxPriorityFeePerGas": "0 ADI",
7218+
}
7219+
`;
7220+
71227221
exports[`getFormattedFeeFields with tx type 2 with locale de-DE should correctly format fee fields for Akroma unit 1`] = `
71237222
{
71247223
"formattedFeeValue": "420.000 AKA",
@@ -7830,6 +7929,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale en-US should correctly
78307929
}
78317930
`;
78327931

7932+
exports[`getFormattedFeeFields with tx type 2 with locale en-US should correctly format fee fields for Adi unit 1`] = `
7933+
{
7934+
"formattedFeeValue": "0.000042 ADI",
7935+
"formattedGasPrice": "0 ADI",
7936+
"formattedMaxFeePerGas": "0 ADI",
7937+
"formattedMaxPriorityFeePerGas": "0 ADI",
7938+
}
7939+
`;
7940+
78337941
exports[`getFormattedFeeFields with tx type 2 with locale en-US should correctly format fee fields for Akroma unit 1`] = `
78347942
{
78357943
"formattedFeeValue": "420,000 AKA",
@@ -8541,6 +8649,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale es-ES should correctly
85418649
}
85428650
`;
85438651

8652+
exports[`getFormattedFeeFields with tx type 2 with locale es-ES should correctly format fee fields for Adi unit 1`] = `
8653+
{
8654+
"formattedFeeValue": "0,000042 ADI",
8655+
"formattedGasPrice": "0 ADI",
8656+
"formattedMaxFeePerGas": "0 ADI",
8657+
"formattedMaxPriorityFeePerGas": "0 ADI",
8658+
}
8659+
`;
8660+
85448661
exports[`getFormattedFeeFields with tx type 2 with locale es-ES should correctly format fee fields for Akroma unit 1`] = `
85458662
{
85468663
"formattedFeeValue": "420.000 AKA",
@@ -9252,6 +9369,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale fr-FR should correctly
92529369
}
92539370
`;
92549371

9372+
exports[`getFormattedFeeFields with tx type 2 with locale fr-FR should correctly format fee fields for Adi unit 1`] = `
9373+
{
9374+
"formattedFeeValue": "0,000042 ADI",
9375+
"formattedGasPrice": "0 ADI",
9376+
"formattedMaxFeePerGas": "0 ADI",
9377+
"formattedMaxPriorityFeePerGas": "0 ADI",
9378+
}
9379+
`;
9380+
92559381
exports[`getFormattedFeeFields with tx type 2 with locale fr-FR should correctly format fee fields for Akroma unit 1`] = `
92569382
{
92579383
"formattedFeeValue": "420 000 AKA",
@@ -9963,6 +10089,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale ja-JP should correctly
996310089
}
996410090
`;
996510091

10092+
exports[`getFormattedFeeFields with tx type 2 with locale ja-JP should correctly format fee fields for Adi unit 1`] = `
10093+
{
10094+
"formattedFeeValue": "0.000042 ADI",
10095+
"formattedGasPrice": "0 ADI",
10096+
"formattedMaxFeePerGas": "0 ADI",
10097+
"formattedMaxPriorityFeePerGas": "0 ADI",
10098+
}
10099+
`;
10100+
996610101
exports[`getFormattedFeeFields with tx type 2 with locale ja-JP should correctly format fee fields for Akroma unit 1`] = `
996710102
{
996810103
"formattedFeeValue": "420,000 AKA",
@@ -10674,6 +10809,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale ko-KR should correctly
1067410809
}
1067510810
`;
1067610811

10812+
exports[`getFormattedFeeFields with tx type 2 with locale ko-KR should correctly format fee fields for Adi unit 1`] = `
10813+
{
10814+
"formattedFeeValue": "0.000042 ADI",
10815+
"formattedGasPrice": "0 ADI",
10816+
"formattedMaxFeePerGas": "0 ADI",
10817+
"formattedMaxPriorityFeePerGas": "0 ADI",
10818+
}
10819+
`;
10820+
1067710821
exports[`getFormattedFeeFields with tx type 2 with locale ko-KR should correctly format fee fields for Akroma unit 1`] = `
1067810822
{
1067910823
"formattedFeeValue": "420,000 AKA",
@@ -11385,6 +11529,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale pt-BR should correctly
1138511529
}
1138611530
`;
1138711531

11532+
exports[`getFormattedFeeFields with tx type 2 with locale pt-BR should correctly format fee fields for Adi unit 1`] = `
11533+
{
11534+
"formattedFeeValue": "0,000042 ADI",
11535+
"formattedGasPrice": "0 ADI",
11536+
"formattedMaxFeePerGas": "0 ADI",
11537+
"formattedMaxPriorityFeePerGas": "0 ADI",
11538+
}
11539+
`;
11540+
1138811541
exports[`getFormattedFeeFields with tx type 2 with locale pt-BR should correctly format fee fields for Akroma unit 1`] = `
1138911542
{
1139011543
"formattedFeeValue": "420.000 AKA",
@@ -12096,6 +12249,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale ru-RU should correctly
1209612249
}
1209712250
`;
1209812251

12252+
exports[`getFormattedFeeFields with tx type 2 with locale ru-RU should correctly format fee fields for Adi unit 1`] = `
12253+
{
12254+
"formattedFeeValue": "0,000042 ADI",
12255+
"formattedGasPrice": "0 ADI",
12256+
"formattedMaxFeePerGas": "0 ADI",
12257+
"formattedMaxPriorityFeePerGas": "0 ADI",
12258+
}
12259+
`;
12260+
1209912261
exports[`getFormattedFeeFields with tx type 2 with locale ru-RU should correctly format fee fields for Akroma unit 1`] = `
1210012262
{
1210112263
"formattedFeeValue": "420 000 AKA",
@@ -12807,6 +12969,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale tr-TR should correctly
1280712969
}
1280812970
`;
1280912971

12972+
exports[`getFormattedFeeFields with tx type 2 with locale tr-TR should correctly format fee fields for Adi unit 1`] = `
12973+
{
12974+
"formattedFeeValue": "0,000042 ADI",
12975+
"formattedGasPrice": "0 ADI",
12976+
"formattedMaxFeePerGas": "0 ADI",
12977+
"formattedMaxPriorityFeePerGas": "0 ADI",
12978+
}
12979+
`;
12980+
1281012981
exports[`getFormattedFeeFields with tx type 2 with locale tr-TR should correctly format fee fields for Akroma unit 1`] = `
1281112982
{
1281212983
"formattedFeeValue": "420.000 AKA",
@@ -13518,6 +13689,15 @@ exports[`getFormattedFeeFields with tx type 2 with locale zh-CN should correctly
1351813689
}
1351913690
`;
1352013691

13692+
exports[`getFormattedFeeFields with tx type 2 with locale zh-CN should correctly format fee fields for Adi unit 1`] = `
13693+
{
13694+
"formattedFeeValue": "0.000042 ADI",
13695+
"formattedGasPrice": "0 ADI",
13696+
"formattedMaxFeePerGas": "0 ADI",
13697+
"formattedMaxPriorityFeePerGas": "0 ADI",
13698+
}
13699+
`;
13700+
1352113701
exports[`getFormattedFeeFields with tx type 2 with locale zh-CN should correctly format fee fields for Akroma unit 1`] = `
1352213702
{
1352313703
"formattedFeeValue": "420,000 AKA",

libs/coin-modules/coin-evm/src/specs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const minBalancePerCurrencyId: Partial<Record<CryptoCurrency["id"], number>> = {
6262
zero_gravity: 0.01,
6363
unichain: 0.001,
6464
unichain_sepolia: 0.001,
65+
adi: 0.001,
6566
};
6667

6768
/**

0 commit comments

Comments
 (0)