@bsv/wallet-toolbox 1.7.9 → 1.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mobile/package-lock.json +2 -2
- package/mobile/package.json +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +5 -2
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +0 -12
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/storage/StorageKnex.ts +6 -1
- package/src/storage/remoting/StorageServer.ts +0 -15
package/package.json
CHANGED
|
@@ -272,9 +272,14 @@ export class StorageKnex extends StorageProvider implements WalletStorageProvide
|
|
|
272
272
|
|
|
273
273
|
override async insertCertificate(certificate: TableCertificateX, trx?: TrxToken): Promise<number> {
|
|
274
274
|
const e = await this.validateEntityForInsert(certificate, trx, undefined, ['isDeleted'])
|
|
275
|
+
if (e.certificateId === 0) delete e.certificateId
|
|
276
|
+
|
|
277
|
+
const logger = e.logger
|
|
278
|
+
if (e.logger) delete e.logger
|
|
279
|
+
|
|
275
280
|
const fields = e.fields
|
|
276
281
|
if (e.fields) delete e.fields
|
|
277
|
-
|
|
282
|
+
|
|
278
283
|
const [id] = await this.toDb(trx)<TableCertificate>('certificates').insert(e)
|
|
279
284
|
certificate.certificateId = id
|
|
280
285
|
|
|
@@ -49,21 +49,6 @@ export class StorageServer {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
private setupRoutes(): void {
|
|
52
|
-
this.app.use((req: Request, res: Response, next) => {
|
|
53
|
-
// Silently 200 any POST to exactly the root that looks like a crawler probe
|
|
54
|
-
if (
|
|
55
|
-
req.method === 'POST' &&
|
|
56
|
-
req.path === '/' &&
|
|
57
|
-
(
|
|
58
|
-
!req.headers['content-type']?.includes('application/json') ||
|
|
59
|
-
req.headers['content-length'] === '0' ||
|
|
60
|
-
(req.headers['content-length'] && Number(req.headers['content-length']) < 50)
|
|
61
|
-
)
|
|
62
|
-
) {
|
|
63
|
-
return res.status(200).json({ jsonrpc: '2.0', result: null, id: null })
|
|
64
|
-
}
|
|
65
|
-
next()
|
|
66
|
-
})
|
|
67
52
|
|
|
68
53
|
this.app.use(express.json({ limit: '30mb' }))
|
|
69
54
|
|