@polymeshassociation/polymesh-sdk 31.1.0-beta.3 → 31.1.0-beta.4
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/CHANGELOG.md +3 -4
- package/api/procedures/withdrawUnbondedPolyx.d.ts +2 -1
- package/api/procedures/withdrawUnbondedPolyx.d.ts.map +1 -1
- package/api/procedures/withdrawUnbondedPolyx.js +9 -9
- package/api/procedures/withdrawUnbondedPolyx.js.map +1 -1
- package/npm-package/{polymeshassociation-polymesh-sdk-31.1.0-beta.3.tgz → polymeshassociation-polymesh-sdk-31.1.0-beta.4.tgz} +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
# [31.1.0-beta.
|
|
1
|
+
# [31.1.0-beta.4](https://github.com/PolymeshAssociation/polymesh-sdk/compare/v31.1.0-beta.3...v31.1.0-beta.4) (2026-08-25)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
* 🎸 initialize the WASM crypto backend when a Signing Manager is attached ([3628110](https://github.com/PolymeshAssociation/polymesh-sdk/commit/36281106c1b7a6db4e0ff2c73120fe06810ba806))
|
|
6
|
+
* 🐛 read withdrawal slashing spans from the stash, not the controller ([69c6a52](https://github.com/PolymeshAssociation/polymesh-sdk/commit/69c6a5247d327da230d58fb1e419d1425f70add6))
|
|
@@ -9,7 +9,8 @@ import { ExtrinsicParams, ProcedureAuthorization, TransactionSpec } from '../../
|
|
|
9
9
|
export interface Storage {
|
|
10
10
|
actingAccount: Account;
|
|
11
11
|
controllerEntry: StakingLedger | null;
|
|
12
|
-
|
|
12
|
+
/** `null` if there is no `controllerEntry`, since the query is keyed by its stash */
|
|
13
|
+
optSpans: Option<PalletStakingSlashingSlashingSpans> | null;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawUnbondedPolyx.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/withdrawUnbondedPolyx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAG5E,OAAO,EAAiB,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAa,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG5F;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,kCAAkC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"withdrawUnbondedPolyx.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/withdrawUnbondedPolyx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAG5E,OAAO,EAAiB,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAa,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG5F;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC,kCAAkC,CAAC,GAAG,IAAI,CAAC;CAC7D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,CA+BhF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,sBAAsB,CAQ7F;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CA0B3F;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAO,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CACS,CAAC"}
|
|
@@ -32,9 +32,9 @@ function prepareWithdrawUnbondedPolyx() {
|
|
|
32
32
|
data: { actingAccount: actingAccount.address },
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const spanCount = optSpans.
|
|
36
|
-
? new bignumber_js_1.default(
|
|
37
|
-
: new bignumber_js_1.default(
|
|
35
|
+
const spanCount = (optSpans === null || optSpans === void 0 ? void 0 : optSpans.isSome)
|
|
36
|
+
? new bignumber_js_1.default(optSpans.unwrap().prior.length + 1)
|
|
37
|
+
: new bignumber_js_1.default(0);
|
|
38
38
|
const rawSpanCount = (0, conversion_1.bigNumberToU32)(spanCount, context);
|
|
39
39
|
return Promise.resolve({
|
|
40
40
|
transaction: withdrawUnbonded,
|
|
@@ -62,15 +62,15 @@ function prepareStorage() {
|
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
63
|
const { context, context: { polymeshApi: { query: { staking: { slashingSpans }, }, }, }, } = this;
|
|
64
64
|
const actingAccount = yield context.getActingAccount();
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
slashingSpans(
|
|
69
|
-
|
|
65
|
+
const controllerEntry = yield actingAccount.staking.getLedger();
|
|
66
|
+
// `slashingSpans` is keyed by the stash, which can differ from the signing controller
|
|
67
|
+
const optSpans = controllerEntry
|
|
68
|
+
? yield slashingSpans((0, conversion_1.stringToAccountId)(controllerEntry.stash.address, context))
|
|
69
|
+
: null;
|
|
70
70
|
return {
|
|
71
71
|
actingAccount,
|
|
72
72
|
controllerEntry,
|
|
73
|
-
optSpans
|
|
73
|
+
optSpans,
|
|
74
74
|
};
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawUnbondedPolyx.js","sourceRoot":"","sources":["../../../src/api/procedures/withdrawUnbondedPolyx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"withdrawUnbondedPolyx.js","sourceRoot":"","sources":["../../../src/api/procedures/withdrawUnbondedPolyx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsBA,oEAiCC;AAMD,4CAQC;AAKD,wCA0BC;AAlGD,gEAAqC;AAErC,yCAAsD;AACtD,mCAA4D;AAE5D,mDAAuE;AAYvE;;GAEG;AACH,SAAgB,4BAA4B;IAG1C,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EACX,EAAE,EAAE,EACF,OAAO,EAAE,EAAE,gBAAgB,EAAE,GAC9B,GACF,GACF,EACD,OAAO,EACP,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,GACtD,GAAG,IAAI,CAAC;IAET,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,wBAAa,CAAC;YACtB,IAAI,EAAE,iBAAS,CAAC,iBAAiB;YACjC,OAAO,EAAE,yCAAyC;YAClD,IAAI,EAAE,EAAE,aAAa,EAAE,aAAa,CAAC,OAAO,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,SAAS,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM;QA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