Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.addEventListener('popstate', function (e) { actions.modals.close(name) }) // eslint-disable-line
handleWithdraw = () => {
const {
item: {
decimals,
token,
contractAddress,
unconfirmedBalance,
currency,
address,
balance,
},
} = this.props
// actions.analytics.dataEvent(`balances-withdraw-${currency.toLowerCase()}`)
actions.modals.open(constants.modals.Withdraw, {
currency,
address,
contractAddress,
decimals,
token,
balance,
unconfirmedBalance,
})
}
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()
}
handleGenerateMultisignLink = async () => {
actions.modals.open(constants.modals.MultisignJoinLink, {})
}
handleWithdraw = () => {
const {
item: {
currency,
},
item
} = this.props
const { Withdraw, WithdrawMultisigSMS, WithdrawMultisigUser } = constants.modals;
let withdrawModalType = Withdraw;
if (currency === 'BTC (SMS-Protected)') withdrawModalType = WithdrawMultisigSMS;
if (currency === 'BTC (Multisig)') withdrawModalType = WithdrawMultisigUser;
actions.modals.open(withdrawModalType, item)
}
handleEosRegister = () => {
actions.modals.open(constants.modals.EosRegister, {})
}
openModal={() => {
actions.modals.open(constants.modals.Withdraw, wallet)
}}
/>
<button> actions.modals.close(name)}>
</button>
.then(() => {
actions.loader.hide()
actions.notifications.show(constants.notifications.Message, { message })
actions.modals.close(constants.modals.Approve)
})
.catch(() => {
close = () => {
const { name } = this.props
localStorage.setItem(constants.localStorage.privateKeysSaved, true)
actions.modals.close(name)
}