@ledgerhq/cryptoassets 13.3.0-nightly.1 → 13.3.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/lib/crypto-assets-importer/importers/eip712/index.d.ts +1 -0
- package/lib/crypto-assets-importer/importers/eip712/index.d.ts.map +1 -1
- package/lib/crypto-assets-importer/importers/eip712/index.js +26 -3
- package/lib/crypto-assets-importer/importers/eip712/index.js.map +1 -1
- package/lib/crypto-assets-importer/index.js +1 -0
- package/lib/crypto-assets-importer/index.js.map +1 -1
- package/lib/data/eip712_v2-hash.json +1 -0
- package/lib/data/eip712_v2.d.ts +4 -0
- package/lib/data/eip712_v2.d.ts.map +1 -0
- package/lib/data/eip712_v2.js +11 -0
- package/lib/data/eip712_v2.js.map +1 -0
- package/lib/data/eip712_v2.json +1 -0
- package/lib-es/crypto-assets-importer/importers/eip712/index.d.ts +1 -0
- package/lib-es/crypto-assets-importer/importers/eip712/index.d.ts.map +1 -1
- package/lib-es/crypto-assets-importer/importers/eip712/index.js +24 -2
- package/lib-es/crypto-assets-importer/importers/eip712/index.js.map +1 -1
- package/lib-es/crypto-assets-importer/index.js +2 -1
- package/lib-es/crypto-assets-importer/index.js.map +1 -1
- package/lib-es/data/eip712_v2-hash.json +1 -0
- package/lib-es/data/eip712_v2.d.ts +4 -0
- package/lib-es/data/eip712_v2.d.ts.map +1 -0
- package/lib-es/data/eip712_v2.js +4 -0
- package/lib-es/data/eip712_v2.js.map +1 -0
- package/lib-es/data/eip712_v2.json +1 -0
- package/package.json +1 -1
- package/src/crypto-assets-importer/importers/eip712/index.ts +25 -2
- package/src/crypto-assets-importer/index.ts +2 -1
- package/src/data/eip712_v2-hash.json +1 -0
- package/src/data/eip712_v2.json +1 -0
- package/src/data/eip712_v2.ts +3 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ type EIP712 = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const importEIP712 = async (outputDir: string) => {
|
|
14
|
-
console.log("importing
|
|
14
|
+
console.log("importing EIP712....");
|
|
15
15
|
try {
|
|
16
16
|
const [eip712, hash] = await fetchTokens<EIP712>("eip712.json");
|
|
17
17
|
if (eip712) {
|
|
@@ -26,7 +26,30 @@ ${hash ? `export { default as hash } from "./eip712-hash.json";` : null}
|
|
|
26
26
|
export default EIP712;
|
|
27
27
|
`;
|
|
28
28
|
fs.writeFileSync(`${filePath}.ts`, tsContent);
|
|
29
|
-
console.log("importing
|
|
29
|
+
console.log("importing EIP712 sucess");
|
|
30
|
+
}
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error(err);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const importEIP712v2 = async (outputDir: string) => {
|
|
37
|
+
console.log("importing EIP712 V2....");
|
|
38
|
+
try {
|
|
39
|
+
const [eip712, hash] = await fetchTokens<EIP712>("eip712_v2.json");
|
|
40
|
+
if (eip712) {
|
|
41
|
+
const filePath = path.join(outputDir, "eip712_v2");
|
|
42
|
+
fs.writeFileSync(`${filePath}.json`, JSON.stringify(eip712));
|
|
43
|
+
if (hash) {
|
|
44
|
+
fs.writeFileSync(`${filePath}-hash.json`, JSON.stringify(hash));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const tsContent = `import EIP712 from "./eip712_v2.json";
|
|
48
|
+
${hash ? `export { default as hash } from "./eip712_v2-hash.json";` : null}
|
|
49
|
+
export default EIP712;
|
|
50
|
+
`;
|
|
51
|
+
fs.writeFileSync(`${filePath}.ts`, tsContent);
|
|
52
|
+
console.log("importing EIP712 V2 sucess");
|
|
30
53
|
}
|
|
31
54
|
} catch (err) {
|
|
32
55
|
console.error(err);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
|
|
3
|
-
import { importEIP712 } from "./importers/eip712";
|
|
3
|
+
import { importEIP712, importEIP712v2 } from "./importers/eip712";
|
|
4
4
|
import { importERC20 } from "./importers/erc20";
|
|
5
5
|
import { importEVMTokens } from "./importers/evm";
|
|
6
6
|
import { importBEP20 } from "./importers/bep20";
|
|
@@ -25,6 +25,7 @@ const outputFolder = path.join(__dirname, "../data");
|
|
|
25
25
|
const importTokens = async () => {
|
|
26
26
|
const promises = [
|
|
27
27
|
importEIP712(outputFolder),
|
|
28
|
+
importEIP712v2(outputFolder),
|
|
28
29
|
importERC20(outputFolder),
|
|
29
30
|
importEVMTokens(outputFolder),
|
|
30
31
|
importBEP20(outputFolder),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"\"3947a4c10cf74972d6b871d729e05220\""
|