@talismn/keyring 1.0.1 → 1.0.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.
|
@@ -276,9 +276,11 @@ class Keyring {
|
|
|
276
276
|
account.isPortfolio = isPortfolio;
|
|
277
277
|
}
|
|
278
278
|
// allow updating genesisHash only for contacts
|
|
279
|
-
if (account.type === "contact"
|
|
280
|
-
if (
|
|
281
|
-
|
|
279
|
+
if (account.type === "contact") {
|
|
280
|
+
if (genesisHash) {
|
|
281
|
+
if (!isHexString(genesisHash)) throw new Error("genesisHash must be a hex string");
|
|
282
|
+
account.genesisHash = genesisHash;
|
|
283
|
+
} else delete account.genesisHash;
|
|
282
284
|
}
|
|
283
285
|
return accountFromStorage(account);
|
|
284
286
|
}
|
|
@@ -276,9 +276,11 @@ class Keyring {
|
|
|
276
276
|
account.isPortfolio = isPortfolio;
|
|
277
277
|
}
|
|
278
278
|
// allow updating genesisHash only for contacts
|
|
279
|
-
if (account.type === "contact"
|
|
280
|
-
if (
|
|
281
|
-
|
|
279
|
+
if (account.type === "contact") {
|
|
280
|
+
if (genesisHash) {
|
|
281
|
+
if (!isHexString(genesisHash)) throw new Error("genesisHash must be a hex string");
|
|
282
|
+
account.genesisHash = genesisHash;
|
|
283
|
+
} else delete account.genesisHash;
|
|
282
284
|
}
|
|
283
285
|
return accountFromStorage(account);
|
|
284
286
|
}
|
|
@@ -274,9 +274,11 @@ class Keyring {
|
|
|
274
274
|
account.isPortfolio = isPortfolio;
|
|
275
275
|
}
|
|
276
276
|
// allow updating genesisHash only for contacts
|
|
277
|
-
if (account.type === "contact"
|
|
278
|
-
if (
|
|
279
|
-
|
|
277
|
+
if (account.type === "contact") {
|
|
278
|
+
if (genesisHash) {
|
|
279
|
+
if (!isHexString(genesisHash)) throw new Error("genesisHash must be a hex string");
|
|
280
|
+
account.genesisHash = genesisHash;
|
|
281
|
+
} else delete account.genesisHash;
|
|
280
282
|
}
|
|
281
283
|
return accountFromStorage(account);
|
|
282
284
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talismn/keyring",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "Talisman",
|
|
5
5
|
"homepage": "https://talisman.xyz",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"node": ">=18"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@talismn/crypto": "0.
|
|
25
|
+
"@talismn/crypto": "0.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/jest": "^29.5.14",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"jest-fixed-jsdom": "^0.0.9",
|
|
32
32
|
"ts-jest": "^29.2.5",
|
|
33
33
|
"typescript": "^5.6.3",
|
|
34
|
-
"@talismn/
|
|
35
|
-
"@talismn/
|
|
34
|
+
"@talismn/eslint-config": "0.0.3",
|
|
35
|
+
"@talismn/tsconfig": "0.0.2"
|
|
36
36
|
},
|
|
37
37
|
"preconstruct": {
|
|
38
38
|
"entrypoints": [
|