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.
core-wallet-ui-componentsrelies on interfaces fromcore-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-componentsagnostic to the store layer, no dependency tocore-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 incore-wallet-ui-componentswithout need for dependency to wallet-gateway.