Skip to content
New issue

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

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

Already on GitHub? # to your account

Add optional attributes to PolkadotTransaction #271

Conversation

jdomingos
Copy link
Contributor

@jdomingos jdomingos commented Dec 4, 2023

📝 Description
Adds optional attributes:

  • validators
  • numOfSlashingSpans
  • rewardDestination

to the PolkadotTransaction interface and changes to the validation and serialization, based on a Ledger Live type found in the Ledger Live monorepo here.

❓ Context
We are currently building a ledger live app for StakeKit that offers users a unified non-custodial staking experience across a wide range of networks and protocols.
Like we did for Cosmos here a while back, we are now adding support to Polkadot validator staking and need this type to support and serialize all the fields needed for the different sets of calls.

✅ Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: 08ff21d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@ledgerhq/wallet-api-core Minor
@ledgerhq/wallet-api-client Patch
@ledgerhq/wallet-api-manifest-validator-cli Patch
@ledgerhq/wallet-api-manifest-validator Patch
@ledgerhq/wallet-api-server Patch
@ledgerhq/wallet-api-simulator Patch
wallet-api-tools Patch
@ledgerhq/wallet-api-client-react Patch
client-nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wallet-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 0:29am
wallet-api-wallet-api-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 0:29am

Copy link
Collaborator

@Justkant Justkant left a comment

Choose a reason for hiding this comment

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

LGTM
In order to support this in LL we'll need to update the lib when we release it here and also the code here: https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledger-live-common/src/families/polkadot/walletApiAdapter.ts#L14-L47
I'll add a task to do it ASAP

@Justkant Justkant merged commit 6a5771c into LedgerHQ:main Dec 7, 2023
2 checks passed
@github-actions github-actions bot mentioned this pull request Dec 7, 2023
@jdomingos jdomingos deleted the stakekit/feat/add-optional-attribute-for-polkadot branch December 7, 2023 09:47
@jdomingos
Copy link
Contributor Author

LGTM In order to support this in LL we'll need to update the lib when we release it here and also the code here: https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledger-live-common/src/families/polkadot/walletApiAdapter.ts#L14-L47 I'll add a task to do it ASAP

Thanks @Justkant!

I don't mind doing a PR there as well.

@Justkant
Copy link
Collaborator

Justkant commented Dec 7, 2023

@jdomingos No worries, we already have a task for it and you should be able to test everything with the next nightlies of LL

You should be able to download nightlies using this link for LLD and changing the {os} part with your os (e.g. for mac
https://download.live.ledger.com/latest/mac)

Also I just saw that currently our CI for LLD nightlies is broken and we are looking into fixing this, so you might need to wait a bit more before being able to test this.

You can also build LLD locally when we are done with the PR on LL repo.

I'll also ping here when everything is done on LL side

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants