Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useBCH.js
Show First 20 Lines • Show All 945 Lines • ▼ Show 20 Lines | const createToken = async (BCH, wallet, feeInSatsPerByte, configObj) => { | ||||
const txidStr = await BCH.RawTransactions.sendRawTransaction([hex]); | const txidStr = await BCH.RawTransactions.sendRawTransaction([hex]); | ||||
if (txidStr && txidStr[0]) { | if (txidStr && txidStr[0]) { | ||||
console.log(`${currency.ticker} txid`, txidStr[0]); | console.log(`${currency.ticker} txid`, txidStr[0]); | ||||
} | } | ||||
let link; | let link; | ||||
if (process.env.REACT_APP_NETWORK === `mainnet`) { | if (process.env.REACT_APP_NETWORK === `mainnet`) { | ||||
link = `${currency.tokenExplorerUrl}/tx/${txidStr}`; | link = `${currency.blockExplorerUrl}/tx/${txidStr}`; | ||||
} else { | } else { | ||||
link = `${currency.blockExplorerUrlTestnet}/tx/${txidStr}`; | link = `${currency.blockExplorerUrlTestnet}/tx/${txidStr}`; | ||||
} | } | ||||
//console.log(`link`, link); | //console.log(`link`, link); | ||||
return link; | return link; | ||||
} catch (err) { | } catch (err) { | ||||
if (err.error === 'insufficient priority (code 66)') { | if (err.error === 'insufficient priority (code 66)') { | ||||
▲ Show 20 Lines • Show All 761 Lines • Show Last 20 Lines |