-
Notifications
You must be signed in to change notification settings - Fork 628
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
jsonrpc: allow parse object at tx status requests #9648
Conversation
71089b5
to
17bc1d0
Compare
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.
looks good overall and big thanks for adding more tests
I'm a bit worried about renaming fields. Can you clarify if it is safe?
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I decided to cover some of things in separate PR #9653 |
82857a9
to
378893e
Compare
@wacban could you please have a look again? I've also updated the description to be more clear what I'm trying to achieve here. |
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.
LGTM
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
378893e
to
ff0090e
Compare
@wacban could you please have a look on the last commit? After the discussion with @frol, @firatNEAR and the team, we all came up with the idea that deserialising SignedTransaction by serde makes no sense, because the user has to pack the tx by borsh to be able to sign it. |
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
58e3141
to
f1977c5
Compare
f1977c5
to
ade91e0
Compare
Adding the possibility to pass object as params for tx status methods: ``` { "jsonrpc": "2.0", "id": "dontcare", "method": "EXPERIMENTAL_tx_status", // could be "tx" "params": { "tx_hash": "6zgh2u9DqHHiXzdy9ouTP7oGky2T4nugqzqt9wJZwNFm", "sender_account_id": "sender.testnet" } } ``` This is just a nice improvement, it looks cleaner. But I specifically need this as a prep step for #6837 Having json params will allow me to add new request parameter easier. I thought about adding passing object to send tx methods as well, but the user has to pack it by borsh to be able to sign it. So, deserialising SignedTransaction by serde makes no sense, I dropped this functionality. Serialisation can still be useful to be able to dump tx to json so that humans may read it.
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
I mixed up adding tests and introducing new functionality here #9648 Please have a look just at tests separately
Adding the possibility to pass object as params for tx status methods:
This is just a nice improvement, it looks cleaner.
But I specifically need this as a prep step for #6837
Having json params will allow me to add new request parameter easier.
I thought about adding passing object to send tx methods as well, but the user has to pack it by borsh to be able to sign it.
So, deserialising SignedTransaction by serde makes no sense, I dropped this functionality.
Serialisation can still be useful to be able to dump tx to json so that humans may read it.