@ocap/tx-protocols 1.25.0 → 1.25.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.
@@ -152,7 +152,10 @@ runner.use(pipes.VerifyBlocked({ stateKeys: ['senderState'] }));
152
152
  // verify staking: get address, extract state, verify amount
153
153
  runner.use((context, next) => {
154
154
  const { tx, itx } = context;
155
- context.stakeAddress = toStakeAddress(tx.from, tx.from, itx.token.symbol);
155
+ // stake from sender to main token
156
+ const sender = tx.delegator || tx.from;
157
+ const receiver = context.config.token.address;
158
+ context.stakeAddress = toStakeAddress(sender, receiver, itx.token.symbol);
156
159
  return next();
157
160
  });
158
161
  runner.use(
@@ -15,7 +15,9 @@ module.exports =
15
15
  } = context;
16
16
 
17
17
  const sender = delegator || from;
18
- const verificationUrl = `${website}/.well-known/ocap/tokens.json`;
18
+
19
+ const { origin } = new URL(website);
20
+ const verificationUrl = `${origin}/.well-known/ocap/tokens.json`;
19
21
 
20
22
  try {
21
23
  const response = await fetch(verificationUrl);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.25.0",
6
+ "version": "1.25.2",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,20 +19,20 @@
19
19
  "empty-value": "^1.0.1",
20
20
  "lodash": "^4.17.21",
21
21
  "url-join": "^4.0.1",
22
- "@arcblock/did": "1.25.0",
23
- "@arcblock/jwt": "1.25.0",
24
- "@arcblock/validator": "1.25.0",
25
- "@arcblock/vc": "1.25.0",
26
- "@ocap/asset": "1.25.0",
27
- "@arcblock/did-util": "1.25.0",
28
- "@ocap/client": "1.25.0",
29
- "@ocap/mcrypto": "1.25.0",
30
- "@ocap/merkle-tree": "1.25.0",
31
- "@ocap/message": "1.25.0",
32
- "@ocap/state": "1.25.0",
33
- "@ocap/tx-pipeline": "1.25.0",
34
- "@ocap/util": "1.25.0",
35
- "@ocap/wallet": "1.25.0"
22
+ "@arcblock/did": "1.25.2",
23
+ "@arcblock/did-util": "1.25.2",
24
+ "@arcblock/jwt": "1.25.2",
25
+ "@arcblock/validator": "1.25.2",
26
+ "@arcblock/vc": "1.25.2",
27
+ "@ocap/asset": "1.25.2",
28
+ "@ocap/mcrypto": "1.25.2",
29
+ "@ocap/client": "1.25.2",
30
+ "@ocap/merkle-tree": "1.25.2",
31
+ "@ocap/message": "1.25.2",
32
+ "@ocap/state": "1.25.2",
33
+ "@ocap/tx-pipeline": "1.25.2",
34
+ "@ocap/util": "1.25.2",
35
+ "@ocap/wallet": "1.25.2"
36
36
  },
37
37
  "resolutions": {
38
38
  "bn.js": "5.2.2",
@@ -41,8 +41,8 @@
41
41
  "devDependencies": {
42
42
  "jest": "^29.7.0",
43
43
  "start-server-and-test": "^1.14.0",
44
- "@ocap/e2e-test": "1.25.0",
45
- "@ocap/statedb-memory": "1.25.0"
44
+ "@ocap/e2e-test": "1.25.2",
45
+ "@ocap/statedb-memory": "1.25.2"
46
46
  },
47
47
  "scripts": {
48
48
  "lint": "eslint tests lib",