Skip to content
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

Make call builder with_arg work with IDLValue #132

Open
ericswanson-dfinity opened this issue Mar 18, 2021 · 2 comments
Open

Make call builder with_arg work with IDLValue #132

ericswanson-dfinity opened this issue Mar 18, 2021 · 2 comments

Comments

@ericswanson-dfinity
Copy link
Member

I recently had to add SyncCallBuilder.with_value_arg(IDLValue), because with_arg panics:

It would be nicer if with_arg worked with IDLValue rather than panicking.

@chenyan-dfinity
Copy link
Contributor

Yes, this is intentional. Receiving IDLValue means it's untyped, thus needing a different API. I'm planning to change IDLValue::ty() to return Type::Unknown, but it won't help your use case. One has to look at the value of IDLValue to know the type.

@chenyan-dfinity
Copy link
Contributor

You can now decode function reference to candid::Func, so IDLValue is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants