Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@metamask/eth-snap-keyring

Package Overview
Dependencies
Maintainers
10
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/eth-snap-keyring - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

7

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## [0.3.0]
### Changed
- handle approval when adding/removing account with handleUserInput callback ([#99](https://github.com/MetaMask/eth-snap-keyring/pull/99))
## [0.2.3]

@@ -64,3 +68,4 @@ ### Added

[Unreleased]: https://github.com/MetaMask/eth-snap-keyring/compare/v0.2.3...HEAD
[Unreleased]: https://github.com/MetaMask/eth-snap-keyring/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/MetaMask/eth-snap-keyring/compare/v0.2.3...v0.3.0
[0.2.3]: https://github.com/MetaMask/eth-snap-keyring/compare/v0.2.2...v0.2.3

@@ -67,0 +72,0 @@ [0.2.2]: https://github.com/MetaMask/eth-snap-keyring/compare/v0.2.1...v0.2.2

3

dist/SnapKeyring.d.ts

@@ -49,4 +49,5 @@ /// <reference types="node" />

saveState: () => Promise<void>;
removeAccount(address: string): Promise<void>;
addressExists(address: string): Promise<boolean>;
addAccount(address: string, snapId: string, handleUserInput: (accepted: boolean) => Promise<void>): Promise<void>;
removeAccount(address: string, snapId: string, handleUserInput: (accepted: boolean) => Promise<void>): Promise<void>;
};

@@ -53,0 +54,0 @@ /**

@@ -319,4 +319,8 @@ "use strict";

}
__classPrivateFieldGet(this, _SnapKeyring_accounts, "f").set(account.id, { account, snapId });
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").saveState();
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").addAccount(account.address, snapId, async (accepted) => {
if (accepted) {
__classPrivateFieldGet(this, _SnapKeyring_accounts, "f").set(account.id, { account, snapId });
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").saveState();
}
});
return null;

@@ -376,3 +380,7 @@ }, _SnapKeyring_handleAccountUpdated =

}
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").removeAccount(address.toLowerCase());
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").removeAccount(address.toLowerCase(), snapId, async (accepted) => {
if (accepted) {
await __classPrivateFieldGet(this, _SnapKeyring_callbacks, "f").saveState();
}
});
return null;

@@ -379,0 +387,0 @@ }, _SnapKeyring_handleRequestApproved =

{
"name": "@metamask/eth-snap-keyring",
"version": "0.2.3",
"version": "0.3.0",
"description": "Snaps keyring bridge.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc