near / near-api-js

JavaScript library to interact with NEAR Protocol via RPC API
https://near.github.io/near-api-js
MIT License
388 stars 240 forks source link

Fix delegate schema #1314

Closed gagdiez closed 4 months ago

gagdiez commented 4 months ago

Pre-flight checklist

Motivation

Currently people can create meta-transactions, but once they are relayed, the RPC answers Parse error: Failed to decode transaction: Unexpected variant tag: 131. This is because the transaction is being wrongly serialized since two fields are swapped in the Schema.

Test Plan

Added a test checking that the SCHEMA can deserialize a valid delegateAction, since the SCHEMA is the same for both serialization and deserialization, that should suffice

Related issues/PRs

1313

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: d3feb0d111107b01510abb9b97dcee2d8a5ae192

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages | Name | Type | | ----------------------- | ----- | | @near-js/transactions | Patch | | @near-js/accounts | Patch | | @near-js/cookbook | Patch | | near-api-js | Patch | | @near-js/providers | Patch | | @near-js/wallet-account | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

gagdiez commented 4 months ago

@gtsonevv can we get this released ASAP? People cannot create meta-transactions :/