From d23b602db751406a0c4c0d53b1c71b598ef0028a Mon Sep 17 00:00:00 2001 From: Abhishek Sinha Date: Wed, 5 Jun 2019 16:37:05 +0530 Subject: [PATCH] fixed cancel trade button onclick error --- supernode/index.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/supernode/index.html b/supernode/index.html index e7a2d05..4172eaa 100644 --- a/supernode/index.html +++ b/supernode/index.html @@ -20283,20 +20283,32 @@ const currency = myOrdersData.currency; const order_type = myOrdersData.order_type; const product = myOrdersData.product; - - //const status = status + const RM_TRADE = new localbitcoinplusplus.trade; + t += `
  • Trade Id: ${trade_id}
  • -
  • Type Of Order: ${order_type}
  • -
  • Product: ${product}
  • -
  • Price: ${price}
  • -
  • Currency: ${currency}
  • -
  • -

  • - `; +
  • Type Of Order: ${order_type}
  • +
  • Product: ${product}
  • +
  • Price: ${price}
  • +
  • Currency: ${currency}
  • +
  • +

  • + `; + }); t += ``; my_trades_div.innerHTML = t; + + var delclassname = document.getElementsByClassName("CANCEL_TRADE"); + + Array.from(delclassname).forEach(function(element) { + element.addEventListener('click', function() { + let cancel_td = this.id; + let trade_opts = cancel_td.split('-'); + RM_TRADE.cancelTrade(trade_opts[0], trade_opts[1], trade_opts[2]); + }); + }); }); }