diff --git a/scripts/fn_pay.js b/scripts/fn_pay.js index 9bd0dab..f29c835 100644 --- a/scripts/fn_pay.js +++ b/scripts/fn_pay.js @@ -165,7 +165,7 @@ const Cashier = {}; Cashier.init = function () { delegate(getRef('cashier_pending_request_list'), 'click', '.process-cashier-request', e => { - const requestID = e.delegateTarget.closest('.cashier-request').id; + const requestID = e.delegateTarget.closest('.cashier-request').dataset.vc; cashierUI.completeRequest(requestID) }) getRef('cashier_requests_selector').addEventListener('change', e => { diff --git a/scripts/fn_ui.js b/scripts/fn_ui.js index 9fe7887..0729d8b 100644 --- a/scripts/fn_ui.js +++ b/scripts/fn_ui.js @@ -492,7 +492,7 @@ const render = { cashierRequestCard(details) { const { time, senderID, message: { mode, amount = 0 }, note, tag, vectorClock } = details; const clone = getRef('cashier_request_template').content.cloneNode(true).firstElementChild; - clone.id = vectorClock; + clone.dataset.vc = vectorClock; const status = tag || note; //status tag for completed, note for rejected clone.querySelector('.cashier-request__details').textContent = `${mode === 'cash-to-token' ? 'Top-up wallet with' : 'Withdraw'} ${formatAmount(amount)}`; clone.querySelector('.cashier-request__requestor').textContent = senderID;