trucoshi 7.2.0 → 7.2.1

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.
@@ -51,7 +51,12 @@ function Rng() {
51
51
  * @param {number} nonce - the nonce
52
52
  * @returns {string} combined string
53
53
  */
54
- combine: (clientSeed, serverSeed, bitcoinHash, nonce) => clientSeed + serverSeed + bitcoinHash + nonce,
54
+ combine: (clientSeed, serverSeed, bitcoinHash, nonce) => {
55
+ if (bitcoinHash) {
56
+ return clientSeed + serverSeed + bitcoinHash + nonce;
57
+ }
58
+ return clientSeed + serverSeed + nonce;
59
+ },
55
60
  /**
56
61
  * Generates a sha512 hash from a string
57
62
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Lightning Truco Server",
5
5
  "main": "dist/types.js",
6
6
  "license": "GPL-3.0",