Skip to content

Commit

Permalink
Fixed RPC request serialization issue (#53)
Browse files Browse the repository at this point in the history
* fix request params

* bump v

* add proper description for fixed bug
  • Loading branch information
lukachi authored Jun 18, 2024
1 parent c43bebc commit 08253b0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Unreleased]

## [2.1.1] - 2024-06-18

### Fixed
- `@rarimo/rarime-connector`
- - request params: `wallet_invokeSnap` method should accept `params` only if it exists, passing `undefined` would cause an error at least in Metamask Flask version `11.16.10-flask.0` and Metamask version `11.16.11`

[Unreleased]

## [2.1.0] - 2024-04-08

### Added
Expand Down Expand Up @@ -194,7 +202,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Implemented `@rarimo/rarime-connector` and `@rarimo/rarime` packages

[Unreleased]: https://github.com/rarimo/rarime/compare/2.1.0...HEAD
[Unreleased]: https://github.com/rarimo/rarime/compare/2.1.1...HEAD
[2.1.1]: https://github.com/rarimo/rarime/compare/2.1.0...2.1.1
[2.1.0]: https://github.com/rarimo/rarime/compare/2.0.3...2.1.0
[2.0.3]: https://github.com/rarimo/rarime/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/rarimo/rarime/compare/2.0.1...2.0.2
Expand Down
2 changes: 1 addition & 1 deletion packages/connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rarimo/rarime-connector",
"version": "2.1.0",
"version": "2.1.1",
"description": "Facilitates interaction between a DApp and RariMe MetaMask snap",
"repository": {
"type": "git",
Expand Down
7 changes: 5 additions & 2 deletions packages/connector/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ import type {
import { RPCMethods } from './types';

const sendSnapMethod = async <T>(
request: unknown,
request: { method: string; params?: any },
snapId: string,
): Promise<T> => {
return await window.ethereum.request({
method: 'wallet_invokeSnap',
params: {
request,
request: {
method: request.method,
...(request.params && { params: request.params }),
},
snapId,
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/connector/src/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.1.0"
"version": "2.1.1"
}
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rarimo/rarime",
"version": "2.1.0",
"version": "2.1.1",
"description": "RariMe is a MetaMask Snap that safely holds any of your credentials and allows you to prove your identity without revealing any personal data. Powered by Rarimo Protocol and Zero-Knowledge Proof technology.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "2.1.0",
"version": "2.1.1",
"description": "Securely store and manage all of your identity credentials. Use them across chains with ZK-protected privacy guarantees.",
"proposedName": "RariMe",
"repository": {
"type": "git",
"url": "https://github.com/rarimo/rarime.git"
},
"source": {
"shasum": "CQgk91hCMZDesbgW1yDO4bWYyHY6Lpwp3b1GK/zPxY8=",
"shasum": "8qJxnKDj9B1mL6nCqd3GcwaCpG4lPgfeOGaBKJk0Zpw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down

0 comments on commit 08253b0

Please sign in to comment.