From cd52198d61a28244a4899221c5d2646558131658 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Sat, 13 Jul 2024 19:07:39 +0200 Subject: [PATCH] fix --- src/services/storage/stateBundler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/storage/stateBundler.ts b/src/services/storage/stateBundler.ts index dd478e7a..ad94e119 100644 --- a/src/services/storage/stateBundler.ts +++ b/src/services/storage/stateBundler.ts @@ -71,7 +71,7 @@ export class StateBundler { AddTxPoint = (actionName: TransactionStatePointType, v: number, settings: TxPointSettings) => { const { used, from, timeDiscount } = settings const meta = settings.meta || [] - const key = `${actionName}_${from}_${used}_${meta.join('_')}` + const key = [actionName, from, used, ...meta].join('_') this.increment(key, v) if (timeDiscount) { this.totalSatsForDiscount += v @@ -82,17 +82,17 @@ export class StateBundler { AddTxPointFailed = (actionName: TransactionStatePointType, v: number, settings: TxPointSettings) => { const { used, from } = settings const meta = settings.meta || [] - const key = `${actionName}_${from}_${used}_${meta.join('_')}_failed` + const key = [actionName, from, used, ...meta, 'failed'].join('_') this.increment(key, v) } AddBalancePoint = (actionName: BalanceStatePointType, v: number, meta = []) => { - const key = `${actionName}_${meta.join('_')}` + const key = [actionName, ...meta].join('_') this.set(key, v) } AddMaxPoint = (actionName: MaxStatePointType, v: number, meta = []) => { - const key = `${actionName}_${meta.join('_')}` + const key = [actionName, ...meta].join('_') this.max(key, v) }