Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update polkadot dependencies #426

Merged
merged 9 commits into from
Oct 27, 2021
Merged

chore: update polkadot dependencies #426

merged 9 commits into from
Oct 27, 2021

Conversation

tjwelde
Copy link
Contributor

@tjwelde tjwelde commented Oct 25, 2021

fixes KILTProtocol/ticket#1647

This PR updates the polkadot dependencies to work with the new 0.9.11 polkadot update.

I tried it out with a sample application, which connects to either peregrine stg, or spiritnet and I try to read a balance.
It works for both networks.

The type registry could be theoretically removed, but for downwards compatibility, we leave it in for the next release.

How to test:

  • Tests should run

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@tjwelde tjwelde force-pushed the tw-1647-polkadot0911 branch from 4b78f82 to 5069bb2 Compare October 26, 2021 15:26
@tjwelde tjwelde requested a review from ntn-x2 October 26, 2021 16:20
Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor leftovers, which I have already verified to be unnecessary. I will remove them myself and push the new version.

@@ -7,6 +7,9 @@ const chainProperties = TYPE_REGISTRY.createType('ChainProperties', {
ss58Format: 38,
})
TYPE_REGISTRY.setChainProperties(chainProperties)
TYPE_REGISTRY.register({
Copy link
Member

@ntn-x2 ntn-x2 Oct 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Do we still need this? I don't see it changed for delegations or DIDs as well.

EDIT: I tried removing it and it did not break the integration tests.

EDIT 2: Nevermind, it broke the unit tests 😂

@@ -342,6 +342,23 @@ describe('handling queries to data not on chain', () => {
})
})

describe.only('hierarchyDetails', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe('hierarchyDetails', () => {

EDIT: I also tried removing .only and of course all the rest of the delegation integration tests were also passing, so this can be removed safely.

Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍 I'll base the service endpoints PR on top of this and rebase it on develop when this gets merged.

@arty-name
Copy link
Collaborator

I’ve noticed that during upgrade many versions lost the ^ and now depend on a specific version instead of range.

@tjwelde
Copy link
Contributor Author

tjwelde commented Oct 27, 2021

@arty-name yes, that is correct. I tried with ^ at first, but polkadot was reporting an issue, when using a newer version of the types-known package with another of their package and advised to use a specific version, which I did here now.

@tjwelde tjwelde merged commit 18376eb into develop Oct 27, 2021
@tjwelde tjwelde deleted the tw-1647-polkadot0911 branch October 27, 2021 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants