@0xsequence/sessions
Advanced tools
Comparing version 0.0.0-20230309215219 to 0.0.0-20230320165616
@@ -280,3 +280,3 @@ 'use strict'; | ||
subdigest | ||
}); | ||
}, subdigest); | ||
}; | ||
@@ -300,5 +300,3 @@ } | ||
const migrations = db.createObjectStore('migrations'); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion'], { | ||
unique: true | ||
}); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion']); | ||
} | ||
@@ -1579,15 +1577,12 @@ } | ||
if (!entry) { | ||
entry = { | ||
promise: Promise.resolve() | ||
const entry_ = { | ||
promise: task(...args) | ||
}; | ||
if (validMilliseconds === undefined) { | ||
entry.promise = task(...args); | ||
} else { | ||
entry.promise = task(...args).then(result => { | ||
if (entry) { | ||
entry.expiration = new Date(Date.now() + validMilliseconds); | ||
} | ||
if (validMilliseconds !== undefined) { | ||
entry_.promise = entry_.promise.then(result => { | ||
entry_.expiration = new Date(Date.now() + validMilliseconds); | ||
return result; | ||
}); | ||
} | ||
entry = entry_; | ||
this.cache.set(key, entry); | ||
@@ -1594,0 +1589,0 @@ } |
@@ -280,3 +280,3 @@ 'use strict'; | ||
subdigest | ||
}); | ||
}, subdigest); | ||
}; | ||
@@ -300,5 +300,3 @@ } | ||
const migrations = db.createObjectStore('migrations'); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion'], { | ||
unique: true | ||
}); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion']); | ||
} | ||
@@ -1579,15 +1577,12 @@ } | ||
if (!entry) { | ||
entry = { | ||
promise: Promise.resolve() | ||
const entry_ = { | ||
promise: task(...args) | ||
}; | ||
if (validMilliseconds === undefined) { | ||
entry.promise = task(...args); | ||
} else { | ||
entry.promise = task(...args).then(result => { | ||
if (entry) { | ||
entry.expiration = new Date(Date.now() + validMilliseconds); | ||
} | ||
if (validMilliseconds !== undefined) { | ||
entry_.promise = entry_.promise.then(result => { | ||
entry_.expiration = new Date(Date.now() + validMilliseconds); | ||
return result; | ||
}); | ||
} | ||
entry = entry_; | ||
this.cache.set(key, entry); | ||
@@ -1594,0 +1589,0 @@ } |
@@ -276,3 +276,3 @@ import { v2, v1, universal, commons } from '@0xsequence/core'; | ||
subdigest | ||
}); | ||
}, subdigest); | ||
}; | ||
@@ -296,5 +296,3 @@ } | ||
const migrations = db.createObjectStore('migrations'); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion'], { | ||
unique: true | ||
}); | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion']); | ||
} | ||
@@ -1575,15 +1573,12 @@ } | ||
if (!entry) { | ||
entry = { | ||
promise: Promise.resolve() | ||
const entry_ = { | ||
promise: task(...args) | ||
}; | ||
if (validMilliseconds === undefined) { | ||
entry.promise = task(...args); | ||
} else { | ||
entry.promise = task(...args).then(result => { | ||
if (entry) { | ||
entry.expiration = new Date(Date.now() + validMilliseconds); | ||
} | ||
if (validMilliseconds !== undefined) { | ||
entry_.promise = entry_.promise.then(result => { | ||
entry_.expiration = new Date(Date.now() + validMilliseconds); | ||
return result; | ||
}); | ||
} | ||
entry = entry_; | ||
this.cache.set(key, entry); | ||
@@ -1590,0 +1585,0 @@ } |
{ | ||
"name": "@0xsequence/sessions", | ||
"version": "0.0.0-20230309215219", | ||
"version": "0.0.0-20230320165616", | ||
"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-20230309215219", | ||
"@0xsequence/migration": "0.0.0-20230309215219", | ||
"@0xsequence/replacer": "0.0.0-20230309215219", | ||
"@0xsequence/core": "0.0.0-20230320165616", | ||
"@0xsequence/migration": "0.0.0-20230320165616", | ||
"@0xsequence/replacer": "0.0.0-20230320165616", | ||
"ethers": "^5.5.2", | ||
@@ -20,4 +20,4 @@ "idb": "^7.1.1" | ||
"devDependencies": { | ||
"@0xsequence/signhub": "0.0.0-20230309215219", | ||
"@0xsequence/tests": "0.0.0-20230309215219", | ||
"@0xsequence/signhub": "0.0.0-20230320165616", | ||
"@0xsequence/tests": "0.0.0-20230320165616", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
@@ -24,0 +24,0 @@ "fake-indexeddb": "^4.0.1", |
@@ -30,13 +30,12 @@ import { ethers } from 'ethers' | ||
if (!entry) { | ||
entry = { promise: Promise.resolve() } | ||
if (validMilliseconds === undefined) { | ||
entry.promise = task(...args) | ||
} else { | ||
entry.promise = task(...args).then(result => { | ||
if (entry) { | ||
entry.expiration = new Date(Date.now() + validMilliseconds) | ||
} | ||
const entry_: Entry = { promise: task(...args) } | ||
if (validMilliseconds !== undefined) { | ||
entry_.promise = entry_.promise.then(result => { | ||
entry_.expiration = new Date(Date.now() + validMilliseconds) | ||
return result | ||
}) | ||
} | ||
entry = entry_ | ||
this.cache.set(key, entry) | ||
@@ -43,0 +42,0 @@ } |
@@ -104,3 +104,3 @@ import { commons, v1, v2 } from "@0xsequence/core" | ||
const migrations = db.createObjectStore('migrations') | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion'], { unique: true }) | ||
migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion']) | ||
} | ||
@@ -177,4 +177,4 @@ }, | ||
const db = await this.getDb() | ||
await db.put('migrations', { wallet, fromVersion, toVersion, subdigest }) | ||
await db.put('migrations', { wallet, fromVersion, toVersion, subdigest }, subdigest) | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285506
7322
+ Added@0xsequence/abi@0.0.0-20230320165616(transitive)
+ Added@0xsequence/account@0.0.0-20230320165616(transitive)
+ Added@0xsequence/api@0.0.0-20230320165616(transitive)
+ Added@0xsequence/auth@0.0.0-20230320165616(transitive)
+ Added@0xsequence/core@0.0.0-20230320165616(transitive)
+ Added@0xsequence/guard@0.0.0-20230320165616(transitive)
+ Added@0xsequence/indexer@0.0.0-20230320165616(transitive)
+ Added@0xsequence/metadata@0.0.0-20230320165616(transitive)
+ Added@0xsequence/migration@0.0.0-20230320165616(transitive)
+ Added@0xsequence/network@0.0.0-20230320165616(transitive)
+ Added@0xsequence/provider@0.0.0-20230320165616(transitive)
+ Added@0xsequence/relayer@0.0.0-20230320165616(transitive)
+ Added@0xsequence/replacer@0.0.0-20230320165616(transitive)
+ Added@0xsequence/signhub@0.0.0-20230320165616(transitive)
+ Added@0xsequence/utils@0.0.0-20230320165616(transitive)
+ Added@0xsequence/wallet@0.0.0-20230320165616(transitive)
- Removed@0xsequence/abi@0.0.0-20230309215219(transitive)
- Removed@0xsequence/account@0.0.0-20230309215219(transitive)
- Removed@0xsequence/api@0.0.0-20230309215219(transitive)
- Removed@0xsequence/auth@0.0.0-20230309215219(transitive)
- Removed@0xsequence/core@0.0.0-20230309215219(transitive)
- Removed@0xsequence/guard@0.0.0-20230309215219(transitive)
- Removed@0xsequence/indexer@0.0.0-20230309215219(transitive)
- Removed@0xsequence/metadata@0.0.0-20230309215219(transitive)
- Removed@0xsequence/migration@0.0.0-20230309215219(transitive)
- Removed@0xsequence/network@0.0.0-20230309215219(transitive)
- Removed@0xsequence/provider@0.0.0-20230309215219(transitive)
- Removed@0xsequence/relayer@0.0.0-20230309215219(transitive)
- Removed@0xsequence/replacer@0.0.0-20230309215219(transitive)
- Removed@0xsequence/signhub@0.0.0-20230309215219(transitive)
- Removed@0xsequence/utils@0.0.0-20230309215219(transitive)
- Removed@0xsequence/wallet@0.0.0-20230309215219(transitive)