@ocap/indexdb 1.13.57 → 1.13.61
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 +5 -11
- package/package.json +4 -4
package/lib/util.js
CHANGED
|
@@ -80,9 +80,6 @@ const createIndexedToken = (x) => ({
|
|
|
80
80
|
data: x.data,
|
|
81
81
|
genesisTime: x.context.genesisTime,
|
|
82
82
|
renaissanceTime: x.context.renaissanceTime,
|
|
83
|
-
|
|
84
|
-
// TODO: deprecate this field
|
|
85
|
-
erc20ContractAddress: x.foreignToken ? x.foreignToken.contractAddress : '',
|
|
86
83
|
});
|
|
87
84
|
|
|
88
85
|
const createIndexedFactory = async (factory, context) => {
|
|
@@ -133,9 +130,6 @@ const createIndexedTransaction = (tx, ctx) => {
|
|
|
133
130
|
if (ctx.delegatorState) {
|
|
134
131
|
tx.accounts.push(ctx.delegatorState.address);
|
|
135
132
|
}
|
|
136
|
-
if (ctx.stakeState) {
|
|
137
|
-
tx.accounts.push(ctx.stakeState.address);
|
|
138
|
-
}
|
|
139
133
|
if (Array.isArray(ctx.delegatorStates)) {
|
|
140
134
|
tx.accounts.push(...ctx.delegatorStates.map((x) => x.address));
|
|
141
135
|
}
|
|
@@ -189,6 +183,8 @@ const createIndexedTransaction = (tx, ctx) => {
|
|
|
189
183
|
tx.tokenSymbols = [];
|
|
190
184
|
}
|
|
191
185
|
|
|
186
|
+
tx.accounts = [...tx.accounts, ...tx.stakes];
|
|
187
|
+
|
|
192
188
|
return tx;
|
|
193
189
|
};
|
|
194
190
|
|
|
@@ -249,6 +245,8 @@ const createIndexedRollup = async (x, ctx) => {
|
|
|
249
245
|
'blockHeight',
|
|
250
246
|
'blockHash',
|
|
251
247
|
'leaveWaitingPeriod',
|
|
248
|
+
'publishWaitingPeriod',
|
|
249
|
+
'publishSlashRate',
|
|
252
250
|
'data',
|
|
253
251
|
]),
|
|
254
252
|
genesisTime: x.context.genesisTime,
|
|
@@ -259,11 +257,6 @@ const createIndexedRollup = async (x, ctx) => {
|
|
|
259
257
|
const tokenState = ctx.tokenStates.find((t) => t.address === x.tokenAddress);
|
|
260
258
|
rollup.tokenInfo = formatTokenMeta({ address: x.tokenAddress, value: '0' }, ctx.tokenStates);
|
|
261
259
|
rollup.foreignToken = tokenState.foreignToken;
|
|
262
|
-
|
|
263
|
-
// TODO: deprecate following 3 fields
|
|
264
|
-
rollup.erc20TokenAddress = tokenState.foreignToken.contractAddress;
|
|
265
|
-
rollup.foreignChainType = tokenState.foreignToken.chainType;
|
|
266
|
-
rollup.foreignChainId = tokenState.foreignToken.chainName;
|
|
267
260
|
}
|
|
268
261
|
|
|
269
262
|
return rollup;
|
|
@@ -284,6 +277,7 @@ const createIndexedRollupBlock = async (x, ctx) => {
|
|
|
284
277
|
'mintedAmount',
|
|
285
278
|
'burnedAmount',
|
|
286
279
|
'rewardAmount',
|
|
280
|
+
'minReward',
|
|
287
281
|
'data',
|
|
288
282
|
]),
|
|
289
283
|
genesisTime: x.context.genesisTime,
|
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.61",
|
|
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.61",
|
|
26
|
+
"@ocap/util": "1.13.61",
|
|
27
27
|
"kareem": "^2.3.2",
|
|
28
28
|
"lodash": "^4.17.21"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "79d07bbde4df1d0d37afe76aaa1eaa2f30cc55a7"
|
|
31
31
|
}
|