Skip to content

Commit

Permalink
demo pages. Change transaction link depending on a testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaipov committed Jan 30, 2019
1 parent f195d2e commit caa3248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/eth_signer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ho
const result = await web3.eth.sendSignedTransaction(rawHexGlobal);
document.getElementById('progress').style.display = 'none';
log(`Transfer result: \n${JSON.stringify(result, undefined, 2)}`);
document.getElementById('etherscanLink').innerHTML = `<a href='https://ropsten.etherscan.io/tx/${result.transactionHash}'>Etherscan Link</a>`;
// todo change the link depending on a testnet
const prefix = endpoint.indexOf('rinkeby') !== -1 ? 'rinkeby' : 'ropsten';
document.getElementById('etherscanLink').innerHTML = `<a href='https://${prefix}.etherscan.io/tx/${result.transactionHash}'>Etherscan Link</a>`;
} catch (e) {
console.log(e);
log(e);
Expand Down

0 comments on commit caa3248

Please sign in to comment.