@ledgerhq/live-common 21.17.1 → 21.19.0
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/addAccounts.d.ts.map +1 -1
- package/lib/account/addAccounts.js +3 -2
- package/lib/account/addAccounts.js.map +1 -1
- package/lib/bridge/jsHelpers.js +2 -2
- package/lib/bridge/jsHelpers.js.map +1 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.d.ts.map +1 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.js +12 -2
- package/lib/families/bitcoin/getAccountNetworkInfo.js.map +1 -1
- package/lib/families/bitcoin/types.d.ts +1 -0
- package/lib/families/bitcoin/types.d.ts.map +1 -1
- package/lib/families/bitcoin/types.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts +1 -0
- package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.js +19 -0
- package/lib/families/bitcoin/wallet-btc/explorer/index.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/explorer/types.d.ts +1 -0
- package/lib/families/bitcoin/wallet-btc/explorer/types.d.ts.map +1 -1
- package/lib/families/ethereum/cli-transaction.d.ts.map +1 -1
- package/lib/families/ethereum/cli-transaction.js +10 -0
- package/lib/families/ethereum/cli-transaction.js.map +1 -1
- package/lib/families/ethereum/modules/erc1155.d.ts +4 -0
- package/lib/families/ethereum/modules/erc1155.d.ts.map +1 -0
- package/lib/families/ethereum/modules/erc1155.js +117 -0
- package/lib/families/ethereum/modules/erc1155.js.map +1 -0
- package/lib/families/ethereum/modules/erc721.d.ts +4 -0
- package/lib/families/ethereum/modules/erc721.d.ts.map +1 -0
- package/lib/families/ethereum/modules/erc721.js +95 -0
- package/lib/families/ethereum/modules/erc721.js.map +1 -0
- package/lib/families/ethereum/modules/index.d.ts +3 -1
- package/lib/families/ethereum/modules/index.d.ts.map +1 -1
- package/lib/families/ethereum/modules/index.js +5 -1
- package/lib/families/ethereum/modules/index.js.map +1 -1
- package/lib/families/ethereum/nft.test.d.ts +2 -0
- package/lib/families/ethereum/nft.test.d.ts.map +1 -0
- package/lib/families/ethereum/nft.test.js +167 -0
- package/lib/families/ethereum/nft.test.js.map +1 -0
- package/lib/families/ethereum/signOperation.d.ts.map +1 -1
- package/lib/families/ethereum/signOperation.js +1 -9
- package/lib/families/ethereum/signOperation.js.map +1 -1
- package/lib/families/ethereum/synchronisation.test.js.map +1 -1
- package/lib/families/ethereum/transaction.d.ts.map +1 -1
- package/lib/families/ethereum/transaction.js +25 -8
- package/lib/families/ethereum/transaction.js.map +1 -1
- package/lib/families/ethereum/types.d.ts +6 -0
- package/lib/families/ethereum/types.d.ts.map +1 -1
- package/lib/families/ethereum/types.js.map +1 -1
- package/lib/hw/uninstallApp.d.ts.map +1 -1
- package/lib/hw/uninstallApp.js +1 -1
- package/lib/hw/uninstallApp.js.map +1 -1
- package/lib/nft/helpers.d.ts +2 -1
- package/lib/nft/helpers.d.ts.map +1 -1
- package/lib/nft/helpers.js +8 -1
- package/lib/nft/helpers.js.map +1 -1
- package/package.json +6 -6
- package/src/account/addAccounts.ts +3 -2
- package/src/bridge/jsHelpers.ts +2 -2
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +2 -0
- package/src/families/bitcoin/getAccountNetworkInfo.ts +8 -1
- package/src/families/bitcoin/types.ts +1 -0
- package/src/families/bitcoin/wallet-btc/explorer/index.ts +7 -0
- package/src/families/bitcoin/wallet-btc/explorer/types.ts +1 -0
- package/src/families/ethereum/cli-transaction.ts +10 -0
- package/src/families/ethereum/modules/erc1155.ts +142 -0
- package/src/families/ethereum/modules/erc721.ts +108 -0
- package/src/families/ethereum/modules/index.ts +12 -1
- package/src/families/ethereum/nft.test.ts +90 -0
- package/src/families/ethereum/signOperation.ts +1 -13
- package/src/families/ethereum/synchronisation.test.ts +1 -0
- package/src/families/ethereum/transaction.ts +38 -8
- package/src/families/ethereum/types.ts +6 -0
- package/src/hw/uninstallApp.ts +13 -8
- package/src/nft/helpers.ts +9 -1
- package/src/types/account.ts +1 -1
- package/src/.DS_Store +0 -0
- package/src/__tests__/.DS_Store +0 -0
- package/src/currencies/.DS_Store +0 -0
|
@@ -37,6 +37,9 @@ export type Transaction = TransactionCommon & {
|
|
|
37
37
|
feeCustomUnit: Unit | null | undefined;
|
|
38
38
|
networkInfo: NetworkInfo | null | undefined;
|
|
39
39
|
allowZeroAmount?: boolean;
|
|
40
|
+
collection?: string;
|
|
41
|
+
tokenIds?: string[];
|
|
42
|
+
quantities?: BigNumber[];
|
|
40
43
|
};
|
|
41
44
|
export type TransactionRaw = TransactionCommonRaw & {
|
|
42
45
|
family: "ethereum";
|
|
@@ -49,6 +52,9 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
49
52
|
feeCustomUnit: Unit | null | undefined;
|
|
50
53
|
networkInfo: NetworkInfoRaw | null | undefined;
|
|
51
54
|
allowZeroAmount?: boolean;
|
|
55
|
+
tokenIds?: string[];
|
|
56
|
+
collection?: string;
|
|
57
|
+
quantities?: string[];
|
|
52
58
|
};
|
|
53
59
|
export type TypedMessage = {
|
|
54
60
|
types: {
|
package/src/hw/uninstallApp.ts
CHANGED
|
@@ -9,14 +9,19 @@ export default function uninstallApp(
|
|
|
9
9
|
targetId: string | number,
|
|
10
10
|
app: ApplicationVersion | App
|
|
11
11
|
): Observable<any> {
|
|
12
|
-
return ManagerAPI.install(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
return ManagerAPI.install(
|
|
13
|
+
transport,
|
|
14
|
+
"uninstall-app",
|
|
15
|
+
{
|
|
16
|
+
targetId,
|
|
17
|
+
perso: app.perso,
|
|
18
|
+
deleteKey: app.delete_key,
|
|
19
|
+
firmware: app.delete,
|
|
20
|
+
firmwareKey: app.delete_key,
|
|
21
|
+
hash: app.hash,
|
|
22
|
+
},
|
|
23
|
+
true
|
|
24
|
+
).pipe(
|
|
20
25
|
ignoreElements(),
|
|
21
26
|
catchError((e: Error) => {
|
|
22
27
|
if (!e || !e.message) return throwError(e);
|
package/src/nft/helpers.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import eip55 from "eip55";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
|
-
import { NFT, Operation } from "../types";
|
|
3
|
+
import { NFT, Operation, Transaction } from "../types";
|
|
4
4
|
|
|
5
5
|
type Collection = NFT["collection"];
|
|
6
6
|
|
|
@@ -76,3 +76,11 @@ export const nftsByCollections = (
|
|
|
76
76
|
export const getNftKey = (contract: string, tokenId: string): string => {
|
|
77
77
|
return `${contract}-${tokenId}`;
|
|
78
78
|
};
|
|
79
|
+
|
|
80
|
+
export const isNftTransaction = (transaction: Transaction): boolean => {
|
|
81
|
+
if (transaction.family === "ethereum") {
|
|
82
|
+
return ["erc721.transfer", "erc1155.transfer"].includes(transaction.mode);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return false;
|
|
86
|
+
};
|
package/src/types/account.ts
CHANGED
|
@@ -215,7 +215,7 @@ export type Account = {
|
|
|
215
215
|
swapHistory: SwapOperation[];
|
|
216
216
|
// Hash used to discard tx history on sync
|
|
217
217
|
syncHash?: string;
|
|
218
|
-
// Array of NFTs computed by diffing NFTOperations
|
|
218
|
+
// Array of NFTs computed by diffing NFTOperations ordered from newest to oldest
|
|
219
219
|
nfts?: NFT[];
|
|
220
220
|
};
|
|
221
221
|
export type SubAccount = TokenAccount | ChildAccount;
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/__tests__/.DS_Store
DELETED
|
Binary file
|
package/src/currencies/.DS_Store
DELETED
|
Binary file
|