dash 3.21.4 → 3.21.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dash",
3
- "version": "3.21.4",
3
+ "version": "3.21.5",
4
4
  "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)",
5
5
  "main": "build/src/index.js",
6
6
  "unpkg": "dist/dash.min.js",
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "homepage": "https://github.com/dashevo/DashJS#readme",
36
36
  "dependencies": {
37
- "@dashevo/dapi-client": "~0.21.4",
38
- "@dashevo/dashcore-lib": "~0.19.27",
39
- "@dashevo/dpp": "~0.21.4",
40
- "@dashevo/grpc-common": "~0.21.4",
41
- "@dashevo/wallet-lib": "~7.21.4",
37
+ "@dashevo/dapi-client": "~0.21.5",
38
+ "@dashevo/dashcore-lib": "~0.19.28",
39
+ "@dashevo/dpp": "~0.21.5",
40
+ "@dashevo/grpc-common": "~0.21.5",
41
+ "@dashevo/wallet-lib": "~7.21.5",
42
42
  "bs58": "^4.0.1",
43
43
  "node-inspect-extracted": "^1.0.8"
44
44
  },
@@ -17,26 +17,30 @@ const TxStreamDataResponseMock = require('@dashevo/wallet-lib/src/test/mocks/TxS
17
17
  const TransportMock = require('@dashevo/wallet-lib/src/test/mocks/TransportMock');
18
18
 
19
19
  function makeTxStreamEmitISLocksForTransactions(transportMock, txStreamMock) {
20
- transportMock.sendTransaction.callsFake((txString) => {
21
- const transaction = new Transaction(txString);
22
- const isLock = createFakeInstantLock(transaction.hash);
23
-
24
- // Emit IS lock for the transaction
25
- txStreamMock.emit(
26
- TxStreamMock.EVENTS.data,
27
- new TxStreamDataResponseMock(
28
- { instantSendLockMessages: [isLock.toBuffer()] }
29
- )
30
- );
31
-
32
- // Emit the same transaction back to the client so it will know about the change transaction
33
- txStreamMock.emit(
34
- TxStreamMock.EVENTS.data,
35
- new TxStreamDataResponseMock(
36
- { rawTransactions: [transaction.toBuffer()] }
37
- )
38
- );
39
- });
20
+ transportMock.sendTransaction.callsFake((txString) => {
21
+ const transaction = new Transaction(txString);
22
+ const isLock = createFakeInstantLock(transaction.hash);
23
+
24
+ setImmediate(() => {
25
+ // Emit IS lock for the transaction
26
+ txStreamMock.emit(
27
+ TxStreamMock.EVENTS.data,
28
+ new TxStreamDataResponseMock(
29
+ { instantSendLockMessages: [isLock.toBuffer()] }
30
+ )
31
+ );
32
+ })
33
+
34
+ // Emit the same transaction back to the client so it will know about the change transaction
35
+ txStreamMock.emit(
36
+ TxStreamMock.EVENTS.data,
37
+ new TxStreamDataResponseMock(
38
+ { rawTransactions: [transaction.toBuffer()] }
39
+ )
40
+ );
41
+
42
+ return transaction.hash;
43
+ });
40
44
  }
41
45
 
42
46
  /**
@@ -88,4 +92,4 @@ export async function createAndAttachTransportMocksToClient(client, sinon) {
88
92
  makeGetIdentityRespondWithIdentity(client, dapiClientMock);
89
93
 
90
94
  return { txStreamMock, transportMock, dapiClientMock };
91
- }
95
+ }