LiskArchive / lisk-sdk

🔩 Lisk software development kit
https://lisk.com
Apache License 2.0
2.72k stars 456 forks source link

Improve transaction creation asset prompt from commander #6173

Closed nazarhussain closed 11 months ago

nazarhussain commented 3 years ago

Description

Transaction creation in boostrapped application with ./bin/run transaction:create have a particular behaviour:

  1. It checks is the transaction asked to create have any custom asset
  2. If it does then it check if user provided an asset object with --asset flag
  3. If not then it create a prompt for all the attributes defined in the schema of transaction asset

The later part is been covered by this function.

https://github.com/LiskHQ/lisk-sdk/blob/83ff685015bd7846a732857045d7a5c5c07cd21c/commander/src/utils/reader.ts#L319

The problem is this function is not generic and effective for complex asset scenarios. e.g. Boolean values or nested objects or arrays of a particular data type.

We need to make it generic if and effective to cover all known and complex scenarios covered by this specification

https://github.com/LiskHQ/lips/blob/master/proposals/lip-0027.md#lisk-json-schemas

Motivation

We want the after creating a custom asset in the boostrapped application, user should be able to create transaction without any complexities of defining asset value by himself. The UX of the transaction creation should be generic and intuitive to cover complex and nested assets.

Acceptance Criteria

Additional Information

shuse2 commented 11 months ago

Closing this issue since this is no longer valid