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

@bloks/wallet

Package Overview
Dependencies
Maintainers
3
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bloks/wallet - npm Package Compare versions

Comparing version 3.5.11 to 3.5.12-alpha.0

4

package.json
{
"name": "@bloks/wallet",
"version": "3.5.11",
"version": "3.5.12-alpha.0",
"description": "",

@@ -16,3 +16,3 @@ "publishConfig": {

},
"gitHead": "c1a7de5d6c015dae3e71151b29b667f16057f5ae"
"gitHead": "d440e24e25aff849f2d3dac8b423de037eed132c"
}

@@ -25,8 +25,12 @@ import store from 'store'

findUserIndex ({ actor, permission, publicKey, wallet }) {
isSame (user1, user2) {
return user1.actor === user2.actor &&
user1.permission === user2.permission &&
user1.wallet === user2.wallet &&
user1.publicKey === user2.publicKey
}
findUserIndex (newUser) {
return this.users.findIndex(
user => user.actor === actor &&
user.permission === permission &&
user.wallet === wallet &&
user.publicKey === publicKey
user => this.isSame(user, newUser)
)

@@ -45,3 +49,3 @@ }

addUser (newUser) {
addUser (newUser, save = true) {
const userIndex = this.findUserIndex(newUser)

@@ -57,2 +61,23 @@ newUser = Object.assign({}, defaultUser(), newUser)

}
addUsers (users) {
let newUser
for (const user of users) {
const userIndex = this.findUserIndex(user)
newUser = Object.assign({}, defaultUser(), user)
if (userIndex === -1) {
this.users.push(newUser)
}
}
this.saveUsers()
}
searchUsers (query) {
return this.users.filter(
user => user.actor === query.toLowerCase()
)
}

@@ -62,2 +87,7 @@ removeUser (newUser) {

// If current user, remove
if (this.isSame(this.users[userIndex], this.user)) {
this.setUser({})
}
if (userIndex !== -1) {

@@ -64,0 +94,0 @@ this.users.splice(userIndex, 1)

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