@ocap/resolver 1.18.0 → 1.18.2
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/index.js +7 -2
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -156,7 +156,7 @@ module.exports = class OCAPResolver {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
async sendTx({ tx: txBase64 }) {
|
|
159
|
+
async sendTx({ tx: txBase64 }, ctx = {}) {
|
|
160
160
|
debug('sendTx', txBase64);
|
|
161
161
|
|
|
162
162
|
if (process.env.CHAIN_MODE === 'readonly') {
|
|
@@ -164,7 +164,7 @@ module.exports = class OCAPResolver {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
// 0. create new context
|
|
167
|
-
const context = { txBase64, statedb: this.statedb, indexdb: this.indexdb, config: this.config };
|
|
167
|
+
const context = { ...ctx, txBase64, statedb: this.statedb, indexdb: this.indexdb, config: this.config };
|
|
168
168
|
|
|
169
169
|
// 1. execute and persist the transaction
|
|
170
170
|
const result = await this.executor.execute(context);
|
|
@@ -474,6 +474,11 @@ module.exports = class OCAPResolver {
|
|
|
474
474
|
token,
|
|
475
475
|
txConfig: {
|
|
476
476
|
...transaction,
|
|
477
|
+
txGas: {
|
|
478
|
+
...transaction.txGas,
|
|
479
|
+
minStake: fromTokenToUnit(transaction.txGas.minStake, token.decimal).toString(10),
|
|
480
|
+
maxStake: fromTokenToUnit(transaction.txGas.maxStake, token.decimal).toString(10),
|
|
481
|
+
},
|
|
477
482
|
txFee: Object.keys(transaction.txFee)
|
|
478
483
|
.filter((x) => x !== 'default')
|
|
479
484
|
.map((x) => ({ typeUrl: x, fee: fromTokenToUnit(transaction.txFee[x], token.decimal).toString(10) })),
|
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.2",
|
|
7
7
|
"description": "GraphQL resolver built upon ocap statedb and GQL layer",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"jest": "^27.5.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arcblock/did": "1.18.
|
|
26
|
-
"@arcblock/did-util": "1.18.
|
|
27
|
-
"@arcblock/validator": "1.18.
|
|
28
|
-
"@ocap/config": "1.18.
|
|
29
|
-
"@ocap/indexdb": "1.18.
|
|
30
|
-
"@ocap/mcrypto": "1.18.
|
|
31
|
-
"@ocap/message": "1.18.
|
|
32
|
-
"@ocap/state": "1.18.
|
|
33
|
-
"@ocap/tx-protocols": "1.18.
|
|
34
|
-
"@ocap/util": "1.18.
|
|
25
|
+
"@arcblock/did": "1.18.2",
|
|
26
|
+
"@arcblock/did-util": "1.18.2",
|
|
27
|
+
"@arcblock/validator": "1.18.2",
|
|
28
|
+
"@ocap/config": "1.18.2",
|
|
29
|
+
"@ocap/indexdb": "1.18.2",
|
|
30
|
+
"@ocap/mcrypto": "1.18.2",
|
|
31
|
+
"@ocap/message": "1.18.2",
|
|
32
|
+
"@ocap/state": "1.18.2",
|
|
33
|
+
"@ocap/tx-protocols": "1.18.2",
|
|
34
|
+
"@ocap/util": "1.18.2",
|
|
35
35
|
"debug": "^4.3.4",
|
|
36
36
|
"lodash": "^4.17.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "7bd3abefcf732fcf5d4521622ca06db67671d853"
|
|
39
39
|
}
|