diff --git a/index.html b/index.html index 6c8cc14..9bb3887 100644 --- a/index.html +++ b/index.html @@ -952,6 +952,8 @@

Sent transfer to bank request

This may take upto 30 mins to complete

+ Check transaction on + blockchain
{ console.warn(`Withdraw ${amount} from cashier ${cashier}`, txid); User.tokenToCash(cashier, amount, txid, upiId).then(result => { showChildElement('withdraw_wallet_process', 1); refreshBalance(); + getRef('withdrawal_blockchain_link').classList.remove('hide'); + getRef('withdrawal_blockchain_link').href = `https://flosight.duckdns.org/tx/${txid}` console.log(result); }).catch(error => { getRef('withdrawal_failed_reason').textContent = error; diff --git a/scripts/std_ui.js b/scripts/std_ui.js index cd57f13..c380728 100644 --- a/scripts/std_ui.js +++ b/scripts/std_ui.js @@ -452,11 +452,11 @@ async function showPage(targetPage, options = {}) { } else if (params.type === 'wallet') { transactionDetails = User.cashierRequests[params.transactionId] console.log(transactionDetails) - const { message: { amount, mode, upi_id, upi_txid }, note, tag } = transactionDetails + const { message: { amount, mode, upi_id, upi_txid, token_txid }, note, tag } = transactionDetails status = tag ? tag : (note ? 'REJECTED' : "PENDING"); getRef('transaction__type').textContent = mode === 'cash-to-token' ? 'Wallet top-up' : 'Withdraw'; if (status === 'COMPLETED') { - getRef('transaction__link').href = `https://flosight.duckdns.org/tx/${note}` + getRef('transaction__link').href = `https://flosight.duckdns.org/tx/${mode === 'cash-to-token' ? note : token_txid}` getRef('transaction__link').classList.remove('hide') } else if (status === 'REJECTED') { getRef('transaction__note').innerHTML = ` ${note.split(':')[1]}`