Socket
Socket
Sign inDemoInstall

@0xsequence/sessions

Package Overview
Dependencies
Maintainers
5
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/sessions - npm Package Compare versions

Comparing version 0.0.0-20230309013947 to 0.0.0-20230309211731

30

dist/0xsequence-sessions.cjs.dev.js

@@ -1472,12 +1472,14 @@ 'use strict';

if (!best) return [];
best.result.forEach(async function (res) {
const nextConfig = await configOf(res.nextImageHash);
if (nextConfig) {
_this.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: res.signature
});
(async function () {
for (const result of best.result) {
const nextConfig = await configOf(result.nextImageHash);
if (nextConfig) {
_this.cache.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: result.signature
});
}
}
});
})();
return best.result;

@@ -1565,3 +1567,3 @@ }

do(key, validMilliseconds, task, ...args) {
key = `${key}:${ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(JSON.stringify(args)))}`;
key = `${key}:${ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(JSON.stringify(args, deterministically)))}`;
let entry = this.cache.get(key);

@@ -1578,3 +1580,3 @@ if (entry) {

entry = {
promise: Promise.reject('unreachable')
promise: Promise.resolve()
};

@@ -1596,2 +1598,8 @@ if (validMilliseconds === undefined) {

}
function deterministically(_key, value) {
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
return Object.fromEntries(Object.entries(value).sort());
}
return value;
}

@@ -1598,0 +1606,0 @@ // This tracks wraps another tracker and dedupes calls to it, so in any calls

@@ -1472,12 +1472,14 @@ 'use strict';

if (!best) return [];
best.result.forEach(async function (res) {
const nextConfig = await configOf(res.nextImageHash);
if (nextConfig) {
_this.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: res.signature
});
(async function () {
for (const result of best.result) {
const nextConfig = await configOf(result.nextImageHash);
if (nextConfig) {
_this.cache.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: result.signature
});
}
}
});
})();
return best.result;

@@ -1565,3 +1567,3 @@ }

do(key, validMilliseconds, task, ...args) {
key = `${key}:${ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(JSON.stringify(args)))}`;
key = `${key}:${ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(JSON.stringify(args, deterministically)))}`;
let entry = this.cache.get(key);

@@ -1578,3 +1580,3 @@ if (entry) {

entry = {
promise: Promise.reject('unreachable')
promise: Promise.resolve()
};

@@ -1596,2 +1598,8 @@ if (validMilliseconds === undefined) {

}
function deterministically(_key, value) {
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
return Object.fromEntries(Object.entries(value).sort());
}
return value;
}

@@ -1598,0 +1606,0 @@ // This tracks wraps another tracker and dedupes calls to it, so in any calls

@@ -1468,12 +1468,14 @@ import { v2, v1, universal, commons } from '@0xsequence/core';

if (!best) return [];
best.result.forEach(async function (res) {
const nextConfig = await configOf(res.nextImageHash);
if (nextConfig) {
_this.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: res.signature
});
(async function () {
for (const result of best.result) {
const nextConfig = await configOf(result.nextImageHash);
if (nextConfig) {
_this.cache.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: result.signature
});
}
}
});
})();
return best.result;

@@ -1561,3 +1563,3 @@ }

do(key, validMilliseconds, task, ...args) {
key = `${key}:${ethers.utils.keccak256(ethers.utils.toUtf8Bytes(JSON.stringify(args)))}`;
key = `${key}:${ethers.utils.keccak256(ethers.utils.toUtf8Bytes(JSON.stringify(args, deterministically)))}`;
let entry = this.cache.get(key);

@@ -1574,3 +1576,3 @@ if (entry) {

entry = {
promise: Promise.reject('unreachable')
promise: Promise.resolve()
};

@@ -1592,2 +1594,8 @@ if (validMilliseconds === undefined) {

}
function deterministically(_key, value) {
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
return Object.fromEntries(Object.entries(value).sort());
}
return value;
}

@@ -1594,0 +1602,0 @@ // This tracks wraps another tracker and dedupes calls to it, so in any calls

{
"name": "@0xsequence/sessions",
"version": "0.0.0-20230309013947",
"version": "0.0.0-20230309211731",
"description": "tools for migrating sequence wallets to new versions",

@@ -12,5 +12,5 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/sessions",

"dependencies": {
"@0xsequence/core": "0.0.0-20230309013947",
"@0xsequence/migration": "0.0.0-20230309013947",
"@0xsequence/replacer": "0.0.0-20230309013947",
"@0xsequence/core": "0.0.0-20230309211731",
"@0xsequence/migration": "0.0.0-20230309211731",
"@0xsequence/replacer": "0.0.0-20230309211731",
"ethers": "^5.5.2",

@@ -20,4 +20,4 @@ "idb": "^7.1.1"

"devDependencies": {
"@0xsequence/signhub": "0.0.0-20230309013947",
"@0xsequence/tests": "0.0.0-20230309013947",
"@0xsequence/signhub": "0.0.0-20230309211731",
"@0xsequence/tests": "0.0.0-20230309211731",
"@istanbuljs/nyc-config-typescript": "^1.0.2",

@@ -24,0 +24,0 @@ "fake-indexeddb": "^4.0.1",

@@ -48,12 +48,14 @@

best.result.forEach(async res => {
const nextConfig = await configOf(res.nextImageHash)
if (nextConfig) {
this.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: res.signature
})
;(async () => {
for (const result of best.result) {
const nextConfig = await configOf(result.nextImageHash)
if (nextConfig) {
this.cache.savePresignedConfiguration({
wallet: args.wallet,
nextConfig,
signature: result.signature
})
}
}
})
})()

@@ -60,0 +62,0 @@ return best.result

@@ -16,3 +16,3 @@ import { ethers } from 'ethers'

): Promise<T> {
key = `${key}:${ethers.utils.keccak256(ethers.utils.toUtf8Bytes(JSON.stringify(args)))}`
key = `${key}:${ethers.utils.keccak256(ethers.utils.toUtf8Bytes(JSON.stringify(args, deterministically)))}`

@@ -31,3 +31,3 @@ let entry = this.cache.get(key)

if (!entry) {
entry = { promise: Promise.reject('unreachable') }
entry = { promise: Promise.resolve() }
if (validMilliseconds === undefined) {

@@ -54,1 +54,9 @@ entry.promise = task(...args)

}
function deterministically(_key: string, value: any): any {
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
return Object.fromEntries(Object.entries(value).sort())
}
return value
}
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