Skip to content

Misleading usability with create_partial_offline and mortal txs #2024

Description

@iulianbarbu

I am a subxt newbie, and to some extent, a polkadot newbie, and I would assume lots of developers can be in the situation where the API and the docs are still confusing (although to the majority of cases it is very well written and precise), so that when they configure some tx params with mortality, used to create an offline transaction, they notice in the end it is submitted as immortal.

Using create_partial_offline shouldn't allow passing over params that have configured mortality. Should allow only certain params that are compatible with the offline transaction creation. Not sure how feasable it is, but the whole point of the issue here is to question whether it is possible for create_partial_offline to accept a certain OfflineTxParams type/trait (corresponding to txs that are created offline), where we can suggest better through the API what's possible (e.g. mortal setter will not exist for such a transaction). At the same time, if the mortality will be the only thing different between OfflineTxParams and OnlineTxParams, I can understand why this suggestion wouldn't be very valuable. I would go for it nonetheless, curious about opinions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions