@ledgerhq/live-common 34.54.0-nightly.20251206023719 → 34.54.0-nightly.20251209023841
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/lib/account/serialization.js +1 -1
- package/lib/account/serialization.js.map +1 -1
- package/lib/account/support.js +1 -1
- package/lib/account/support.js.map +1 -1
- package/lib/domain/getTokensWithFunds.d.ts +7 -1
- package/lib/domain/getTokensWithFunds.d.ts.map +1 -1
- package/lib/domain/getTokensWithFunds.js +15 -4
- package/lib/domain/getTokensWithFunds.js.map +1 -1
- package/lib/domain/getTotalStakeableAssets.d.ts +10 -0
- package/lib/domain/getTotalStakeableAssets.d.ts.map +1 -0
- package/lib/domain/getTotalStakeableAssets.js +35 -0
- package/lib/domain/getTotalStakeableAssets.js.map +1 -0
- package/lib/e2e/index.d.ts +3 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +1 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/firebaseFeatureFlags.js +1 -1
- package/lib/featureFlags/firebaseFeatureFlags.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/featureFlags/useHasOverriddenFeatureFlags.js +1 -1
- package/lib/featureFlags/useHasOverriddenFeatureFlags.js.map +1 -1
- package/lib/hw/getBitcoinLikeInfo.js +1 -1
- package/lib/hw/getBitcoinLikeInfo.js.map +1 -1
- package/lib/mock/account.js +1 -1
- package/lib/mock/account.js.map +1 -1
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +3 -1
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/Exchange/tracking.d.ts +7 -6
- package/lib/wallet-api/Exchange/tracking.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/tracking.js +52 -13
- package/lib/wallet-api/Exchange/tracking.js.map +1 -1
- package/lib/wallet-api/logic.d.ts +1 -1
- package/lib/wallet-api/logic.d.ts.map +1 -1
- package/lib/wallet-api/logic.js +5 -5
- package/lib/wallet-api/logic.js.map +1 -1
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +9 -6
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/tracking.d.ts +5 -5
- package/lib/wallet-api/tracking.d.ts.map +1 -1
- package/lib/wallet-api/tracking.js +30 -10
- package/lib/wallet-api/tracking.js.map +1 -1
- package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.js +31 -20
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib/wallet-api/utils/extractDappURLFromManifest.js +3 -3
- package/lib/wallet-api/utils/extractDappURLFromManifest.js.map +1 -1
- package/lib/wallet-api/utils/extractURLFromManifest.js +1 -1
- package/lib/wallet-api/utils/extractURLFromManifest.js.map +1 -1
- package/lib-es/account/serialization.js +1 -1
- package/lib-es/account/serialization.js.map +1 -1
- package/lib-es/account/support.js +1 -1
- package/lib-es/account/support.js.map +1 -1
- package/lib-es/domain/getTokensWithFunds.d.ts +7 -1
- package/lib-es/domain/getTokensWithFunds.d.ts.map +1 -1
- package/lib-es/domain/getTokensWithFunds.js +13 -3
- package/lib-es/domain/getTokensWithFunds.js.map +1 -1
- package/lib-es/domain/getTotalStakeableAssets.d.ts +10 -0
- package/lib-es/domain/getTotalStakeableAssets.d.ts.map +1 -0
- package/lib-es/domain/getTotalStakeableAssets.js +31 -0
- package/lib-es/domain/getTotalStakeableAssets.js.map +1 -0
- package/lib-es/e2e/index.d.ts +3 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +1 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/firebaseFeatureFlags.js +1 -1
- package/lib-es/featureFlags/firebaseFeatureFlags.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/featureFlags/useHasOverriddenFeatureFlags.js +1 -1
- package/lib-es/featureFlags/useHasOverriddenFeatureFlags.js.map +1 -1
- package/lib-es/hw/getBitcoinLikeInfo.js +1 -1
- package/lib-es/hw/getBitcoinLikeInfo.js.map +1 -1
- package/lib-es/mock/account.js +1 -1
- package/lib-es/mock/account.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +3 -1
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/Exchange/tracking.d.ts +7 -6
- package/lib-es/wallet-api/Exchange/tracking.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/tracking.js +52 -13
- package/lib-es/wallet-api/Exchange/tracking.js.map +1 -1
- package/lib-es/wallet-api/logic.d.ts +1 -1
- package/lib-es/wallet-api/logic.d.ts.map +1 -1
- package/lib-es/wallet-api/logic.js +5 -5
- package/lib-es/wallet-api/logic.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +9 -6
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/tracking.d.ts +5 -5
- package/lib-es/wallet-api/tracking.d.ts.map +1 -1
- package/lib-es/wallet-api/tracking.js +30 -10
- package/lib-es/wallet-api/tracking.js.map +1 -1
- package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +31 -20
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/wallet-api/utils/extractDappURLFromManifest.js +3 -3
- package/lib-es/wallet-api/utils/extractDappURLFromManifest.js.map +1 -1
- package/lib-es/wallet-api/utils/extractURLFromManifest.js +1 -1
- package/lib-es/wallet-api/utils/extractURLFromManifest.js.map +1 -1
- package/package.json +73 -73
- package/src/account/serialization.ts +1 -1
- package/src/account/support.ts +1 -1
- package/src/domain/getTokensWithFunds.ts +18 -5
- package/src/domain/getTotalStakeableAssets.test.ts +267 -0
- package/src/domain/getTotalStakeableAssets.ts +47 -0
- package/src/exchange/swap/api/v5/fetchCurrencyFrom.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +1 -0
- package/src/featureFlags/firebaseFeatureFlags.ts +1 -1
- package/src/featureFlags/useHasOverriddenFeatureFlags.ts +1 -1
- package/src/hw/getBitcoinLikeInfo.ts +1 -1
- package/src/mock/account.ts +1 -1
- package/src/wallet-api/Exchange/server.ts +3 -0
- package/src/wallet-api/Exchange/tracking.ts +56 -13
- package/src/wallet-api/logic.ts +5 -4
- package/src/wallet-api/react.ts +10 -5
- package/src/wallet-api/tracking.ts +30 -10
- package/src/wallet-api/useDappLogic.ts +32 -20
- package/src/wallet-api/utils/extractDappURLFromManifest.ts +3 -3
- package/src/wallet-api/utils/extractURLFromManifest.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-common",
|
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
|
4
|
-
"version": "34.54.0-nightly.
|
|
4
|
+
"version": "34.54.0-nightly.20251209023841",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -176,78 +176,78 @@
|
|
|
176
176
|
"xstate": "^5.19.2",
|
|
177
177
|
"yargs": "^17.0.0",
|
|
178
178
|
"zod": "^3.22.4",
|
|
179
|
-
"@ledgerhq/coin-algorand": "^0.14.0-nightly.
|
|
180
|
-
"@ledgerhq/coin-aptos": "^3.7.0-nightly.
|
|
181
|
-
"@ledgerhq/coin-bitcoin": "^0.26.0-nightly.
|
|
182
|
-
"@ledgerhq/coin-canton": "^0.11.0-nightly.
|
|
183
|
-
"@ledgerhq/coin-cardano": "^0.16.0-nightly.
|
|
184
|
-
"@ledgerhq/coin-casper": "^2.5.0-nightly.
|
|
185
|
-
"@ledgerhq/coin-celo": "^1.8.0-nightly.
|
|
186
|
-
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.
|
|
187
|
-
"@ledgerhq/coin-evm": "^2.36.0-nightly.
|
|
188
|
-
"@ledgerhq/coin-filecoin": "^1.15.0-nightly.
|
|
189
|
-
"@ledgerhq/coin-framework": "^6.10.0-nightly.
|
|
190
|
-
"@ledgerhq/coin-hedera": "^1.15.0-nightly.
|
|
191
|
-
"@ledgerhq/coin-icon": "^0.16.0-nightly.
|
|
192
|
-
"@ledgerhq/coin-internet_computer": "^1.12.0-nightly.
|
|
193
|
-
"@ledgerhq/coin-kaspa": "^1.5.0-nightly.
|
|
194
|
-
"@ledgerhq/coin-mina": "^1.5.0-nightly.
|
|
195
|
-
"@ledgerhq/coin-multiversx": "^0.9.0-nightly.
|
|
196
|
-
"@ledgerhq/coin-near": "^0.17.0-nightly.
|
|
197
|
-
"@ledgerhq/coin-polkadot": "^6.14.0-nightly.
|
|
198
|
-
"@ledgerhq/coin-solana": "^0.38.0-nightly.
|
|
199
|
-
"@ledgerhq/coin-stacks": "^0.13.0-nightly.
|
|
200
|
-
"@ledgerhq/coin-stellar": "^6.8.0-nightly.
|
|
201
|
-
"@ledgerhq/coin-sui": "^0.19.0-nightly.
|
|
202
|
-
"@ledgerhq/coin-tezos": "^6.10.0-nightly.
|
|
203
|
-
"@ledgerhq/coin-ton": "^0.18.0-nightly.
|
|
204
|
-
"@ledgerhq/coin-tron": "^5.8.0-nightly.
|
|
205
|
-
"@ledgerhq/coin-vechain": "^2.13.0-nightly.
|
|
206
|
-
"@ledgerhq/coin-xrp": "^7.9.0-nightly.
|
|
207
|
-
"@ledgerhq/cryptoassets": "^13.34.0-nightly.
|
|
208
|
-
"@ledgerhq/device-core": "^0.6.9-nightly.
|
|
209
|
-
"@ledgerhq/devices": "8.8.0-nightly.
|
|
210
|
-
"@ledgerhq/errors": "^6.
|
|
211
|
-
"@ledgerhq/hw-app-algorand": "^6.31.10-nightly.
|
|
212
|
-
"@ledgerhq/hw-app-aptos": "^6.34.10-nightly.
|
|
213
|
-
"@ledgerhq/hw-app-btc": "^10.
|
|
214
|
-
"@ledgerhq/hw-app-celo": "^6.35.4-nightly.
|
|
215
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.10-nightly.
|
|
216
|
-
"@ledgerhq/hw-app-eth": "^7.0.0-nightly.
|
|
217
|
-
"@ledgerhq/hw-app-exchange": "^0.18.0-nightly.
|
|
218
|
-
"@ledgerhq/hw-app-hedera": "^1.2.10-nightly.
|
|
219
|
-
"@ledgerhq/hw-app-icon": "^1.3.10-nightly.
|
|
220
|
-
"@ledgerhq/hw-app-kaspa": "^1.3.3-nightly.
|
|
221
|
-
"@ledgerhq/hw-app-multiversx": "^6.26.1-nightly.
|
|
222
|
-
"@ledgerhq/hw-app-near": "^6.31.10-nightly.
|
|
223
|
-
"@ledgerhq/hw-app-polkadot": "^6.34.10-nightly.
|
|
224
|
-
"@ledgerhq/hw-app-str": "^7.2.10-nightly.
|
|
179
|
+
"@ledgerhq/coin-algorand": "^0.14.0-nightly.20251209023841",
|
|
180
|
+
"@ledgerhq/coin-aptos": "^3.7.0-nightly.20251209023841",
|
|
181
|
+
"@ledgerhq/coin-bitcoin": "^0.26.0-nightly.20251209023841",
|
|
182
|
+
"@ledgerhq/coin-canton": "^0.11.0-nightly.20251209023841",
|
|
183
|
+
"@ledgerhq/coin-cardano": "^0.16.0-nightly.20251209023841",
|
|
184
|
+
"@ledgerhq/coin-casper": "^2.5.0-nightly.20251209023841",
|
|
185
|
+
"@ledgerhq/coin-celo": "^1.8.0-nightly.20251209023841",
|
|
186
|
+
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.20251209023841",
|
|
187
|
+
"@ledgerhq/coin-evm": "^2.36.0-nightly.20251209023841",
|
|
188
|
+
"@ledgerhq/coin-filecoin": "^1.15.0-nightly.20251209023841",
|
|
189
|
+
"@ledgerhq/coin-framework": "^6.10.0-nightly.20251209023841",
|
|
190
|
+
"@ledgerhq/coin-hedera": "^1.15.0-nightly.20251209023841",
|
|
191
|
+
"@ledgerhq/coin-icon": "^0.16.0-nightly.20251209023841",
|
|
192
|
+
"@ledgerhq/coin-internet_computer": "^1.12.0-nightly.20251209023841",
|
|
193
|
+
"@ledgerhq/coin-kaspa": "^1.5.0-nightly.20251209023841",
|
|
194
|
+
"@ledgerhq/coin-mina": "^1.5.0-nightly.20251209023841",
|
|
195
|
+
"@ledgerhq/coin-multiversx": "^0.9.0-nightly.20251209023841",
|
|
196
|
+
"@ledgerhq/coin-near": "^0.17.0-nightly.20251209023841",
|
|
197
|
+
"@ledgerhq/coin-polkadot": "^6.14.0-nightly.20251209023841",
|
|
198
|
+
"@ledgerhq/coin-solana": "^0.38.0-nightly.20251209023841",
|
|
199
|
+
"@ledgerhq/coin-stacks": "^0.13.0-nightly.20251209023841",
|
|
200
|
+
"@ledgerhq/coin-stellar": "^6.8.0-nightly.20251209023841",
|
|
201
|
+
"@ledgerhq/coin-sui": "^0.19.0-nightly.20251209023841",
|
|
202
|
+
"@ledgerhq/coin-tezos": "^6.10.0-nightly.20251209023841",
|
|
203
|
+
"@ledgerhq/coin-ton": "^0.18.0-nightly.20251209023841",
|
|
204
|
+
"@ledgerhq/coin-tron": "^5.8.0-nightly.20251209023841",
|
|
205
|
+
"@ledgerhq/coin-vechain": "^2.13.0-nightly.20251209023841",
|
|
206
|
+
"@ledgerhq/coin-xrp": "^7.9.0-nightly.20251209023841",
|
|
207
|
+
"@ledgerhq/cryptoassets": "^13.34.0-nightly.20251209023841",
|
|
208
|
+
"@ledgerhq/device-core": "^0.6.9-nightly.20251209023841",
|
|
209
|
+
"@ledgerhq/devices": "8.8.0-nightly.20251209023841",
|
|
210
|
+
"@ledgerhq/errors": "^6.28.0-nightly.20251209023841",
|
|
211
|
+
"@ledgerhq/hw-app-algorand": "^6.31.10-nightly.20251209023841",
|
|
212
|
+
"@ledgerhq/hw-app-aptos": "^6.34.10-nightly.20251209023841",
|
|
213
|
+
"@ledgerhq/hw-app-btc": "^10.13.0-nightly.20251209023841",
|
|
214
|
+
"@ledgerhq/hw-app-celo": "^6.35.4-nightly.20251209023841",
|
|
215
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.10-nightly.20251209023841",
|
|
216
|
+
"@ledgerhq/hw-app-eth": "^7.0.0-nightly.20251209023841",
|
|
217
|
+
"@ledgerhq/hw-app-exchange": "^0.18.0-nightly.20251209023841",
|
|
218
|
+
"@ledgerhq/hw-app-hedera": "^1.2.10-nightly.20251209023841",
|
|
219
|
+
"@ledgerhq/hw-app-icon": "^1.3.10-nightly.20251209023841",
|
|
220
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.3-nightly.20251209023841",
|
|
221
|
+
"@ledgerhq/hw-app-multiversx": "^6.26.1-nightly.20251209023841",
|
|
222
|
+
"@ledgerhq/hw-app-near": "^6.31.10-nightly.20251209023841",
|
|
223
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.10-nightly.20251209023841",
|
|
224
|
+
"@ledgerhq/hw-app-str": "^7.2.10-nightly.20251209023841",
|
|
225
225
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
226
|
-
"@ledgerhq/hw-app-tezos": "^6.31.10-nightly.
|
|
227
|
-
"@ledgerhq/hw-app-trx": "^6.31.10-nightly.
|
|
228
|
-
"@ledgerhq/hw-app-vet": "^0.8.0-nightly.
|
|
229
|
-
"@ledgerhq/hw-app-xrp": "^6.32.8-nightly.
|
|
230
|
-
"@ledgerhq/hw-bolos": "^6.32.10-nightly.
|
|
231
|
-
"@ledgerhq/hw-transport": "6.31.14-nightly.
|
|
232
|
-
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.
|
|
233
|
-
"@ledgerhq/ledger-cal-service": "^1.9.1-nightly.
|
|
234
|
-
"@ledgerhq/ledger-trust-service": "^0.4.3-nightly.
|
|
235
|
-
"@ledgerhq/live-config": "^3.
|
|
236
|
-
"@ledgerhq/live-countervalues": "^0.10.1-nightly.
|
|
237
|
-
"@ledgerhq/live-countervalues-react": "^0.7.3-nightly.
|
|
238
|
-
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.
|
|
239
|
-
"@ledgerhq/live-env": "^2.22.0-nightly.
|
|
240
|
-
"@ledgerhq/live-hooks": "0.
|
|
241
|
-
"@ledgerhq/live-network": "^2.1.2-nightly.
|
|
226
|
+
"@ledgerhq/hw-app-tezos": "^6.31.10-nightly.20251209023841",
|
|
227
|
+
"@ledgerhq/hw-app-trx": "^6.31.10-nightly.20251209023841",
|
|
228
|
+
"@ledgerhq/hw-app-vet": "^0.8.0-nightly.20251209023841",
|
|
229
|
+
"@ledgerhq/hw-app-xrp": "^6.32.8-nightly.20251209023841",
|
|
230
|
+
"@ledgerhq/hw-bolos": "^6.32.10-nightly.20251209023841",
|
|
231
|
+
"@ledgerhq/hw-transport": "6.31.14-nightly.20251209023841",
|
|
232
|
+
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.20251209023841",
|
|
233
|
+
"@ledgerhq/ledger-cal-service": "^1.9.1-nightly.20251209023841",
|
|
234
|
+
"@ledgerhq/ledger-trust-service": "^0.4.3-nightly.20251209023841",
|
|
235
|
+
"@ledgerhq/live-config": "^3.3.0-nightly.20251209023841",
|
|
236
|
+
"@ledgerhq/live-countervalues": "^0.10.1-nightly.20251209023841",
|
|
237
|
+
"@ledgerhq/live-countervalues-react": "^0.7.3-nightly.20251209023841",
|
|
238
|
+
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.20251209023841",
|
|
239
|
+
"@ledgerhq/live-env": "^2.22.0-nightly.20251209023841",
|
|
240
|
+
"@ledgerhq/live-hooks": "0.3.0-nightly.20251209023841",
|
|
241
|
+
"@ledgerhq/live-network": "^2.1.2-nightly.20251209023841",
|
|
242
242
|
"@ledgerhq/live-promise": "^0.1.1",
|
|
243
|
-
"@ledgerhq/live-signer-canton": "^0.5.2-nightly.
|
|
244
|
-
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.
|
|
245
|
-
"@ledgerhq/live-signer-solana": "^0.7.0-nightly.
|
|
246
|
-
"@ledgerhq/live-wallet": "^0.17.0-nightly.
|
|
243
|
+
"@ledgerhq/live-signer-canton": "^0.5.2-nightly.20251209023841",
|
|
244
|
+
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.20251209023841",
|
|
245
|
+
"@ledgerhq/live-signer-solana": "^0.7.0-nightly.20251209023841",
|
|
246
|
+
"@ledgerhq/live-wallet": "^0.17.0-nightly.20251209023841",
|
|
247
247
|
"@ledgerhq/logs": "^6.13.0",
|
|
248
|
-
"@ledgerhq/speculos-transport": "^0.3.0-nightly.
|
|
249
|
-
"@ledgerhq/wallet-api-acre-module": "^0.10.0-nightly.
|
|
250
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.19.0-nightly.
|
|
248
|
+
"@ledgerhq/speculos-transport": "^0.3.0-nightly.20251209023841",
|
|
249
|
+
"@ledgerhq/wallet-api-acre-module": "^0.10.0-nightly.20251209023841",
|
|
250
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.19.0-nightly.20251209023841"
|
|
251
251
|
},
|
|
252
252
|
"devDependencies": {
|
|
253
253
|
"@solana/web3.js": "1.95.4",
|
|
@@ -294,10 +294,10 @@
|
|
|
294
294
|
"undici": "6.19.2",
|
|
295
295
|
"uuid": "^8.3.2",
|
|
296
296
|
"ws": "8.18.3",
|
|
297
|
-
"@ledgerhq/device-react": "^0.3.3-nightly.
|
|
298
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
|
297
|
+
"@ledgerhq/device-react": "^0.3.3-nightly.20251209023841",
|
|
298
|
+
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251209023841",
|
|
299
299
|
"@ledgerhq/types-devices": "^6.27.0",
|
|
300
|
-
"@ledgerhq/types-live": "^6.90.0-nightly.
|
|
300
|
+
"@ledgerhq/types-live": "^6.90.0-nightly.20251209023841"
|
|
301
301
|
},
|
|
302
302
|
"scripts": {
|
|
303
303
|
"build": "zx ./scripts/build-ts.mjs",
|
|
@@ -99,7 +99,7 @@ const inferFamilyFromAccountId: (accountId: string) => string | null | undefined
|
|
|
99
99
|
try {
|
|
100
100
|
const { currencyId } = decodeAccountId(accountId);
|
|
101
101
|
return getCryptoCurrencyById(currencyId).family;
|
|
102
|
-
} catch
|
|
102
|
+
} catch {
|
|
103
103
|
return null;
|
|
104
104
|
}
|
|
105
105
|
},
|
package/src/account/support.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { getParentAccount } from "@ledgerhq/coin-framework/account/helpers";
|
|
2
2
|
import { Account } from "@ledgerhq/types-live";
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const tokensMap = new Map<string, { ticker: string; networkName: string }>();
|
|
8
|
-
|
|
4
|
+
export const getTokensWithFundsMap = (accounts: Account[]) => {
|
|
5
|
+
const tokensMap = new Map<string, { ticker: string; networkName: string; id: string }>();
|
|
9
6
|
for (const account of accounts) {
|
|
10
7
|
const { balance, currency } = account || {};
|
|
11
8
|
if (!balance?.gt(0) || !currency) continue;
|
|
@@ -18,6 +15,7 @@ export const getTokensWithFunds = (accounts: Account[]): string[] => {
|
|
|
18
15
|
tokensMap.set(mainKey, {
|
|
19
16
|
ticker: currency.ticker,
|
|
20
17
|
networkName,
|
|
18
|
+
id: currency.id,
|
|
21
19
|
});
|
|
22
20
|
|
|
23
21
|
account.subAccounts?.forEach(subAccount => {
|
|
@@ -28,9 +26,24 @@ export const getTokensWithFunds = (accounts: Account[]): string[] => {
|
|
|
28
26
|
tokensMap.set(subKey, {
|
|
29
27
|
ticker: token.ticker,
|
|
30
28
|
networkName,
|
|
29
|
+
id: token.id,
|
|
31
30
|
});
|
|
32
31
|
});
|
|
33
32
|
}
|
|
33
|
+
return tokensMap;
|
|
34
|
+
};
|
|
35
|
+
/** Format defaults to "USDT on Ethereum". format: "currencyId" returns the id of each token, e.g. "ethereum/erc20/usde". */
|
|
36
|
+
export const getTokensWithFunds = (
|
|
37
|
+
accounts: Account[],
|
|
38
|
+
customFormat: "currencyId" | "default" = "default",
|
|
39
|
+
) => {
|
|
40
|
+
if (!accounts?.length) return [];
|
|
41
|
+
|
|
42
|
+
const tokensMap = getTokensWithFundsMap(accounts);
|
|
43
|
+
|
|
44
|
+
if (customFormat === "currencyId") {
|
|
45
|
+
return Array.from(tokensMap.values(), token => token.id);
|
|
46
|
+
}
|
|
34
47
|
|
|
35
48
|
return Array.from(tokensMap.values(), ({ ticker, networkName }) => `${ticker} on ${networkName}`);
|
|
36
49
|
};
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { genAccount } from "@ledgerhq/coin-framework/lib/mocks/account";
|
|
2
|
+
import { getCryptoCurrencyById } from "../currencies/index";
|
|
3
|
+
import { Account } from "@ledgerhq/types-live";
|
|
4
|
+
import type { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
5
|
+
import BigNumber from "bignumber.js";
|
|
6
|
+
import { getTotalStakeableAssets } from "./getTotalStakeableAssets";
|
|
7
|
+
import { setupMockCryptoAssetsStore } from "@ledgerhq/cryptoassets/cal-client/test-helpers";
|
|
8
|
+
|
|
9
|
+
// Setup mock store for unit tests
|
|
10
|
+
setupMockCryptoAssetsStore();
|
|
11
|
+
|
|
12
|
+
const ETH = getCryptoCurrencyById("ethereum");
|
|
13
|
+
const BTC = getCryptoCurrencyById("bitcoin");
|
|
14
|
+
|
|
15
|
+
// Create mock tokens for tests
|
|
16
|
+
const ZRX_TOKEN: TokenCurrency = {
|
|
17
|
+
type: "TokenCurrency",
|
|
18
|
+
id: "ethereum/erc20/0x_project",
|
|
19
|
+
contractAddress: "0xE41d2489571d322189246DaFA5ebDe1F4699F498",
|
|
20
|
+
parentCurrency: ETH,
|
|
21
|
+
tokenType: "erc20",
|
|
22
|
+
name: "0x Project",
|
|
23
|
+
ticker: "ZRX",
|
|
24
|
+
delisted: false,
|
|
25
|
+
disableCountervalue: false,
|
|
26
|
+
units: [{ name: "ZRX", code: "ZRX", magnitude: 18 }],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const REP_TOKEN: TokenCurrency = {
|
|
30
|
+
type: "TokenCurrency",
|
|
31
|
+
id: "ethereum/erc20/augur",
|
|
32
|
+
contractAddress: "0x1985365e9f78359a9B6AD760e32412f4a445E862",
|
|
33
|
+
parentCurrency: ETH,
|
|
34
|
+
tokenType: "erc20",
|
|
35
|
+
name: "Augur",
|
|
36
|
+
ticker: "REP",
|
|
37
|
+
delisted: false,
|
|
38
|
+
disableCountervalue: false,
|
|
39
|
+
units: [{ name: "REP", code: "REP", magnitude: 18 }],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const mockedAccounts: Account[] = [
|
|
43
|
+
genAccount("mocked-account-1", {
|
|
44
|
+
currency: ETH,
|
|
45
|
+
tokensData: [ZRX_TOKEN, REP_TOKEN],
|
|
46
|
+
}),
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
describe("getTotalStakeableAssets", () => {
|
|
50
|
+
it("should return empty Set if no accounts", () => {
|
|
51
|
+
const result = getTotalStakeableAssets([], [], []);
|
|
52
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
53
|
+
expect(result.combinedIds.size).toBe(0);
|
|
54
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("should return empty Set if accounts is null", () => {
|
|
58
|
+
const result = getTotalStakeableAssets(null, [], []);
|
|
59
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
60
|
+
expect(result.combinedIds.size).toBe(0);
|
|
61
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("should return empty Set if accounts is undefined", () => {
|
|
65
|
+
const result = getTotalStakeableAssets(undefined, [], []);
|
|
66
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
67
|
+
expect(result.combinedIds.size).toBe(0);
|
|
68
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("should return empty Set if no staking currencies enabled", () => {
|
|
72
|
+
const result = getTotalStakeableAssets(mockedAccounts, [], []);
|
|
73
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
74
|
+
expect(result.combinedIds.size).toBe(0);
|
|
75
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("should return Set with matching currency ID when staking currency is enabled", () => {
|
|
79
|
+
const account = mockedAccounts[0];
|
|
80
|
+
const stakingCurrenciesEnabled = [ETH.id]; // "ethereum"
|
|
81
|
+
|
|
82
|
+
expect(account.balance).toBeTruthy();
|
|
83
|
+
expect(account.balance instanceof BigNumber).toBe(true);
|
|
84
|
+
expect(account.balance.gt(0)).toBe(true);
|
|
85
|
+
|
|
86
|
+
const result = getTotalStakeableAssets([account], stakingCurrenciesEnabled, []);
|
|
87
|
+
|
|
88
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
89
|
+
expect(result.combinedIds.size).toBe(1);
|
|
90
|
+
expect(result.combinedIds.has(ETH.id)).toBe(true);
|
|
91
|
+
expect(result.stakeableAssets.length).toBe(1);
|
|
92
|
+
expect(result.stakeableAssets[0]).toEqual({
|
|
93
|
+
ticker: ETH.ticker,
|
|
94
|
+
networkName: ETH.name,
|
|
95
|
+
id: ETH.id,
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("should return Set with matching token IDs when staking tokens are enabled", () => {
|
|
100
|
+
const account = mockedAccounts[0];
|
|
101
|
+
const stakingCurrenciesEnabled = [ZRX_TOKEN.id, REP_TOKEN.id];
|
|
102
|
+
|
|
103
|
+
expect(account.subAccounts).toBeDefined();
|
|
104
|
+
expect(account.subAccounts?.length).toBe(2);
|
|
105
|
+
|
|
106
|
+
const result = getTotalStakeableAssets([account], stakingCurrenciesEnabled, []);
|
|
107
|
+
|
|
108
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
109
|
+
expect(result.combinedIds.size).toBe(2);
|
|
110
|
+
expect(result.combinedIds.has(ZRX_TOKEN.id)).toBe(true);
|
|
111
|
+
expect(result.combinedIds.has(REP_TOKEN.id)).toBe(true);
|
|
112
|
+
expect(result.stakeableAssets.length).toBe(2);
|
|
113
|
+
expect(result.stakeableAssets).toEqual(
|
|
114
|
+
expect.arrayContaining([
|
|
115
|
+
expect.objectContaining({ id: ZRX_TOKEN.id, ticker: ZRX_TOKEN.ticker }),
|
|
116
|
+
expect.objectContaining({ id: REP_TOKEN.id, ticker: REP_TOKEN.ticker }),
|
|
117
|
+
]),
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should return Set with both currency and token IDs when both are enabled", () => {
|
|
122
|
+
const account = mockedAccounts[0];
|
|
123
|
+
const stakingCurrenciesEnabled = [ETH.id, ZRX_TOKEN.id, REP_TOKEN.id];
|
|
124
|
+
|
|
125
|
+
const result = getTotalStakeableAssets([account], stakingCurrenciesEnabled, []);
|
|
126
|
+
|
|
127
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
128
|
+
expect(result.combinedIds.size).toBe(3);
|
|
129
|
+
expect(result.combinedIds.has(ETH.id)).toBe(true);
|
|
130
|
+
expect(result.combinedIds.has(ZRX_TOKEN.id)).toBe(true);
|
|
131
|
+
expect(result.combinedIds.has(REP_TOKEN.id)).toBe(true);
|
|
132
|
+
expect(result.stakeableAssets.length).toBe(3);
|
|
133
|
+
expect(result.stakeableAssets).toEqual(
|
|
134
|
+
expect.arrayContaining([
|
|
135
|
+
expect.objectContaining({ id: ETH.id, ticker: ETH.ticker }),
|
|
136
|
+
expect.objectContaining({ id: ZRX_TOKEN.id, ticker: ZRX_TOKEN.ticker }),
|
|
137
|
+
expect.objectContaining({ id: REP_TOKEN.id, ticker: REP_TOKEN.ticker }),
|
|
138
|
+
]),
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("should filter out currencies without funds", () => {
|
|
143
|
+
const account = mockedAccounts[0];
|
|
144
|
+
const accountWithZeroBalance = { ...account, balance: new BigNumber(0) };
|
|
145
|
+
const stakingCurrenciesEnabled = [ETH.id];
|
|
146
|
+
|
|
147
|
+
const result = getTotalStakeableAssets([accountWithZeroBalance], stakingCurrenciesEnabled, []);
|
|
148
|
+
|
|
149
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
150
|
+
expect(result.combinedIds.size).toBe(0);
|
|
151
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it("should filter out tokens without funds", () => {
|
|
155
|
+
const account = mockedAccounts[0];
|
|
156
|
+
const [zrxAccount, repAccount] = account.subAccounts || [];
|
|
157
|
+
const emptyRepAccount = { ...repAccount, balance: new BigNumber(0) };
|
|
158
|
+
const accountWithEmptyToken = { ...account, subAccounts: [zrxAccount, emptyRepAccount] };
|
|
159
|
+
const stakingCurrenciesEnabled = [ZRX_TOKEN.id, REP_TOKEN.id];
|
|
160
|
+
|
|
161
|
+
const result = getTotalStakeableAssets([accountWithEmptyToken], stakingCurrenciesEnabled, []);
|
|
162
|
+
|
|
163
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
164
|
+
expect(result.combinedIds.size).toBe(1);
|
|
165
|
+
expect(result.combinedIds.has(ZRX_TOKEN.id)).toBe(true);
|
|
166
|
+
expect(result.combinedIds.has(REP_TOKEN.id)).toBe(false);
|
|
167
|
+
expect(result.stakeableAssets.length).toBe(1);
|
|
168
|
+
expect(result.stakeableAssets[0]).toEqual(
|
|
169
|
+
expect.objectContaining({ id: ZRX_TOKEN.id, ticker: ZRX_TOKEN.ticker }),
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("should include partner staking currencies enabled", () => {
|
|
174
|
+
const account = mockedAccounts[0];
|
|
175
|
+
const stakingCurrenciesEnabled = [ETH.id];
|
|
176
|
+
const partnerStakingCurrenciesEnabled = [ZRX_TOKEN.id];
|
|
177
|
+
|
|
178
|
+
const result = getTotalStakeableAssets(
|
|
179
|
+
[account],
|
|
180
|
+
stakingCurrenciesEnabled,
|
|
181
|
+
partnerStakingCurrenciesEnabled,
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
185
|
+
expect(result.combinedIds.size).toBe(2);
|
|
186
|
+
expect(result.combinedIds.has(ETH.id)).toBe(true);
|
|
187
|
+
expect(result.combinedIds.has(ZRX_TOKEN.id)).toBe(true);
|
|
188
|
+
expect(result.stakeableAssets.length).toBe(2);
|
|
189
|
+
expect(result.stakeableAssets).toEqual(
|
|
190
|
+
expect.arrayContaining([
|
|
191
|
+
expect.objectContaining({ id: ETH.id, ticker: ETH.ticker }),
|
|
192
|
+
expect.objectContaining({ id: ZRX_TOKEN.id, ticker: ZRX_TOKEN.ticker }),
|
|
193
|
+
]),
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("should deduplicate IDs when same currency appears in both lists", () => {
|
|
198
|
+
const account = mockedAccounts[0];
|
|
199
|
+
const stakingCurrenciesEnabled = [ETH.id];
|
|
200
|
+
const partnerStakingCurrenciesEnabled = [ETH.id]; // Same currency
|
|
201
|
+
|
|
202
|
+
const result = getTotalStakeableAssets(
|
|
203
|
+
[account],
|
|
204
|
+
stakingCurrenciesEnabled,
|
|
205
|
+
partnerStakingCurrenciesEnabled,
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
209
|
+
expect(result.combinedIds.size).toBe(1);
|
|
210
|
+
expect(result.combinedIds.has(ETH.id)).toBe(true);
|
|
211
|
+
expect(result.stakeableAssets.length).toBe(1);
|
|
212
|
+
expect(result.stakeableAssets[0]).toEqual({
|
|
213
|
+
ticker: ETH.ticker,
|
|
214
|
+
networkName: ETH.name,
|
|
215
|
+
id: ETH.id,
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it("should handle multiple accounts with different currencies", () => {
|
|
220
|
+
const ethAccount = mockedAccounts[0];
|
|
221
|
+
const btcAccount = genAccount("mocked-account-2", {
|
|
222
|
+
currency: BTC,
|
|
223
|
+
});
|
|
224
|
+
const accounts = [ethAccount, btcAccount];
|
|
225
|
+
const stakingCurrenciesEnabled = [ETH.id, BTC.id];
|
|
226
|
+
|
|
227
|
+
const result = getTotalStakeableAssets(accounts, stakingCurrenciesEnabled, []);
|
|
228
|
+
|
|
229
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
230
|
+
expect(result.combinedIds.size).toBe(2);
|
|
231
|
+
expect(result.combinedIds.has(ETH.id)).toBe(true);
|
|
232
|
+
expect(result.combinedIds.has(BTC.id)).toBe(true);
|
|
233
|
+
expect(result.stakeableAssets.length).toBe(2);
|
|
234
|
+
expect(result.stakeableAssets).toEqual(
|
|
235
|
+
expect.arrayContaining([
|
|
236
|
+
expect.objectContaining({ id: ETH.id, ticker: ETH.ticker }),
|
|
237
|
+
expect.objectContaining({ id: BTC.id, ticker: BTC.ticker }),
|
|
238
|
+
]),
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
it("should only include IDs that match staking currencies enabled", () => {
|
|
243
|
+
const account = mockedAccounts[0];
|
|
244
|
+
const stakingCurrenciesEnabled = [ZRX_TOKEN.id]; // Only ZRX enabled, not ETH or REP
|
|
245
|
+
|
|
246
|
+
const result = getTotalStakeableAssets([account], stakingCurrenciesEnabled, []);
|
|
247
|
+
|
|
248
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
249
|
+
expect(result.combinedIds.size).toBe(1);
|
|
250
|
+
expect(result.combinedIds.has(ZRX_TOKEN.id)).toBe(true);
|
|
251
|
+
expect(result.combinedIds.has(ETH.id)).toBe(false);
|
|
252
|
+
expect(result.combinedIds.has(REP_TOKEN.id)).toBe(false);
|
|
253
|
+
expect(result.stakeableAssets.length).toBe(1);
|
|
254
|
+
expect(result.stakeableAssets[0]).toEqual(
|
|
255
|
+
expect.objectContaining({ id: ZRX_TOKEN.id, ticker: ZRX_TOKEN.ticker }),
|
|
256
|
+
);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it("should handle empty arrays for staking currencies", () => {
|
|
260
|
+
const account = mockedAccounts[0];
|
|
261
|
+
const result = getTotalStakeableAssets([account], [], []);
|
|
262
|
+
|
|
263
|
+
expect(result.combinedIds).toBeInstanceOf(Set);
|
|
264
|
+
expect(result.combinedIds.size).toBe(0);
|
|
265
|
+
expect(result.stakeableAssets).toEqual([]);
|
|
266
|
+
});
|
|
267
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getTokensWithFundsMap } from "./getTokensWithFunds";
|
|
2
|
+
import { Account } from "@ledgerhq/types-live";
|
|
3
|
+
|
|
4
|
+
export function getTotalStakeableAssets(
|
|
5
|
+
accounts: Account[] | null | undefined,
|
|
6
|
+
stakingCurrenciesEnabled: string[],
|
|
7
|
+
partnerStakingCurrenciesEnabled: string[],
|
|
8
|
+
): {
|
|
9
|
+
combinedIds: Set<string>;
|
|
10
|
+
stakeableAssets: { ticker: string; networkName: string; id: string }[];
|
|
11
|
+
} {
|
|
12
|
+
if (!accounts) return { combinedIds: new Set<string>(), stakeableAssets: [] };
|
|
13
|
+
|
|
14
|
+
const accountsWithFundsCurrencies = accounts
|
|
15
|
+
.filter(account => account?.balance.isGreaterThan(0))
|
|
16
|
+
.map(account => account?.currency);
|
|
17
|
+
|
|
18
|
+
const allStakingCurrenciesEnabled = new Set([
|
|
19
|
+
...stakingCurrenciesEnabled,
|
|
20
|
+
...partnerStakingCurrenciesEnabled,
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const tokenWithFundsMap = getTokensWithFundsMap(accounts);
|
|
24
|
+
const filteredAccountCurrencyIds = [...accountsWithFundsCurrencies].filter(currency =>
|
|
25
|
+
allStakingCurrenciesEnabled.has(currency.id),
|
|
26
|
+
);
|
|
27
|
+
const filteredTokenWithFunds = [...tokenWithFundsMap.values()].filter(token =>
|
|
28
|
+
allStakingCurrenciesEnabled.has(token.id),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const combined = new Map<string, { ticker: string; networkName: string; id: string }>();
|
|
32
|
+
for (const currency of filteredAccountCurrencyIds) {
|
|
33
|
+
combined.set(currency.id, {
|
|
34
|
+
ticker: currency.ticker,
|
|
35
|
+
networkName: currency.name,
|
|
36
|
+
id: currency.id,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
for (const token of filteredTokenWithFunds) {
|
|
40
|
+
combined.set(token.id, token);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
combinedIds: new Set(Array.from(combined.values(), details => details.id)),
|
|
45
|
+
stakeableAssets: Array.from(combined.values()),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -735,6 +735,7 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
735
735
|
zcashShielded: DEFAULT_FEATURE,
|
|
736
736
|
llmNanoOnboardingFundWallet: DEFAULT_FEATURE,
|
|
737
737
|
lldRebornABtest: DEFAULT_FEATURE,
|
|
738
|
+
llmRebornABtest: DEFAULT_FEATURE,
|
|
738
739
|
};
|
|
739
740
|
|
|
740
741
|
// Firebase SDK treat JSON values as strings
|
package/src/mock/account.ts
CHANGED
|
@@ -199,7 +199,7 @@ export function genAccount(id: number | string, opts: GenAccountOptions = {}): A
|
|
|
199
199
|
if (initAccount) {
|
|
200
200
|
initAccount(account);
|
|
201
201
|
}
|
|
202
|
-
} catch
|
|
202
|
+
} catch {
|
|
203
203
|
// to fix /src/__tests__/cross.ts, skip bridge error if there is no bridge in such currency
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -390,11 +390,13 @@ export const handlers = ({
|
|
|
390
390
|
customFeeConfig,
|
|
391
391
|
swapAppVersion,
|
|
392
392
|
sponsored,
|
|
393
|
+
isEmbedded,
|
|
393
394
|
} = params;
|
|
394
395
|
|
|
395
396
|
const trackingParams = {
|
|
396
397
|
provider: params.provider,
|
|
397
398
|
exchangeType: params.exchangeType,
|
|
399
|
+
isEmbeddedSwap: isEmbedded,
|
|
398
400
|
};
|
|
399
401
|
|
|
400
402
|
tracking.startExchangeRequested(trackingParams);
|
|
@@ -472,6 +474,7 @@ export const handlers = ({
|
|
|
472
474
|
const trackingCompleteParams = {
|
|
473
475
|
provider: params.provider,
|
|
474
476
|
exchangeType: params.exchangeType,
|
|
477
|
+
isEmbeddedSwap: isEmbedded,
|
|
475
478
|
};
|
|
476
479
|
tracking.completeExchangeRequested(trackingCompleteParams);
|
|
477
480
|
|