lunesjs 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,8 +40,9 @@ jobs:
40
40
  - uses: actions/checkout@v1
41
41
  - uses: actions/setup-node@v1
42
42
  with:
43
- node-version: 16
43
+ node-version: 14
44
44
  - run: yarn install
45
+ - run: yarn build
45
46
  - uses: JS-DevTools/npm-publish@v1
46
47
  with:
47
48
  token: ${{ secrets.NPM_TOKEN }}
@@ -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 : 0)));
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 : 0)));
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 : 0)));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunesjs",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Library for communication with nodes in mainnet or testnet of the lunes-blockchain network",
5
5
  "main": "dist/*.js",
6
6
  "types": "dist/*.d.ts",
@@ -41,21 +41,21 @@ export function accountFactory({
41
41
  ...cryptoUtils.fromExistingSeed(
42
42
  seed,
43
43
  nonce != undefined ? nonce : 0,
44
- chain != undefined ? chain : 0
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 : 0
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 : 0
58
+ chain != undefined ? chain : 1
59
59
  )
60
60
  })
61
61
  } else if (address != undefined) {