-
Notifications
You must be signed in to change notification settings - Fork 244
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
fix: view function use buffer #1356
base: master
Are you sure you want to change the base?
fix: view function use buffer #1356
Conversation
|
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.
Thank you for the PR @hanakannzashi! Please address the feedback on your change so we can get this included in an upcoming release.
I have run
pnpm changeset
to create achangeset
JSON document appropriate for this change.
Please be sure to follow this step and include the changeset document in your PR. I believe this is just a patch
change, no?
@@ -12,8 +12,10 @@ function parseJsonFromRawResponse(response: Uint8Array): any { | |||
return JSON.parse(Buffer.from(response).toString()); | |||
} | |||
|
|||
function bytesJsonStringify(input: any): Buffer { | |||
return Buffer.from(JSON.stringify(input)); | |||
export function stringifyJsonOrBytes(args: any): Buffer { |
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.
This method is already exported from @near-js/transactions
, please import it from there and remove bytesJsonStringify
.
@hanakannzashi Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: staleThis pull request was removed from the race, but you can include it again with What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
@race-of-sloths score 2 |
🌟 Score recorded!@andy-haynes, thank you for scoring this pull request in the Race of Sloths! |
❌ PR inactiveThis PR has been inactive for two weeks. It's now marked as stale. Tip If you think it's a mistake, you can restart the bot with |
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
Same as call function, view function should also allow
Buffer
as args