Skip to content

Don't rely on store interfaces and zod in core-wallet-ui-components #1902

Description

@pawelstepien-da

core-wallet-ui-components relies on interfaces from core-wallet-store. Besides types it uses network zod for validating form inputs values against shape expected in the store.
We should:
-Keep core-wallet-ui-components agnostic to the store layer, no dependency to core-wallet-store
-Create zods for user api interfaces. Use them in to validate user api request payloads and frontend forms.
-Use different package(s) as source of types, like rpc api client packages, or re-export through core-types.
-(debatable) Either have user api zods in wallet gateway and validate form values one level higher - in wallet gateway frontend components instead of core-wallet-ui-components, or put user api zods in shared package (core-types?) and then it can be used in core-wallet-ui-components without need for dependency to wallet-gateway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions