Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleSubmit = async () => {
const { accountName, privateKey } = this.state
actions.loader.show(true)
try {
await actions.eos.register(accountName, privateKey)
await actions.eos.getBalance()
actions.modals.close(constants.modals.EosRegister)
} catch (e) {
console.error(e)
this.setState({ error: e.toString() })
}
actions.loader.hide()
}
handleSubmit = async () => {
const { accountName, privateKey } = this.state
actions.loader.show(true)
try {
await actions.tlos.register(accountName, privateKey)
await actions.tlos
.getBalance()
actions.modals.close(constants.modals.TelosChangeAccount)
} catch (e) {
console.error(e)
this.setState({ error: e.toString() })
}
actions.loader.hide()
}
const { accountName, privateKey } = this.state
actions.loader.show(true)
try {
await actions.tlos.register(accountName, privateKey)
await actions.tlos
.getBalance()
actions.modals.close(constants.modals.TelosChangeAccount)
} catch (e) {
console.error(e)
this.setState({ error: e.toString() })
}
actions.loader.hide()
}
handleSubmit = async () => {
actions.loader.show(true)
try {
await actions.eos.buyAccount()
actions.modals.close(constants.modals.EosBuyAccount)
} catch (e) {
console.error(e)
this.setState({ error: e.toString() })
}
actions.loader.hide()
}
const { accountName, privateKey } = this.state
actions.loader.show(true)
try {
await actions.tlos.register(accountName, privateKey)
await actions.tlos
.getBalance()
actions.modals.close(constants.modals.TelosRegister)
} catch (e) {
console.error(e)
this.setState({ error: e.toString() })
}
actions.loader.hide()
}
overProgress = ({ flow, length }) => {
actions.loader.show(true, '', '', true, { flow, length, name: 'ETH2BTC' })
}
.on('transactionHash', (hash) => {
const txId = `${config.link.etherscan}/tx/${hash}`
actions.loader.show(true, { txId })
})
.on('error', (err) => {
overProgress = ({ flow, length }) => {
actions.loader.show(true, '', '', true, { flow, length, name: 'LTC2ETH' })
}
overProgress = ({ flow, length }) => {
actions.loader.show(true, '', '', true, { flow, length, name: 'BTC2LTC' })
}
overProgress = ({ flow, length }) => {
actions.loader.show(true, '', '', true, { flow, length, name: 'LTC2BTC' })
}