@ocap/indexdb 1.13.62 → 1.13.66
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/util.js +12 -3
- package/package.json +4 -4
package/lib/util.js
CHANGED
@@ -24,12 +24,12 @@ const createIndexedAccount = async (x, getTokenFn) => {
|
|
24
24
|
|
25
25
|
return {
|
26
26
|
address: x.address,
|
27
|
-
balance: x.balance,
|
27
|
+
balance: x.balance || '0',
|
28
28
|
migratedTo: x.migratedTo[0] || '',
|
29
29
|
moniker: x.moniker,
|
30
30
|
nonce: x.nonce,
|
31
|
-
numAssets: x.numAssets,
|
32
|
-
numTxs: x.numTxs,
|
31
|
+
numAssets: x.numAssets || 0,
|
32
|
+
numTxs: x.numTxs || 0,
|
33
33
|
recentNumTxs: [],
|
34
34
|
renaissanceTime: x.context.renaissanceTime,
|
35
35
|
tokens: Object.keys(x.tokens || {}).map((address) =>
|
@@ -124,6 +124,15 @@ const createIndexedTransaction = (tx, ctx) => {
|
|
124
124
|
tx.valid = tx.code === 'OK';
|
125
125
|
|
126
126
|
// accounts
|
127
|
+
if (ctx.senderState) {
|
128
|
+
tx.accounts.push(ctx.senderState.address);
|
129
|
+
}
|
130
|
+
if (ctx.receiverState) {
|
131
|
+
tx.accounts.push(ctx.receiverState.address);
|
132
|
+
}
|
133
|
+
if (ctx.vaultState) {
|
134
|
+
tx.accounts.push(ctx.vaultState.address);
|
135
|
+
}
|
127
136
|
if (ctx.updatedAccounts && Array.isArray(ctx.updatedAccounts)) {
|
128
137
|
tx.accounts.push(...ctx.updatedAccounts.map((x) => x.address));
|
129
138
|
}
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"publishConfig": {
|
4
4
|
"access": "public"
|
5
5
|
},
|
6
|
-
"version": "1.13.
|
6
|
+
"version": "1.13.66",
|
7
7
|
"description": "Defines the basic interface for OCAP IndexDB",
|
8
8
|
"main": "lib/main.js",
|
9
9
|
"files": [
|
@@ -22,10 +22,10 @@
|
|
22
22
|
"jest": "^27.3.1"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@ocap/state": "1.13.
|
26
|
-
"@ocap/util": "1.13.
|
25
|
+
"@ocap/state": "1.13.66",
|
26
|
+
"@ocap/util": "1.13.66",
|
27
27
|
"kareem": "^2.3.2",
|
28
28
|
"lodash": "^4.17.21"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "1395a8dccee398dd0aed47c2b54a2c6e350d8621"
|
31
31
|
}
|