test: restore the dividend distribution self-claim step - #45
Open
prashantasdeveloper wants to merge 1 commit into
Open
test: restore the dividend distribution self-claim step#45prashantasdeveloper wants to merge 1 commit into
prashantasdeveloper wants to merge 1 commit into
Conversation
Blocked on PolymeshAssociation/polymesh-sdk#1663, which fixes the actual bug: prepareClaimDividends checked participation against whatever Identity distribution.context's signingAddress last pointed to instead of the Identity actually signing the claim, since the DividendDistribution entity is fetched off a Context that isn't necessarily this Procedure's own per-call one. Confirmed live against a real chain v8 node with a temporary patch of a running polymesh-rest-api container's SDK copy: 13/13 passing, including this step, once the fix is applied. This will fail in CI until polymesh-rest-api bumps its SDK dependency to a release containing that fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the
claimant should be able to claim the distributionstep individend-distributions.ts, removed in #44 pending SDK-level investigation ofcapitalDistribution.claimconsistently rejecting with'The signing Identity is not included in this Distribution'for a genuine, funded participant.Root cause (found and fixed upstream)
prepareClaimDividendscalleddistribution.getParticipant()with no args, letting it default the identity to check viadistribution.context.getSigningIdentity(). TheDividendDistributionentity carries whateverContextit happened to be fetched with, which for a long-lived, multi-account consumer like polymesh-rest-api is a different object than the Procedure's own per-callContext(scoped to that call'ssigningAccount). So the check ran against whatever Identity the shared Context'ssigningAddresslast pointed to, not the Identity actually signing the claim.Confirmed live against a real chain v8 node + polymesh-rest-api, with temporary debug instrumentation in the running REST API's SDK copy — it was resolving a completely unrelated Identity with a 0 balance, hence the deterministic "not included" rejection.
Fixed upstream in PolymeshAssociation/polymesh-sdk#1663.
This restores the test as it should be once the fix lands, but
polymesh-rest-api:v9.0.0-alpha.1(used byenvs/local/envs/8.0) still bundles the unfixed SDK 31.0.0. Do not merge untilpolymesh-rest-apihas bumped to a SDK release containing #1663, at which point this suite should go green as-is.Test plan
polymesh-rest-apicontainer's SDK copy and reran this exact suite against a real chain v8 node — 13/13 passing, including the restored claim steppolymesh-rest-api's SDK dependency includes fix: resolve claim dividends' signing Identity from the Procedure's own Context polymesh-sdk#1663