@ledgerhq/live-common 34.42.0-nightly.0 → 34.42.0-nightly.2
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/__tests__/migration/account-migration.js +3 -0
- package/lib/__tests__/migration/account-migration.js.map +1 -1
- package/lib/__tests__/test-helpers/environment.js +3 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/bridge/crypto-assets/index.d.ts +2 -2
- package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib/bridge/crypto-assets/index.js +5 -5
- package/lib/bridge/crypto-assets/index.js.map +1 -1
- package/lib/bridge/crypto-assets/index.test.js +17 -1
- package/lib/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib/bridge/impl.d.ts +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +2 -0
- package/lib/bridge/impl.js.map +1 -1
- package/lib/bridge/useBridgeTransaction.test.js +1 -1
- package/lib/bridge/useBridgeTransaction.test.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts +3 -0
- package/lib/e2e/families/osmosis.d.ts.map +1 -0
- package/lib/e2e/families/osmosis.js +19 -0
- package/lib/e2e/families/osmosis.js.map +1 -0
- package/lib/e2e/index.d.ts +6 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +5 -2
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/families/evm/config.d.ts.map +1 -1
- package/lib/families/evm/config.js +51 -0
- package/lib/families/evm/config.js.map +1 -1
- package/lib/families/evm/walletApiAdapter.js +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts +3 -0
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +3 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +6 -6
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/__tests__/migration/account-migration.js +3 -0
- package/lib-es/__tests__/migration/account-migration.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +3 -0
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.d.ts +2 -2
- package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib-es/bridge/crypto-assets/index.js +5 -5
- package/lib-es/bridge/crypto-assets/index.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.test.js +17 -1
- package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib-es/bridge/impl.d.ts +1 -1
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/bridge/impl.js +3 -1
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/bridge/useBridgeTransaction.test.js +1 -1
- package/lib-es/bridge/useBridgeTransaction.test.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts +3 -0
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -0
- package/lib-es/e2e/families/osmosis.js +12 -0
- package/lib-es/e2e/families/osmosis.js.map +1 -0
- package/lib-es/e2e/index.d.ts +6 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +5 -2
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/families/evm/config.d.ts.map +1 -1
- package/lib-es/families/evm/config.js +51 -0
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/families/evm/walletApiAdapter.js +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts +3 -0
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +3 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +6 -6
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/package.json +41 -41
- package/src/__tests__/migration/account-migration.ts +3 -0
- package/src/__tests__/test-helpers/environment.ts +3 -0
- package/src/bridge/crypto-assets/index.test.ts +20 -2
- package/src/bridge/crypto-assets/index.ts +7 -7
- package/src/bridge/impl.ts +4 -2
- package/src/bridge/useBridgeTransaction.test.ts +1 -1
- package/src/e2e/families/osmosis.ts +13 -0
- package/src/e2e/speculos.ts +5 -2
- package/src/families/evm/config.ts +51 -0
- package/src/families/evm/walletApiAdapter.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +3 -0
- package/src/wallet-api/Exchange/server.ts +7 -6
- package/lib/bridge/crypto-assets/type.d.ts +0 -9
- package/lib/bridge/crypto-assets/type.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/type.js +0 -3
- package/lib/bridge/crypto-assets/type.js.map +0 -1
- package/lib-es/bridge/crypto-assets/type.d.ts +0 -9
- package/lib-es/bridge/crypto-assets/type.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/type.js +0 -2
- package/lib-es/bridge/crypto-assets/type.js.map +0 -1
- package/src/bridge/crypto-assets/type.ts +0 -9
@@ -1,9 +1,27 @@
|
|
1
|
-
import { LiveConfig } from "@ledgerhq/live-config/
|
1
|
+
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
2
2
|
import { getCryptoAssetsStore, setCryptoAssetsStore } from ".";
|
3
3
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
4
|
-
import { CryptoAssetsStore } from "
|
4
|
+
import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
|
5
5
|
|
6
6
|
describe("Testing CryptoAssetStore", () => {
|
7
|
+
it("should return the default methods from cryptoassets libs when feature flag does not exists", () => {
|
8
|
+
LiveConfig.setConfig({
|
9
|
+
some_other_feature: {
|
10
|
+
type: "boolean",
|
11
|
+
default: true,
|
12
|
+
},
|
13
|
+
});
|
14
|
+
|
15
|
+
const store = getCryptoAssetsStore();
|
16
|
+
expect(store).toEqual({
|
17
|
+
findTokenByAddress: legacy.findTokenByAddress,
|
18
|
+
getTokenById: legacy.getTokenById,
|
19
|
+
findTokenById: legacy.findTokenById,
|
20
|
+
findTokenByAddressInCurrency: legacy.findTokenByAddressInCurrency,
|
21
|
+
findTokenByTicker: legacy.findTokenByTicker,
|
22
|
+
});
|
23
|
+
});
|
24
|
+
|
7
25
|
it("should return the default methods from cryptoassets libs when feature flag is disabled", () => {
|
8
26
|
LiveConfig.setConfig({
|
9
27
|
feature_cal_lazy_loading: {
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { LiveConfig } from "@ledgerhq/live-config/
|
2
|
-
import { CryptoAssetsStore } from "
|
1
|
+
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
2
|
+
import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
|
3
3
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
4
4
|
|
5
|
-
let
|
5
|
+
let cryptoAssetsStore: CryptoAssetsStore | undefined = undefined;
|
6
6
|
|
7
7
|
export function setCryptoAssetsStore(store: CryptoAssetsStore) {
|
8
|
-
|
8
|
+
cryptoAssetsStore = store;
|
9
9
|
}
|
10
10
|
|
11
11
|
const legacyStore: CryptoAssetsStore = {
|
@@ -16,15 +16,15 @@ const legacyStore: CryptoAssetsStore = {
|
|
16
16
|
findTokenByTicker: legacy.findTokenByTicker,
|
17
17
|
};
|
18
18
|
|
19
|
-
export function getCryptoAssetsStore(): CryptoAssetsStore
|
19
|
+
export function getCryptoAssetsStore(): CryptoAssetsStore {
|
20
20
|
const featureEnabled = LiveConfig.getValueByKey("feature_cal_lazy_loading");
|
21
21
|
if (!featureEnabled) {
|
22
22
|
return legacyStore;
|
23
23
|
}
|
24
24
|
|
25
|
-
if (!
|
25
|
+
if (!cryptoAssetsStore) {
|
26
26
|
throw new Error("CryptoAssetsStore is not set. Please call setCryptoAssetsStore first.");
|
27
27
|
}
|
28
28
|
|
29
|
-
return
|
29
|
+
return cryptoAssetsStore;
|
30
30
|
}
|
package/src/bridge/impl.ts
CHANGED
@@ -20,8 +20,9 @@ import {
|
|
20
20
|
import { getAlpacaAccountBridge } from "./generic-alpaca/accountBridge";
|
21
21
|
import { getAlpacaCurrencyBridge } from "./generic-alpaca/currencyBridge";
|
22
22
|
import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/errors";
|
23
|
-
import { CryptoAssetsStore } from "
|
24
|
-
import { setCryptoAssetsStore } from "
|
23
|
+
import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
|
24
|
+
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
25
|
+
import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
|
25
26
|
|
26
27
|
const alpacaized = {
|
27
28
|
xrp: true,
|
@@ -104,6 +105,7 @@ export function getAccountBridgeByFamily(family: string, accountId?: string): Ac
|
|
104
105
|
|
105
106
|
export function setup(store: CryptoAssetsStore) {
|
106
107
|
setCryptoAssetsStore(store);
|
108
|
+
setCryptoAssetsStoreForCoinFramework(getCryptoAssetsStore());
|
107
109
|
}
|
108
110
|
|
109
111
|
function wrapAccountBridge<T extends TransactionCommon>(
|
@@ -11,7 +11,7 @@ import useBridgeTransaction, {
|
|
11
11
|
getGlobalOnBridgeError,
|
12
12
|
} from "./useBridgeTransaction";
|
13
13
|
import { setSupportedCurrencies } from "../currencies";
|
14
|
-
import { LiveConfig } from "@ledgerhq/live-config/
|
14
|
+
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
15
15
|
|
16
16
|
const BTC = getCryptoCurrencyById("bitcoin");
|
17
17
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Delegate } from "../models/Delegate";
|
2
|
+
import { containsSubstringInEvent, pressBoth, pressUntilTextFound, waitFor } from "../speculos";
|
3
|
+
import { DeviceLabels } from "../enum/DeviceLabels";
|
4
|
+
import expect from "expect";
|
5
|
+
|
6
|
+
export async function delegateOsmosis(delegatingAccount: Delegate) {
|
7
|
+
await waitFor(DeviceLabels.PLEASE_REVIEW);
|
8
|
+
const events = await pressUntilTextFound(DeviceLabels.CAPS_APPROVE);
|
9
|
+
const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
|
10
|
+
const isAmountCorrect = containsSubstringInEvent(amountInUosmo, events);
|
11
|
+
expect(isAmountCorrect).toBeTruthy();
|
12
|
+
await pressBoth();
|
13
|
+
}
|
package/src/e2e/speculos.ts
CHANGED
@@ -38,6 +38,7 @@ import { delegateMultiversX } from "./families/multiversX";
|
|
38
38
|
import { NFTTransaction, Transaction } from "./models/Transaction";
|
39
39
|
import { Delegate } from "./models/Delegate";
|
40
40
|
import { Swap } from "./models/Swap";
|
41
|
+
import { delegateOsmosis } from "./families/osmosis";
|
41
42
|
|
42
43
|
const isSpeculosRemote = process.env.REMOTE_SPECULOS === "true";
|
43
44
|
|
@@ -414,7 +415,7 @@ interface ResponseData {
|
|
414
415
|
events: Event[];
|
415
416
|
}
|
416
417
|
|
417
|
-
export async function waitFor(text: string, maxAttempts =
|
418
|
+
export async function waitFor(text: string, maxAttempts = 15): Promise<string[]> {
|
418
419
|
const port = getEnv("SPECULOS_API_PORT");
|
419
420
|
const address = process.env.SPECULOS_ADDRESS || "http://127.0.0.1";
|
420
421
|
const url = `${address}:${port}/events?stream=false¤tscreenonly=true`;
|
@@ -656,9 +657,11 @@ export async function signDelegationTransaction(delegatingAccount: Delegate) {
|
|
656
657
|
break;
|
657
658
|
case Account.ATOM_1.currency.name:
|
658
659
|
case Account.INJ_1.currency.name:
|
659
|
-
case Account.OSMO_1.currency.name:
|
660
660
|
await delegateCosmos(delegatingAccount);
|
661
661
|
break;
|
662
|
+
case Account.OSMO_1.currency.name:
|
663
|
+
await delegateOsmosis(delegatingAccount);
|
664
|
+
break;
|
662
665
|
case Account.MULTIVERS_X_1.currency.name:
|
663
666
|
await delegateMultiversX();
|
664
667
|
break;
|
@@ -612,6 +612,57 @@ const evmConfig: CurrencyLiveConfigDefinition = {
|
|
612
612
|
showNfts: false,
|
613
613
|
},
|
614
614
|
},
|
615
|
+
config_currency_sei_network_evm: {
|
616
|
+
type: "object",
|
617
|
+
default: {
|
618
|
+
status: {
|
619
|
+
type: "active",
|
620
|
+
},
|
621
|
+
node: {
|
622
|
+
type: "external",
|
623
|
+
uri: "https://sei-evm-rpc.publicnode.com",
|
624
|
+
},
|
625
|
+
explorer: {
|
626
|
+
type: "etherscan",
|
627
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1329",
|
628
|
+
},
|
629
|
+
showNfts: false,
|
630
|
+
},
|
631
|
+
},
|
632
|
+
config_currency_berachain: {
|
633
|
+
type: "object",
|
634
|
+
default: {
|
635
|
+
status: {
|
636
|
+
type: "active",
|
637
|
+
},
|
638
|
+
node: {
|
639
|
+
type: "external",
|
640
|
+
uri: "https://rpc.berachain.com",
|
641
|
+
},
|
642
|
+
explorer: {
|
643
|
+
type: "etherscan",
|
644
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/80094",
|
645
|
+
},
|
646
|
+
showNfts: false,
|
647
|
+
},
|
648
|
+
},
|
649
|
+
config_currency_hyperevm: {
|
650
|
+
type: "object",
|
651
|
+
default: {
|
652
|
+
status: {
|
653
|
+
type: "active",
|
654
|
+
},
|
655
|
+
node: {
|
656
|
+
type: "external",
|
657
|
+
uri: "https://rpc.hypurrscan.io",
|
658
|
+
},
|
659
|
+
explorer: {
|
660
|
+
type: "etherscan",
|
661
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/999",
|
662
|
+
},
|
663
|
+
showNfts: false,
|
664
|
+
},
|
665
|
+
},
|
615
666
|
config_currency_polygon_zk_evm: {
|
616
667
|
type: "object",
|
617
668
|
default: {
|
@@ -48,7 +48,7 @@ const convertToLiveTransaction: ConvertToLiveTransaction<
|
|
48
48
|
|
49
49
|
/**
|
50
50
|
* We explicitly set unrelated type specific fields to undefined to avoid transaction
|
51
|
-
* type assertion errors during the `prepareTransaction` logic (libs/coin-evm/src/prepareTransaction.ts)
|
51
|
+
* type assertion errors during the `prepareTransaction` logic (libs/coin-modules/coin-evm/src/bridge/prepareTransaction.ts)
|
52
52
|
* when performing an `updateTransaction` with a newly created tx
|
53
53
|
* Which is what happen in this case (in apps/ledger-live-desktop/src/renderer/modals/SignTransaction/Body.tsx):
|
54
54
|
// `createTransaction` will create a type 2 tx by default with `maxFeePerGas` and `maxPriorityFeePerGas` set to 0
|
@@ -92,6 +92,9 @@ export const CURRENCY_DEFAULT_FEATURES = {
|
|
92
92
|
currencySui: DEFAULT_FEATURE,
|
93
93
|
currencyMina: DEFAULT_FEATURE,
|
94
94
|
currencyBabylon: DEFAULT_FEATURE,
|
95
|
+
currencySeiNetworkEvm: DEFAULT_FEATURE,
|
96
|
+
currencyBerachain: DEFAULT_FEATURE,
|
97
|
+
currencyHyperevm: DEFAULT_FEATURE,
|
95
98
|
};
|
96
99
|
|
97
100
|
/**
|
@@ -51,6 +51,7 @@ import { getSwapStepFromError } from "../../exchange/error";
|
|
51
51
|
import { postSwapCancelled } from "../../exchange/swap";
|
52
52
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
53
53
|
import { setBroadcastTransaction } from "../../exchange/swap/setBroadcastTransaction";
|
54
|
+
import { FAMILIES_MAPPING_LL_TO_WAPI } from "../constants";
|
54
55
|
|
55
56
|
export { ExchangeType };
|
56
57
|
|
@@ -485,7 +486,9 @@ export const handlers = ({
|
|
485
486
|
});
|
486
487
|
|
487
488
|
const mainFromAccount = getMainAccount(fromAccount, fromParentAccount);
|
488
|
-
const mainFromAccountFamily =
|
489
|
+
const mainFromAccountFamily =
|
490
|
+
FAMILIES_MAPPING_LL_TO_WAPI[mainFromAccount.currency.family] ||
|
491
|
+
mainFromAccount.currency.family;
|
489
492
|
|
490
493
|
if (transaction.family !== mainFromAccountFamily) {
|
491
494
|
return Promise.reject(
|
@@ -741,9 +744,7 @@ async function getStrategy(
|
|
741
744
|
customErrorType?: any,
|
742
745
|
): Promise<Transaction> {
|
743
746
|
const family =
|
744
|
-
currency.type === "TokenCurrency"
|
745
|
-
? (currency.parentCurrency?.family as Transaction["family"])
|
746
|
-
: (currency.family as Transaction["family"]);
|
747
|
+
currency.type === "TokenCurrency" ? currency.parentCurrency?.family : currency.family;
|
747
748
|
|
748
749
|
if (!family) {
|
749
750
|
throw new Error(`TokenCurrency missing parentCurrency family: ${currency.id}`);
|
@@ -755,7 +756,7 @@ async function getStrategy(
|
|
755
756
|
}
|
756
757
|
|
757
758
|
// Normalize family key for strategy lookup
|
758
|
-
const familyKey = family
|
759
|
+
const familyKey = FAMILIES_MAPPING_LL_TO_WAPI[family] || family;
|
759
760
|
const strategy = transactionStrategy?.[familyKey];
|
760
761
|
|
761
762
|
if (!strategy) {
|
@@ -764,7 +765,7 @@ async function getStrategy(
|
|
764
765
|
|
765
766
|
try {
|
766
767
|
return await strategy({
|
767
|
-
family,
|
768
|
+
family: familyKey,
|
768
769
|
amount,
|
769
770
|
recipient,
|
770
771
|
customFeeConfig: customFeeConfig || {},
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
2
|
-
export type CryptoAssetsStore = {
|
3
|
-
findTokenByAddress(address: string): TokenCurrency | undefined;
|
4
|
-
getTokenById(id: string): TokenCurrency;
|
5
|
-
findTokenById(id: string): TokenCurrency | undefined;
|
6
|
-
findTokenByAddressInCurrency(address: string, currencyId: string): TokenCurrency | undefined;
|
7
|
-
findTokenByTicker(ticker: string): TokenCurrency | undefined;
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=type.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/bridge/crypto-assets/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/D,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;IACxC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IACrD,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC7F,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC9D,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/bridge/crypto-assets/type.ts"],"names":[],"mappings":""}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
2
|
-
export type CryptoAssetsStore = {
|
3
|
-
findTokenByAddress(address: string): TokenCurrency | undefined;
|
4
|
-
getTokenById(id: string): TokenCurrency;
|
5
|
-
findTokenById(id: string): TokenCurrency | undefined;
|
6
|
-
findTokenByAddressInCurrency(address: string, currencyId: string): TokenCurrency | undefined;
|
7
|
-
findTokenByTicker(ticker: string): TokenCurrency | undefined;
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=type.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/bridge/crypto-assets/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/D,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;IACxC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IACrD,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC7F,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC9D,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/bridge/crypto-assets/type.ts"],"names":[],"mappings":""}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
2
|
-
|
3
|
-
export type CryptoAssetsStore = {
|
4
|
-
findTokenByAddress(address: string): TokenCurrency | undefined;
|
5
|
-
getTokenById(id: string): TokenCurrency;
|
6
|
-
findTokenById(id: string): TokenCurrency | undefined;
|
7
|
-
findTokenByAddressInCurrency(address: string, currencyId: string): TokenCurrency | undefined;
|
8
|
-
findTokenByTicker(ticker: string): TokenCurrency | undefined;
|
9
|
-
};
|