@ledgerhq/live-common 21.11.0 → 21.13.1

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.
Files changed (81) hide show
  1. package/lib/__tests__/currencies.js +2 -0
  2. package/lib/__tests__/currencies.js.map +1 -1
  3. package/lib/api/explorerConfig/index.d.ts.map +1 -1
  4. package/lib/api/explorerConfig/index.js +7 -8
  5. package/lib/api/explorerConfig/index.js.map +1 -1
  6. package/lib/families/bitcoin/js-prepareTransaction.d.ts.map +1 -1
  7. package/lib/families/bitcoin/js-prepareTransaction.js +0 -3
  8. package/lib/families/bitcoin/js-prepareTransaction.js.map +1 -1
  9. package/lib/families/bitcoin/js-signOperation.d.ts.map +1 -1
  10. package/lib/families/bitcoin/js-signOperation.js +3 -1
  11. package/lib/families/bitcoin/js-signOperation.js.map +1 -1
  12. package/lib/families/bitcoin/specs.js +2 -1
  13. package/lib/families/bitcoin/specs.js.map +1 -1
  14. package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
  15. package/lib/families/bitcoin/speculos-deviceActions.js +4 -0
  16. package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
  17. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js +1 -1
  18. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js.map +1 -1
  19. package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts +2 -2
  20. package/lib/families/bitcoin/wallet-btc/index.d.ts.map +1 -1
  21. package/lib/families/bitcoin/wallet-btc/index.js +3 -0
  22. package/lib/families/bitcoin/wallet-btc/index.js.map +1 -1
  23. package/lib/families/bitcoin/wallet-btc/storage/index.js +10 -10
  24. package/lib/families/bitcoin/wallet-btc/storage/index.js.map +1 -1
  25. package/lib/families/bitcoin/wallet-btc/wallet.d.ts +1 -0
  26. package/lib/families/bitcoin/wallet-btc/wallet.d.ts.map +1 -1
  27. package/lib/families/bitcoin/wallet-btc/wallet.js +18 -8
  28. package/lib/families/bitcoin/wallet-btc/wallet.js.map +1 -1
  29. package/lib/families/crypto_org/api/sdk.d.ts.map +1 -1
  30. package/lib/families/crypto_org/api/sdk.js +6 -4
  31. package/lib/families/crypto_org/api/sdk.js.map +1 -1
  32. package/lib/families/crypto_org/cli-transaction.d.ts.map +1 -1
  33. package/lib/families/crypto_org/cli-transaction.js +6 -1
  34. package/lib/families/crypto_org/cli-transaction.js.map +1 -1
  35. package/lib/families/crypto_org/js-buildTransaction.d.ts.map +1 -1
  36. package/lib/families/crypto_org/js-buildTransaction.js +4 -1
  37. package/lib/families/crypto_org/js-buildTransaction.js.map +1 -1
  38. package/lib/families/crypto_org/js-transaction.d.ts +1 -0
  39. package/lib/families/crypto_org/js-transaction.d.ts.map +1 -1
  40. package/lib/families/crypto_org/js-transaction.js +9 -4
  41. package/lib/families/crypto_org/js-transaction.js.map +1 -1
  42. package/lib/families/crypto_org/transaction.d.ts +2 -2
  43. package/lib/families/crypto_org/transaction.d.ts.map +1 -1
  44. package/lib/families/crypto_org/transaction.js +4 -4
  45. package/lib/families/crypto_org/transaction.js.map +1 -1
  46. package/lib/families/crypto_org/types.d.ts +2 -0
  47. package/lib/families/crypto_org/types.d.ts.map +1 -1
  48. package/lib/families/crypto_org/types.js.map +1 -1
  49. package/lib/families/elrond/test-dataset.js +2 -2
  50. package/lib/families/elrond/test-dataset.js.map +1 -1
  51. package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
  52. package/lib/families/tezos/bakers.whitelist-default.js +1 -1
  53. package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
  54. package/lib/generated/transaction.d.ts +1 -1
  55. package/lib/reconciliation.d.ts.map +1 -1
  56. package/lib/reconciliation.js +3 -1
  57. package/lib/reconciliation.js.map +1 -1
  58. package/package.json +20 -20
  59. package/src/.DS_Store +0 -0
  60. package/src/__tests__/.DS_Store +0 -0
  61. package/src/__tests__/__snapshots__/all.libcore.ts.snap +181461 -0
  62. package/src/__tests__/currencies.ts +2 -0
  63. package/src/api/explorerConfig/index.ts +7 -8
  64. package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +229 -2
  65. package/src/families/bitcoin/js-prepareTransaction.ts +0 -2
  66. package/src/families/bitcoin/js-signOperation.ts +3 -0
  67. package/src/families/bitcoin/specs.ts +1 -1
  68. package/src/families/bitcoin/speculos-deviceActions.ts +4 -0
  69. package/src/families/bitcoin/wallet-btc/crypto/bitcoin.ts +1 -1
  70. package/src/families/bitcoin/wallet-btc/index.ts +2 -0
  71. package/src/families/bitcoin/wallet-btc/storage/index.ts +12 -12
  72. package/src/families/bitcoin/wallet-btc/wallet.ts +24 -7
  73. package/src/families/crypto_org/api/sdk.ts +7 -3
  74. package/src/families/crypto_org/cli-transaction.ts +11 -1
  75. package/src/families/crypto_org/js-buildTransaction.ts +5 -0
  76. package/src/families/crypto_org/js-transaction.ts +9 -2
  77. package/src/families/crypto_org/transaction.ts +4 -2
  78. package/src/families/crypto_org/types.ts +2 -0
  79. package/src/families/elrond/test-dataset.ts +1 -1
  80. package/src/families/tezos/bakers.whitelist-default.ts +0 -2
  81. package/src/reconciliation.ts +2 -1
@@ -69,6 +69,8 @@ test("sort by marketcap", () => {
69
69
  "ethereum/erc20/xstable.protocol",
70
70
  "ethereum/erc20/hydro_protocol",
71
71
  "ethereum/erc20/xensor",
72
+ "polygon/erc20/holotoken",
73
+ "polygon/erc20/zrx",
72
74
  ]);
73
75
  });
74
76
  test("can format a currency unit", () => {
@@ -82,10 +82,6 @@ const initialExplorerConfig: FullConfig = {
82
82
  komodo: {
83
83
  id: "kmd",
84
84
  stable: {
85
- base: "EXPLORER",
86
- version: "v2",
87
- },
88
- experimental: {
89
85
  base: "EXPLORER",
90
86
  version: "v3",
91
87
  },
@@ -129,10 +125,6 @@ const initialExplorerConfig: FullConfig = {
129
125
  stakenet: {
130
126
  id: "xsn",
131
127
  stable: {
132
- base: "EXPLORER",
133
- version: "v2",
134
- },
135
- experimental: {
136
128
  base: "EXPLORER",
137
129
  version: "v3",
138
130
  },
@@ -214,6 +206,13 @@ const initialExplorerConfig: FullConfig = {
214
206
  version: "v3",
215
207
  },
216
208
  },
209
+ polygon: {
210
+ id: "matic",
211
+ stable: {
212
+ base: "EXPLORER",
213
+ version: "v3",
214
+ },
215
+ },
217
216
  };
218
217
  let explorerConfig: FullConfig = initialExplorerConfig;
219
218
  export function getExplorerConfig(): FullConfig {
@@ -49,6 +49,7 @@ Array [
49
49
  "ethereum/erc20/trueusd",
50
50
  "ethereum/erc20/kyber_network_crystal_v2",
51
51
  "ravencoin",
52
+ "polygon/erc20/theta_token_(pos)",
52
53
  "ethereum/erc20/enjin",
53
54
  "waves",
54
55
  "ethereum/erc20/omg",
@@ -67,7 +68,7 @@ Array [
67
68
  "ethereum/erc20/aave_",
68
69
  "ethereum/erc20/republic_protocol",
69
70
  "zencash",
70
- "ethereum/erc20/matic",
71
+ "polygon",
71
72
  "ethereum/erc20/nmr",
72
73
  "ethereum/erc20/streamr",
73
74
  "ethereum/erc20/mana",
@@ -94,6 +95,7 @@ Array [
94
95
  "ethereum/erc20/iexec_rlc",
95
96
  "tomo",
96
97
  "elastos",
98
+ "polygon/erc20/bandtoken",
97
99
  "ethereum/erc20/ocean",
98
100
  "ethereum/erc20/healthcare_administration_token",
99
101
  "ark",
@@ -129,6 +131,7 @@ Array [
129
131
  "ethereum/erc20/kan",
130
132
  "ethereum/erc20/bnet_token",
131
133
  "ethereum/erc20/populous",
134
+ "polygon/erc20/iotex_network",
132
135
  "ethereum/erc20/funfair",
133
136
  "kusama",
134
137
  "ethereum/erc20/machine_xchange_coin",
@@ -167,6 +170,7 @@ Array [
167
170
  "ethereum/erc20/zeon",
168
171
  "ethereum/erc20/gaptoken",
169
172
  "ethereum/erc20/cryptoindex_100",
173
+ "polygon/erc20/usdk",
170
174
  "ethereum/erc20/qubitica_",
171
175
  "ethereum/erc20/ethereum_meta",
172
176
  "ethereum/erc20/bitforex_token",
@@ -209,6 +213,7 @@ Array [
209
213
  "ethereum/erc20/credits",
210
214
  "ethereum/erc20/xactoken",
211
215
  "ethereum/erc20/lto_network_token",
216
+ "polygon/erc20/polywolf",
212
217
  "ethereum/erc20/thetimeschain_coin",
213
218
  "ethereum/erc20/cashaa",
214
219
  "ethereum/erc20/invictus_hyperion",
@@ -216,6 +221,7 @@ Array [
216
221
  "ethereum/erc20/idex_token",
217
222
  "ethereum/erc20/request_network",
218
223
  "ethereum/erc20/minebee",
224
+ "polygon/erc20/fantom_token",
219
225
  "ethereum/erc20/bix_token",
220
226
  "kin",
221
227
  "ethereum/erc20/pinakion",
@@ -261,6 +267,7 @@ Array [
261
267
  "ethereum/erc20/tenx",
262
268
  "ethereum/erc20/internet_node_token",
263
269
  "ethereum/erc20/levolution.io_token",
270
+ "polygon/erc20/decentr",
264
271
  "ethereum/erc20/iqeon",
265
272
  "peercoin",
266
273
  "ethereum/erc20/united_traders_token",
@@ -871,6 +878,7 @@ Array [
871
878
  "ethereum/erc20/thrivetoken",
872
879
  "ethereum/erc20/tesla",
873
880
  "ethereum/erc20/mainstream_for_the_underground",
881
+ "polygon/erc20/safedollar.fi_share_2.0",
874
882
  "ethereum/erc20/cdx",
875
883
  "ethereum/erc20/dropil",
876
884
  "ethereum/erc20/savedroid",
@@ -1104,6 +1112,7 @@ Array [
1104
1112
  "ethereum/erc20/aax_token",
1105
1113
  "ethereum/erc20/cybertronchain",
1106
1114
  "ethereum/erc20/deapcoin",
1115
+ "polygon/erc20/ong",
1107
1116
  "ethereum/erc20/ethbear",
1108
1117
  "ethereum/erc20/all_sports_coin",
1109
1118
  "ethereum/erc20/bkex_chain",
@@ -1242,6 +1251,7 @@ Array [
1242
1251
  "ethereum/erc20/volt",
1243
1252
  "ethereum/erc20/map_protocol",
1244
1253
  "ethereum/erc20/crypto_boss_coin",
1254
+ "polygon/erc20/beefy.finance",
1245
1255
  "ethereum/erc20/future1coin",
1246
1256
  "ethereum/erc20/ptokens_btc",
1247
1257
  "ethereum/erc20/charg_coin",
@@ -1558,6 +1568,7 @@ Array [
1558
1568
  "ethereum/erc20/arcane_bear",
1559
1569
  "ethereum/erc20/archer_dao_governance_token",
1560
1570
  "ethereum/erc20/archetypal_network",
1571
+ "ethereum/erc20/arcoin",
1561
1572
  "ethereum/erc20/arcona_distribution_contract",
1562
1573
  "ethereum/erc20/arcx_governance_token",
1563
1574
  "ethereum/erc20/ares_protocol",
@@ -2069,6 +2080,7 @@ Array [
2069
2080
  "ethereum/erc20/clink",
2070
2081
  "ethereum/erc20/clipper_coin_capital",
2071
2082
  "ethereum/erc20/cliq",
2083
+ "ethereum/erc20/cloutcontracts",
2072
2084
  "ethereum/erc20/clover",
2073
2085
  "ethereum/erc20/clt",
2074
2086
  "ethereum/erc20/cm_collection",
@@ -2304,10 +2316,10 @@ Array [
2304
2316
  "ethereum/erc20/darktoken",
2305
2317
  "ethereum/erc20/dart_token",
2306
2318
  "ethereum/erc20/darwinia_commitment_token",
2319
+ "ethereum/erc20/data_economy_index",
2307
2320
  "ethereum/erc20/data_exchange_token",
2308
2321
  "ethereum/erc20/data_know_your_customer",
2309
2322
  "ethereum/erc20/databroker",
2310
- "ethereum/erc20/datacoin",
2311
2323
  "ethereum/erc20/datamine",
2312
2324
  "ethereum/erc20/datbit_token",
2313
2325
  "ethereum/erc20/davecoin",
@@ -2401,6 +2413,7 @@ Array [
2401
2413
  "ethereum/erc20/dexter",
2402
2414
  "ethereum/erc20/dextf_token",
2403
2415
  "ethereum/erc20/dextoken_governance",
2416
+ "ethereum/erc20/dextools",
2404
2417
  "ethereum/erc20/dextrust",
2405
2418
  "ethereum/erc20/dfe.finance",
2406
2419
  "ethereum/erc20/dfinance",
@@ -2527,6 +2540,7 @@ Array [
2527
2540
  "ethereum/erc20/dtop_token",
2528
2541
  "ethereum/erc20/dualchain",
2529
2542
  "ethereum/erc20/dubi",
2543
+ "ethereum/erc20/ducato_finance_token",
2530
2544
  "ethereum/erc20/duckdaodime",
2531
2545
  "ethereum/erc20/duet_governance_token",
2532
2546
  "ethereum/erc20/dukascoin",
@@ -2601,6 +2615,8 @@ Array [
2601
2615
  "ethereum/erc20/enreachdao",
2602
2616
  "ethereum/erc20/entanmo",
2603
2617
  "ethereum/erc20/entone",
2618
+ "ethereum/erc20/entropy",
2619
+ "ethereum/erc20/envicoin",
2604
2620
  "ethereum/erc20/epanus",
2605
2621
  "ethereum/erc20/epay_coin_plus",
2606
2622
  "ethereum/erc20/epik_prime",
@@ -3498,6 +3514,7 @@ Array [
3498
3514
  "ethereum/erc20/masq",
3499
3515
  "ethereum/erc20/master_usd",
3500
3516
  "ethereum/erc20/math_token",
3517
+ "ethereum/erc20/matic",
3501
3518
  "ethereum/erc20/maya_coin",
3502
3519
  "ethereum/erc20/mbcash",
3503
3520
  "ethereum/erc20/mcap",
@@ -3551,6 +3568,7 @@ Array [
3551
3568
  "ethereum/erc20/metis_token",
3552
3569
  "ethereum/erc20/metric.exchange",
3553
3570
  "ethereum/erc20/mfi_erc20",
3571
+ "ethereum/erc20/mia_neko",
3554
3572
  "ethereum/erc20/miami",
3555
3573
  "ethereum/erc20/mic",
3556
3574
  "ethereum/erc20/micro_launchpad_token",
@@ -3739,6 +3757,7 @@ Array [
3739
3757
  "ethereum/erc20/nodeseeds.com_token",
3740
3758
  "ethereum/erc20/noia_token",
3741
3759
  "ethereum/erc20/nollya_coin",
3760
+ "ethereum/erc20/nomad_coin",
3742
3761
  "ethereum/erc20/non-fungible_toke",
3743
3762
  "ethereum/erc20/non-fungible_yearn",
3744
3763
  "ethereum/erc20/noob.finance",
@@ -3870,6 +3889,7 @@ Array [
3870
3889
  "ethereum/erc20/paralink_network",
3871
3890
  "ethereum/erc20/parallelchain_token",
3872
3891
  "ethereum/erc20/pareto",
3892
+ "ethereum/erc20/paribus",
3873
3893
  "ethereum/erc20/parsec_finance",
3874
3894
  "ethereum/erc20/parsiq_boost",
3875
3895
  "ethereum/erc20/parsiq_token_",
@@ -3969,6 +3989,7 @@ Array [
3969
3989
  "ethereum/erc20/pocc_token",
3970
3990
  "ethereum/erc20/podo",
3971
3991
  "ethereum/erc20/pofid_dao_token",
3992
+ "ethereum/erc20/poken",
3972
3993
  "ethereum/erc20/poker_io",
3973
3994
  "ethereum/erc20/polar_chain",
3974
3995
  "ethereum/erc20/polaris_share",
@@ -4490,6 +4511,7 @@ Array [
4490
4511
  "ethereum/erc20/stake_pool",
4491
4512
  "ethereum/erc20/staked_aave",
4492
4513
  "ethereum/erc20/staked_aave_balance_pool_token",
4514
+ "ethereum/erc20/staked_olympus",
4493
4515
  "ethereum/erc20/stakeddvf",
4494
4516
  "ethereum/erc20/stakedfiro",
4495
4517
  "ethereum/erc20/stakedxem",
@@ -5370,12 +5392,217 @@ Array [
5370
5392
  "ethereum_ropsten/erc20/compound_ether",
5371
5393
  "ethereum_ropsten/erc20/dai_stablecoin_v2_0",
5372
5394
  "ethereum_ropsten/erc20/gigcoin",
5395
+ "ethereum_ropsten/erc20/ledgercoin18",
5373
5396
  "ethereum_ropsten/erc20/nangalanga",
5374
5397
  "ethereum_ropsten/erc20/tk19",
5375
5398
  "ethereum_ropsten/erc20/tk20",
5376
5399
  "ethereum_ropsten/erc20/toko24",
5377
5400
  "ethereum_ropsten/erc20/toko25",
5378
5401
  "ethereum_ropsten/erc20/usd_tether__erc20_",
5402
+ "polygon/erc20/(pos)_compound",
5403
+ "polygon/erc20/(pos)_dai_stablecoin",
5404
+ "polygon/erc20/(pos)_tether_usd",
5405
+ "polygon/erc20/(pos)_wrapped_btc",
5406
+ "polygon/erc20/(pos)_yearn.finance",
5407
+ "polygon/erc20/0xbitcoin_token",
5408
+ "polygon/erc20/1inch_token",
5409
+ "polygon/erc20/aave_(pos)",
5410
+ "polygon/erc20/aave_matic_market_aave",
5411
+ "polygon/erc20/aave_matic_market_dai",
5412
+ "polygon/erc20/aave_matic_market_usdc",
5413
+ "polygon/erc20/aave_matic_market_usdt",
5414
+ "polygon/erc20/aave_matic_market_wbtc",
5415
+ "polygon/erc20/aave_matic_market_weth",
5416
+ "polygon/erc20/aave_matic_market_wmatic",
5417
+ "polygon/erc20/adamant",
5418
+ "polygon/erc20/aioz_network",
5419
+ "polygon/erc20/aluna",
5420
+ "polygon/erc20/amp",
5421
+ "polygon/erc20/ampleforth_governance",
5422
+ "polygon/erc20/ankr_eth2_reward_bearing_certificate",
5423
+ "polygon/erc20/armor",
5424
+ "polygon/erc20/augury_finance",
5425
+ "polygon/erc20/bac",
5426
+ "polygon/erc20/balancer",
5427
+ "polygon/erc20/bancor",
5428
+ "polygon/erc20/bat",
5429
+ "polygon/erc20/betprotocoltoken",
5430
+ "polygon/erc20/binance-usd",
5431
+ "polygon/erc20/bitfinex_leo_token",
5432
+ "polygon/erc20/blockv",
5433
+ "polygon/erc20/bluzelle",
5434
+ "polygon/erc20/bnb",
5435
+ "polygon/erc20/bone_token_(boneswap)",
5436
+ "polygon/erc20/boringdao_(pos)",
5437
+ "polygon/erc20/bounty0x",
5438
+ "polygon/erc20/btc_2x_flexible_leverage_index",
5439
+ "polygon/erc20/btu_protocol",
5440
+ "polygon/erc20/bzx_protocol_token",
5441
+ "polygon/erc20/cardstack",
5442
+ "polygon/erc20/cargox",
5443
+ "polygon/erc20/celsius",
5444
+ "polygon/erc20/chainlink_token",
5445
+ "polygon/erc20/chiliz",
5446
+ "polygon/erc20/clintex",
5447
+ "polygon/erc20/crv_(pos)",
5448
+ "polygon/erc20/cryption_network_token",
5449
+ "polygon/erc20/crypto.com_coin",
5450
+ "polygon/erc20/decentraland",
5451
+ "polygon/erc20/deri",
5452
+ "polygon/erc20/dfyn_token_(pos)",
5453
+ "polygon/erc20/dhedge_dao_token",
5454
+ "polygon/erc20/dogelon",
5455
+ "polygon/erc20/dovu",
5456
+ "polygon/erc20/dragon_quick",
5457
+ "polygon/erc20/dsla",
5458
+ "polygon/erc20/endor_protocol_token",
5459
+ "polygon/erc20/energy_web_token_bridged",
5460
+ "polygon/erc20/enjincoin",
5461
+ "polygon/erc20/eth_2x_flexible_leverage_index",
5462
+ "polygon/erc20/ethereum_blue",
5463
+ "polygon/erc20/ethermontoken",
5464
+ "polygon/erc20/ethlend",
5465
+ "polygon/erc20/everipedia_iq_(pos)",
5466
+ "polygon/erc20/fegtoken",
5467
+ "polygon/erc20/fetch",
5468
+ "polygon/erc20/fish",
5469
+ "polygon/erc20/foam_token",
5470
+ "polygon/erc20/fox",
5471
+ "polygon/erc20/fractal_protocol_token",
5472
+ "polygon/erc20/free_coin",
5473
+ "polygon/erc20/frontier_token",
5474
+ "polygon/erc20/furucombo",
5475
+ "polygon/erc20/fusion",
5476
+ "polygon/erc20/gemini_dollar",
5477
+ "polygon/erc20/gitcoin_(pos)",
5478
+ "polygon/erc20/gnosis",
5479
+ "polygon/erc20/golem_network_token",
5480
+ "polygon/erc20/graph_token",
5481
+ "polygon/erc20/gravity_finance",
5482
+ "polygon/erc20/grumpy_cat",
5483
+ "polygon/erc20/guaranteed_entrance_token",
5484
+ "polygon/erc20/hashgard",
5485
+ "polygon/erc20/hex",
5486
+ "polygon/erc20/holotoken",
5487
+ "polygon/erc20/honor",
5488
+ "polygon/erc20/hopr_token",
5489
+ "polygon/erc20/huobitoken",
5490
+ "polygon/erc20/husd",
5491
+ "polygon/erc20/impermax",
5492
+ "polygon/erc20/injective_token",
5493
+ "polygon/erc20/internxt",
5494
+ "polygon/erc20/inverse",
5495
+ "polygon/erc20/iron_finance_ice_token",
5496
+ "polygon/erc20/iron_stablecoin",
5497
+ "polygon/erc20/iron_titanium_token",
5498
+ "polygon/erc20/jarvis_reward_token",
5499
+ "polygon/erc20/keep_token",
5500
+ "polygon/erc20/krill",
5501
+ "polygon/erc20/kyber_network_crystal_v2_(pos)",
5502
+ "polygon/erc20/launchpool_token",
5503
+ "polygon/erc20/lcx",
5504
+ "polygon/erc20/litentry",
5505
+ "polygon/erc20/livepeer_token",
5506
+ "polygon/erc20/loopringcoin_v2",
5507
+ "polygon/erc20/mainframe_token",
5508
+ "polygon/erc20/maker",
5509
+ "polygon/erc20/mantra_dao",
5510
+ "polygon/erc20/marlin_pond",
5511
+ "polygon/erc20/mask_network",
5512
+ "polygon/erc20/matic_aave_interest_bearing_usdc",
5513
+ "polygon/erc20/meta",
5514
+ "polygon/erc20/mimatic",
5515
+ "polygon/erc20/moonwolf.io",
5516
+ "polygon/erc20/mover",
5517
+ "polygon/erc20/napoleonx",
5518
+ "polygon/erc20/nexo",
5519
+ "polygon/erc20/occ",
5520
+ "polygon/erc20/ocean_token",
5521
+ "polygon/erc20/oiler",
5522
+ "polygon/erc20/omg_network",
5523
+ "polygon/erc20/oraichain_token",
5524
+ "polygon/erc20/orbs",
5525
+ "polygon/erc20/orchid",
5526
+ "polygon/erc20/origintoken",
5527
+ "polygon/erc20/ovr",
5528
+ "polygon/erc20/paid_network",
5529
+ "polygon/erc20/par_stablecoin",
5530
+ "polygon/erc20/parsiq_token",
5531
+ "polygon/erc20/paxos_gold",
5532
+ "polygon/erc20/paxos_standard",
5533
+ "polygon/erc20/pepedex",
5534
+ "polygon/erc20/piedao_dough_v2",
5535
+ "polygon/erc20/pinakion",
5536
+ "polygon/erc20/pinknode_token",
5537
+ "polygon/erc20/pluton",
5538
+ "polygon/erc20/polydoge",
5539
+ "polygon/erc20/polygaj_token",
5540
+ "polygon/erc20/polygon_bunny_token",
5541
+ "polygon/erc20/polymath",
5542
+ "polygon/erc20/polyroll_token",
5543
+ "polygon/erc20/polyyeld_token",
5544
+ "polygon/erc20/pooltogether",
5545
+ "polygon/erc20/powerledger",
5546
+ "polygon/erc20/ptokens_btc",
5547
+ "polygon/erc20/pup_token",
5548
+ "polygon/erc20/pusd",
5549
+ "polygon/erc20/pyq",
5550
+ "polygon/erc20/qi_dao",
5551
+ "polygon/erc20/quickswap",
5552
+ "polygon/erc20/rarible",
5553
+ "polygon/erc20/renbtc",
5554
+ "polygon/erc20/render_token",
5555
+ "polygon/erc20/rendoge",
5556
+ "polygon/erc20/renfil",
5557
+ "polygon/erc20/ripiocreditnetwork",
5558
+ "polygon/erc20/rlc",
5559
+ "polygon/erc20/rocket_pool",
5560
+ "polygon/erc20/route",
5561
+ "polygon/erc20/safedollar.fi_dollar_2.0",
5562
+ "polygon/erc20/sand",
5563
+ "polygon/erc20/sapien_network",
5564
+ "polygon/erc20/sentinel",
5565
+ "polygon/erc20/serum",
5566
+ "polygon/erc20/shopping.io",
5567
+ "polygon/erc20/singularitynet_token",
5568
+ "polygon/erc20/spacerat",
5569
+ "polygon/erc20/stacker_ventures_token_(pos)",
5570
+ "polygon/erc20/stake",
5571
+ "polygon/erc20/stakewise",
5572
+ "polygon/erc20/stasis_eurs_token",
5573
+ "polygon/erc20/student_coin",
5574
+ "polygon/erc20/sushitoken_(pos)",
5575
+ "polygon/erc20/swipe",
5576
+ "polygon/erc20/swissborg",
5577
+ "polygon/erc20/synth_susd",
5578
+ "polygon/erc20/synthetix_network_token_(pos)",
5579
+ "polygon/erc20/tapmydata",
5580
+ "polygon/erc20/telcoin",
5581
+ "polygon/erc20/tellor_tributes",
5582
+ "polygon/erc20/tidal_token",
5583
+ "polygon/erc20/torn_token",
5584
+ "polygon/erc20/trueusd",
5585
+ "polygon/erc20/uma_voting_token_v1",
5586
+ "polygon/erc20/unfederalreservetoken",
5587
+ "polygon/erc20/unibright",
5588
+ "polygon/erc20/unifund",
5589
+ "polygon/erc20/unimex.network",
5590
+ "polygon/erc20/uniswap_(pos)",
5591
+ "polygon/erc20/usd_coin_(pos)",
5592
+ "polygon/erc20/vespertoken",
5593
+ "polygon/erc20/voyager",
5594
+ "polygon/erc20/waultswap_polygon",
5595
+ "polygon/erc20/wepower",
5596
+ "polygon/erc20/woofy",
5597
+ "polygon/erc20/wootrade_network",
5598
+ "polygon/erc20/wrapped_celo",
5599
+ "polygon/erc20/wrapped_filecoin_(pos)",
5600
+ "polygon/erc20/wrapped_matic",
5601
+ "polygon/erc20/wrapped_ust_token",
5602
+ "polygon/erc20/xtoken",
5603
+ "polygon/erc20/xy_oracle",
5604
+ "polygon/erc20/yop",
5605
+ "polygon/erc20/zrx",
5379
5606
  "tron/trc10/1002670",
5380
5607
  "tron/trc10/1002413",
5381
5608
  "tron/trc10/1001943",
@@ -3,13 +3,11 @@ import type { Account } from "../../types";
3
3
  import type { Transaction } from "./types";
4
4
  import { getAccountNetworkInfo } from "./getAccountNetworkInfo";
5
5
  import { inferFeePerByte } from "./logic";
6
- import { AccountNeedResync } from "../../errors";
7
6
 
8
7
  const prepareTransaction = async (
9
8
  a: Account,
10
9
  t: Transaction
11
10
  ): Promise<Transaction> => {
12
- if (a.id.startsWith("libcore")) throw new AccountNeedResync();
13
11
  let networkInfo = t.networkInfo;
14
12
 
15
13
  if (!networkInfo) {
@@ -105,6 +105,8 @@ const signOperation = ({
105
105
  ? Buffer.from([0x00, 0x00, 0x00, 0x00])
106
106
  : undefined;
107
107
 
108
+ const hasExtraData = perCoin?.hasExtraData || false;
109
+
108
110
  const signature = await wallet.signAccountTx({
109
111
  btc: hwApp,
110
112
  fromAccount: walletAccount,
@@ -115,6 +117,7 @@ const signOperation = ({
115
117
  //initialTimestamp,
116
118
  additionals,
117
119
  expiryHeight,
120
+ hasExtraData,
118
121
  onDeviceSignatureGranted: () =>
119
122
  o.next({
120
123
  type: "device-signature-granted",
@@ -277,7 +277,7 @@ const bitcoinTestnet: AppSpec<Transaction> = {
277
277
  appQuery: {
278
278
  model: DeviceModelId.nanoS,
279
279
  appName: "Bitcoin Test",
280
- // appVersion: "2.0.0-alpha",
280
+ appVersion: "2.0.0-beta",
281
281
  },
282
282
  test: genericTest,
283
283
  mutations: bitcoinLikeMutations({
@@ -66,6 +66,10 @@ const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
66
66
  title: "Accept",
67
67
  button: "LRlr",
68
68
  },
69
+ {
70
+ title: "Approve",
71
+ button: "LRlr",
72
+ },
69
73
  ],
70
74
  });
71
75
  export default {
@@ -188,7 +188,7 @@ class Bitcoin extends Base {
188
188
  const schnorrInternalPubkey = ecdsaPubkey.slice(1);
189
189
 
190
190
  const evenEcdsaPubkey = Buffer.concat([
191
- Buffer.of(0x02),
191
+ Buffer.from([0x02]),
192
192
  schnorrInternalPubkey,
193
193
  ]);
194
194
  const tweak = this.hashTapTweak(schnorrInternalPubkey);
@@ -15,6 +15,7 @@ import { isValidAddress } from "./utils";
15
15
 
16
16
  import type { Account as WalletAccount } from "./account";
17
17
  import type { Account as LiveAccount } from "./../../../types";
18
+ import { AccountNeedResync } from "../../../errors";
18
19
 
19
20
  export {
20
21
  BitcoinLikeWallet,
@@ -37,6 +38,7 @@ export {
37
38
  let wallet: BitcoinLikeWallet | null = null;
38
39
 
39
40
  export const getWalletAccount = (account: LiveAccount): WalletAccount => {
41
+ if (account.id.startsWith("libcore")) throw new AccountNeedResync();
40
42
  const walletAccount = account.bitcoinResources?.walletAccount;
41
43
  if (!walletAccount) {
42
44
  throw new Error("bitcoin wallet account expected");
@@ -116,18 +116,18 @@ class BitcoinLikeStorage implements IStorage {
116
116
 
117
117
  async removeTxs(txsFilter: { account: number; index: number }) {
118
118
  const newTxs: TX[] = [];
119
+ this.primaryIndex = {};
119
120
 
120
121
  this.txs.forEach((tx: TX) => {
121
- if (tx.account !== txsFilter.account || tx.index !== txsFilter.index) {
122
- newTxs.push(tx);
123
- return;
124
- }
125
-
126
122
  // clean
127
123
  const indexAddress = tx.address;
128
124
  const index = `${indexAddress}-${tx.hash}`;
129
125
 
130
- delete this.primaryIndex[index];
126
+ if (tx.account !== txsFilter.account || tx.index !== txsFilter.index) {
127
+ this.primaryIndex[index] = newTxs.push(tx) - 1;
128
+ return;
129
+ }
130
+
131
131
  delete this.unspentUtxos[indexAddress];
132
132
  delete this.spentUtxos[indexAddress];
133
133
  });
@@ -140,10 +140,15 @@ class BitcoinLikeStorage implements IStorage {
140
140
  async removePendingTxs(txsFilter: { account: number; index: number }) {
141
141
  const newTxs: TX[] = [];
142
142
  const txsToReAdd: TX[] = [];
143
+ this.primaryIndex = {};
143
144
 
144
145
  this.txs.forEach((tx: TX) => {
146
+ // clean
147
+ const indexAddress = tx.address;
148
+ const index = `${indexAddress}-${tx.hash}`;
149
+
145
150
  if (tx.account !== txsFilter.account || tx.index !== txsFilter.index) {
146
- newTxs.push(tx);
151
+ this.primaryIndex[index] = newTxs.push(tx) - 1;
147
152
  return;
148
153
  }
149
154
 
@@ -151,11 +156,6 @@ class BitcoinLikeStorage implements IStorage {
151
156
  txsToReAdd.push(tx);
152
157
  }
153
158
 
154
- // clean
155
- const indexAddress = tx.address;
156
- const index = `${indexAddress}-${tx.hash}`;
157
-
158
- delete this.primaryIndex[index];
159
159
  delete this.unspentUtxos[indexAddress];
160
160
  delete this.spentUtxos[indexAddress];
161
161
  });
@@ -209,6 +209,7 @@ class BitcoinLikeWallet {
209
209
  segwit?: boolean;
210
210
  additionals?: Array<string>;
211
211
  expiryHeight?: Buffer;
212
+ hasExtraData?: boolean;
212
213
  onDeviceSignatureRequested?: () => void;
213
214
  onDeviceSignatureGranted?: () => void;
214
215
  onDeviceStreaming?: (arg0: {
@@ -221,7 +222,9 @@ class BitcoinLikeWallet {
221
222
  btc,
222
223
  fromAccount,
223
224
  txInfo,
225
+ segwit,
224
226
  additionals,
227
+ hasExtraData,
225
228
  onDeviceSignatureRequested,
226
229
  onDeviceSignatureGranted,
227
230
  onDeviceStreaming,
@@ -239,7 +242,6 @@ class BitcoinLikeWallet {
239
242
  bufferWriter.writeVarSlice(txOut.script);
240
243
  });
241
244
  const outputScriptHex = buffer.toString("hex");
242
-
243
245
  const associatedKeysets = txInfo.associatedDerivations.map(
244
246
  ([account, index]) =>
245
247
  `${fromAccount.params.path}/${fromAccount.params.index}'/${account}/${index}`
@@ -250,12 +252,27 @@ class BitcoinLikeWallet {
250
252
  string | null | undefined,
251
253
  number | null | undefined
252
254
  ][];
253
- const inputs: Inputs = txInfo.inputs.map((i) => [
254
- btc.splitTransaction(i.txHex, true),
255
- i.output_index,
256
- null,
257
- i.sequence,
258
- ]);
255
+ const inputs: Inputs = txInfo.inputs.map((i) => {
256
+ log("hw", `splitTransaction`, {
257
+ transactionHex: i.txHex,
258
+ isSegwitSupported: segwit,
259
+ hasTimestamp: false,
260
+ hasExtraData,
261
+ additionals,
262
+ });
263
+ return [
264
+ btc.splitTransaction(
265
+ i.txHex,
266
+ segwit,
267
+ false, // FIXME hasTimestamp needed for LL-7539
268
+ hasExtraData,
269
+ additionals
270
+ ),
271
+ i.output_index,
272
+ null,
273
+ i.sequence,
274
+ ];
275
+ });
259
276
 
260
277
  const lastOutputIndex = txInfo.outputs.length - 1;
261
278
 
@@ -148,7 +148,8 @@ function convertSendTransactionToOperation(
148
148
  addr: string,
149
149
  messageSendContent: CryptoOrgMsgSendContent,
150
150
  transaction: CryptoOrgAccountTransaction,
151
- currencyId: string
151
+ currencyId: string,
152
+ memo: string
152
153
  ): Operation {
153
154
  const type = getOperationType(messageSendContent, addr);
154
155
  return {
@@ -164,7 +165,7 @@ function convertSendTransactionToOperation(
164
165
  senders: [messageSendContent.fromAddress],
165
166
  recipients: [messageSendContent.toAddress],
166
167
  hasFailed: !transaction.success,
167
- extra: {},
168
+ extra: { memo },
168
169
  };
169
170
  }
170
171
 
@@ -191,6 +192,8 @@ export const getOperations = async (
191
192
 
192
193
  for (let i = 0; i < accountTransactions.length; i++) {
193
194
  const msgs = accountTransactions[i].messages;
195
+ const memo = accountTransactions[i].memo;
196
+ const memoTransaction = memo || "";
194
197
 
195
198
  for (let j = 0; j < msgs.length; j++) {
196
199
  switch (msgs[j].type) {
@@ -202,7 +205,8 @@ export const getOperations = async (
202
205
  addr,
203
206
  msgSend,
204
207
  accountTransactions[i],
205
- currencyId
208
+ currencyId,
209
+ memoTransaction
206
210
  )
207
211
  );
208
212
  break;