diff --git a/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js b/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js index 288d57994..b61a639a7 100644 --- a/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js +++ b/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js @@ -326,6 +326,16 @@ class TransactionRequest extends React.Component { > View Details +
{ + if (req && req.tx && req.tx.hash) { + link.send('tray:copyExplorer', req.tx.hash, this.chain) + } + }} + > + Copy Details +
link.send('tray:replaceTx', req.handlerId, 'speed')}> Speed Up
diff --git a/main/index.js b/main/index.js index 4f4a5de0c..cb575af41 100644 --- a/main/index.js +++ b/main/index.js @@ -125,8 +125,15 @@ ipcMain.on('tray:openExternal', (e, url) => { }) ipcMain.on('tray:openExplorer', (e, hash, chain) => { - const explorer = store('main.networks', chain.type, chain.id, 'explorer') - shell.openExternal(explorer + '/tx/' + hash) + // remove trailing slashes from the base url + const explorer = (store('main.networks', chain.type, chain.id, 'explorer') || '').replace(/\/+$/, '') + shell.openExternal(`${explorer}/tx/${hash}`) +}) + +ipcMain.on('tray:copyExplorer', (e, hash, chain) => { + // remove trailing slashes from the base url + const explorer = (store('main.networks', chain.type, chain.id, 'explorer') || '').replace(/\/+$/, '') + clipboard.writeText(explorer + '/tx/' + hash) }) ipcMain.on('tray:giveAccess', (e, req, access) => {