Fix space security (#6428)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-08-28 21:45:02 +05:00 committed by GitHub
parent 946d84522c
commit 2273d99406
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -249,7 +249,7 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
params: null
}
ctx.derived.txes.push(tx)
ctx.derived.targets.security = (it) => {
ctx.derived.targets['security' + tx._id] = (it) => {
// TODO: I'm not sure it is called
if (it._id === tx._id) {
return targets
@ -383,7 +383,9 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
await this.processTx(ctx, tx)
const res = await this.provideTx(ctx, tx)
for (const txd of ctx.derived.txes) {
await this.processTx(ctx, txd)
if (txd._id !== tx._id) {
await this.processTx(ctx, txd)
}
}
return res
}