@ocap/indexdb 1.18.124 → 1.18.125
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/lib/util.js +7 -2
- package/package.json +4 -4
package/lib/util.js
CHANGED
|
@@ -220,6 +220,9 @@ const createIndexedTransaction = async (tx, ctx, indexdb) => {
|
|
|
220
220
|
if (ctx.txType === 'fg:t:slash_stake') {
|
|
221
221
|
tx.accounts.push(ctx.stakeState.sender);
|
|
222
222
|
}
|
|
223
|
+
if (ctx.txType === 'fg:t:return_stake') {
|
|
224
|
+
tx.accounts.push(ctx.stakeState.sender);
|
|
225
|
+
}
|
|
223
226
|
}
|
|
224
227
|
if (Array.isArray(ctx.stakeStates)) {
|
|
225
228
|
tx.stakes.push(...ctx.stakeStates.map((x) => x.address));
|
|
@@ -367,7 +370,7 @@ const formatTxBeforeInsert = (row) => {
|
|
|
367
370
|
tx.assets.push(...tx.tx.itxJson.assets);
|
|
368
371
|
} else if (['transfer_v3', 'stake'].includes(tx.type)) {
|
|
369
372
|
tx.assets.push(...createSortedList(tx.tx.itxJson.inputs.map((x) => x.assets)));
|
|
370
|
-
} else if (['revoke_stake'].includes(tx.type)) {
|
|
373
|
+
} else if (['revoke_stake', 'slash_stake', 'return_stake'].includes(tx.type)) {
|
|
371
374
|
tx.assets.push(...createSortedList(tx.tx.itxJson.outputs.map((x) => x.assets)));
|
|
372
375
|
} else if (['exchange', 'exchange_v2'].includes(tx.type)) {
|
|
373
376
|
tx.assets.push(...(tx.tx.itxJson.sender.assets || []), ...(tx.tx.itxJson.receiver.assets || []));
|
|
@@ -387,7 +390,7 @@ const formatTxBeforeInsert = (row) => {
|
|
|
387
390
|
tx.tokens.push(...tx.tx.itxJson.tokens.map((x) => x.address));
|
|
388
391
|
} else if (['transfer_v3', 'stake'].includes(tx.type)) {
|
|
389
392
|
tx.tokens.push(...createSortedList(tx.tx.itxJson.inputs.map((x) => x.tokens.map((t) => t.address))));
|
|
390
|
-
} else if (['revoke_stake'].includes(tx.type)) {
|
|
393
|
+
} else if (['revoke_stake', 'slash_stake', 'return_stake'].includes(tx.type)) {
|
|
391
394
|
tx.tokens.push(...createSortedList(tx.tx.itxJson.outputs.map((x) => x.tokens.map((t) => t.address))));
|
|
392
395
|
} else if (tx.type === 'exchange_v2') {
|
|
393
396
|
tx.tokens.push(
|
|
@@ -553,6 +556,8 @@ const isDefaultTokenChanged = (tx, token) => {
|
|
|
553
556
|
case 'fg:t:stake':
|
|
554
557
|
return itx.inputs.some(isChangedByInput);
|
|
555
558
|
case 'fg:t:revoke_stake':
|
|
559
|
+
case 'fg:t:slash_stake':
|
|
560
|
+
case 'fg:t:return_stake':
|
|
556
561
|
return itx.outputs.some(isChangedByInput);
|
|
557
562
|
default:
|
|
558
563
|
return false;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.18.
|
|
6
|
+
"version": "1.18.125",
|
|
7
7
|
"description": "Defines the basic interface for OCAP IndexDB",
|
|
8
8
|
"main": "lib/main.js",
|
|
9
9
|
"files": [
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"jest": "^27.5.1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ocap/state": "1.18.
|
|
29
|
-
"@ocap/util": "1.18.
|
|
28
|
+
"@ocap/state": "1.18.125",
|
|
29
|
+
"@ocap/util": "1.18.125",
|
|
30
30
|
"kareem": "^2.4.1",
|
|
31
31
|
"lodash": "^4.17.21"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "95177ceb3e85f6557cced378c5e2bc0684ec0218"
|
|
34
34
|
}
|