@leofcoin/chain 1.5.64 → 1.5.65
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/exports/browser/chain.js +5 -1
- package/exports/chain.js +3 -0
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -14,7 +14,8 @@ const debug$5 = (target, text) => {
|
|
|
14
14
|
globalThis.DEBUG === 'true' ||
|
|
15
15
|
globalThis.DEBUG === true ||
|
|
16
16
|
globalThis.DEBUG?.indexOf(target) !== -1 ||
|
|
17
|
-
globalThis.DEBUG?.indexOf('*') !== -1
|
|
17
|
+
globalThis.DEBUG?.indexOf('*') !== -1 ||
|
|
18
|
+
globalThis.DEBUG?.indexOf(target.split('/')[0]) !== -1
|
|
18
19
|
)
|
|
19
20
|
if (text) console.log('\x1b[34m\x1b[1m%s', `${target}: ${text}`, '\x1b[0m');
|
|
20
21
|
else console.log('\x1b[34m\x1b[1m%s', `${target}`, '\x1b[0m');
|
|
@@ -3926,6 +3927,9 @@ class Machine {
|
|
|
3926
3927
|
}
|
|
3927
3928
|
case 'debug': {
|
|
3928
3929
|
debug$2(data.message);
|
|
3930
|
+
if (data.message.includes('loaded transactions for block:')) {
|
|
3931
|
+
pubsub.publish('block-loaded', data.message.replace('loaded transactions for block: ', '').split(' @')[0]);
|
|
3932
|
+
}
|
|
3929
3933
|
break;
|
|
3930
3934
|
}
|
|
3931
3935
|
case 'error': {
|
package/exports/chain.js
CHANGED
|
@@ -312,6 +312,9 @@ class Machine {
|
|
|
312
312
|
}
|
|
313
313
|
case 'debug': {
|
|
314
314
|
debug$2(data.message);
|
|
315
|
+
if (data.message.includes('loaded transactions for block:')) {
|
|
316
|
+
pubsub.publish('block-loaded', data.message.replace('loaded transactions for block: ', '').split(' @')[0]);
|
|
317
|
+
}
|
|
315
318
|
break;
|
|
316
319
|
}
|
|
317
320
|
case 'error': {
|