lunesjs 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,13 +17,13 @@ class Account {
|
|
17
17
|
}
|
18
18
|
function accountFactory({ privateKey, publicKey, address, nWords, chain, nonce, seed } = {}) {
|
19
19
|
if (seed != undefined) {
|
20
|
-
return new Account(Object.assign({}, crypto_1.default.fromExistingSeed(seed, nonce != undefined ? nonce : 0, chain != undefined ? chain :
|
20
|
+
return new Account(Object.assign({}, crypto_1.default.fromExistingSeed(seed, nonce != undefined ? nonce : 0, chain != undefined ? chain : 1)));
|
21
21
|
}
|
22
22
|
else if (privateKey != undefined) {
|
23
|
-
return new Account(Object.assign({}, crypto_1.default.fromPrivateKey(privateKey, chain != undefined ? chain :
|
23
|
+
return new Account(Object.assign({}, crypto_1.default.fromPrivateKey(privateKey, chain != undefined ? chain : 1)));
|
24
24
|
}
|
25
25
|
else if (publicKey != undefined) {
|
26
|
-
return new Account(Object.assign({}, crypto_1.default.fromPublicKey(publicKey, chain != undefined ? chain :
|
26
|
+
return new Account(Object.assign({}, crypto_1.default.fromPublicKey(publicKey, chain != undefined ? chain : 1)));
|
27
27
|
}
|
28
28
|
else if (address != undefined) {
|
29
29
|
return new Account(Object.assign({}, crypto_1.default.fromAddress(address, chain != undefined ? chain : 0)));
|
package/package.json
CHANGED
@@ -41,21 +41,21 @@ export function accountFactory({
|
|
41
41
|
...cryptoUtils.fromExistingSeed(
|
42
42
|
seed,
|
43
43
|
nonce != undefined ? nonce : 0,
|
44
|
-
chain != undefined ? chain :
|
44
|
+
chain != undefined ? chain : 1
|
45
45
|
)
|
46
46
|
})
|
47
47
|
} else if (privateKey != undefined) {
|
48
48
|
return new Account({
|
49
49
|
...cryptoUtils.fromPrivateKey(
|
50
50
|
privateKey,
|
51
|
-
chain != undefined ? chain :
|
51
|
+
chain != undefined ? chain : 1
|
52
52
|
)
|
53
53
|
})
|
54
54
|
} else if (publicKey != undefined) {
|
55
55
|
return new Account({
|
56
56
|
...cryptoUtils.fromPublicKey(
|
57
57
|
publicKey,
|
58
|
-
chain != undefined ? chain :
|
58
|
+
chain != undefined ? chain : 1
|
59
59
|
)
|
60
60
|
})
|
61
61
|
} else if (address != undefined) {
|