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]); + }); + }); }); }