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

add option object vec #326

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BlaineHeffron
Copy link
Contributor

What

Adds a test case for a js-stellar-sdk issue

Why

When retrieving an Option<Vec> in the sdk you get the following error: TypeError: Type [object Object] was not vec, but [object Object] is

Known limitations

We need to create a separate repo for test vectors but I put this here for now for the sdk bug report.

@@ -199,4 +199,18 @@ impl CustomTypesContract {
pub fn tuple_strukt(_env: Env, tuple_strukt: TupleStruct) -> TupleStruct {
tuple_strukt
}

pub fn get_object_vec_option(env: Env) -> Option<Vec<Test>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with other functions in this contract, we should drop the get_ prefix and use the same names as other functions here.

Suggested change
pub fn get_object_vec_option(env: Env) -> Option<Vec<Test>> {
pub fn option_vec_strukt(env: Env) -> Option<Vec<Test>> {

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

Successfully merging this pull request may close these issues.

2 participants