-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P-261 Refactor Achainable type definitions #2464
P-261 Refactor Achainable type definitions #2464
Conversation
@@ -255,7 +256,7 @@ impl TryFrom<AchainableParams> for Params { | |||
let network = &p.chain; | |||
let amount = ap.to_string(&p.amount)?; | |||
|
|||
let p = ParamsBasicTypeWithAmount::new(name, network, amount); | |||
let p = ParamsBasicTypeWithAmount::new(name, &network[0], amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhouhuitian @Kailai-Wang in the (existing) AmountToken
case we're just using the first chain in the vector; is that a reasonable solution for the rest of the assertions, or should we make a more significant fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I invite @zhouhuitian to review it too
@zhouhuitian will be back in one week (probably) - so we could merge it before it dangles for too long and make retroactive changes later if required. However, we need to be very cautious about releasing and deploying it. We'll need confirmation from @zhouhuitian and ideally client colleagues (@jonalvarezz and @YoshiyukiSakura) to make sure we don't break anything for the current VC request construction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
From the client side, I don't expect many changes as Assertion types are only used for requesting and since the enum isn't changing, it seems to be scoped down to the Web3Network -> Vec<Web3Network>
change.
I created this ticket to follow up and adjust client-sdk correspondingly: https://linear.app/litentry/issue/P-514/client-sdk-update-types-accordingly-after-achainable-types-rework
Context
BoundedWeb3Network
type for thechain
param everywhereHow (Optional)
Initial proposal was to extract the common fields to a struct, but they don't really seem to make semantic sense as a single type. Extracted them as a macro instead, which also allowed a bunch of repeated
derive
annotations to be deduplicated.TODO
chain
param type