You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I am not sure that get your problem. It seems that user can pass args either an object or a bytes array. Do you mean the Uint8Array in constructor is unnecessary for the users?
Regarding unit tests there are tests that take both a simple object
At this point I no longer remember how I dug up this issue, but both of these unit tests have trivial arguments. It would be better if there were non trivial arguments given to the test so people could use them as an example.
Yeap, it makes more sense to show the real argument.
Thanks for the answer, if you"ll have some extra time and will remind about this issue, I"ll be glad to delve into it and work on this!
Prerequisites
near-api-js
.Description
This cast in the constructor is misleading and wrong:
near-api-js/packages/transactions/src/action_creators.ts
Lines 98 to 120 in 480fe81
The unit tests call this constructor with arguments defined via Buffer.from which is an "object"
The constructor takes object OR Unit8Array and casts to Uint8Array while the actual contents are never Uint8Array.
Reproducible demo
No response
Steps to reproduce
Try and construct an example in the tests that are actually Uint8Array to demonstrate to end users how its expected to look.
Expected behavior
Expect that the Type declaration for these arguments is actually something people use.
Actual behavior
This form is dumb.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: