{ activeTab = tab.value}}
+
{ clicked(tab) }}
class="item item-piles-flexrow item-piles-clickable-link"
class:underscore={underscore}
class:active={activeTab === tab.value}
diff --git a/src/applications/dialogs/trade-merchant-item-dialog/trade-merchant-item-dialog-shell.svelte b/src/applications/dialogs/trade-merchant-item-dialog/trade-merchant-item-dialog-shell.svelte
index 270efe0c..b77823f9 100644
--- a/src/applications/dialogs/trade-merchant-item-dialog/trade-merchant-item-dialog-shell.svelte
+++ b/src/applications/dialogs/trade-merchant-item-dialog/trade-merchant-item-dialog-shell.svelte
@@ -58,7 +58,10 @@
$: maxItemPurchaseQuantity = Math.min(maxItemQuantity, maxSellerItemQuantity);
$: itemName = localize($itemNameStore) + ($itemQuantityForPriceStore > 1 ? ` (${$itemQuantityForPriceStore})` : "");
+ let submitted = false;
async function submit() {
+ if(submitted) return;
+ submitted = true;
const result = await game.itempiles.API.tradeItems(seller, buyer, [{
item: item.item,
paymentIndex: get(selectedPriceGroup),
@@ -66,7 +69,10 @@
}], {
interactionId: store.interactionId
});
- if(!result) return;
+ if(!result){
+ submitted = false;
+ return;
+ }
application.options.resolve();
application.close();
}
@@ -171,7 +177,7 @@
+