From 3d2d8198bc4343da5bffcad0bb971ed52a57a1f5 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 5 Jul 2023 10:15:23 +0300 Subject: [PATCH] fix: do not re-add order on invoice re-issue --- static/components/order-list/order-list.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/components/order-list/order-list.js b/static/components/order-list/order-list.js index 8a1cca9..10681b5 100644 --- a/static/components/order-list/order-list.js +++ b/static/components/order-list/order-list.js @@ -261,8 +261,12 @@ async function orderList(path) { this.search.publicKey === data.customerPubkey ) { const orderData = JSON.parse(data.dm.message) - const order = await this.getOrder(orderData.id) - this.orders.unshift(order) + const i = this.orders.map(o => o.id).indexOf(orderData.id) + if (i === -1) { + const order = await this.getOrder(orderData.id) + this.orders.unshift(order) + } + } }, orderSelected: async function (orderId) {