Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onSubmit(e) {
e.preventDefault()
const collector = collect()
const address = state.view.address_input
const asset = createAsset(this.Coin.type, this.Coin.symbol, address)
setHref(routes.asset({ asset_id: getAssetId(asset) }))
// setHref(routes.home())
collector.emit()
}
componentWillMount() {
state.view = {
step: 0,
password: '',
repassword: '',
words_shuffle_clicked: [],
word_wrong_selected: false
}
this.observer = createObserver(m => this.forceUpdate())
this.observer.observe(state.view)
this.observer.observe(state.view.words_shuffle_clicked, 'length')
const { symbol } = getParamsFromLocation()
this.words = getRandomMnemonic().split(' ')
this.words_shuffle = []
this.Coin = Coins[symbol]
// binding
this.onChangePassword = this.onChangePassword.bind(this)
this.onChangeRepassword = this.onChangeRepassword.bind(this)
this.onVerifyWord = this.onVerifyWord.bind(this)
this.onNext = this.onNext.bind(this)
this.onBack = this.onBack.bind(this)
this.onPrint = this.onPrint.bind(this)
this.onClear = this.onClear.bind(this)
componentWillMount() {
const asset = this.props.asset
this.observer = createObserver(mutations => this.forceUpdate())
this.observer.observe(state.location, 'pathname')
this.observer.observe(state.prices)
this.observer.observe(state.assets)
this.observer.observe(asset, 'label')
this.observer.observe(asset, 'balance')
// binding
this.onClick = this.onClick.bind(this)
}
componentWillUnmount() {
componentWillMount() {
this.observer = createObserver(mutations => this.forceUpdate())
this.observer.observe(state.popups.closeSession, 'open')
// binding
}
componentWillUnmount() {
componentWillMount() {
this.observer = createObserver(m => this.forceUpdate())
this.observer.observe(state.view)
// Initial state
state.view = {
confirmed: false
}
// binding
// this.onChangeEncryption = this.onChangeEncryption.bind(this)
}
onConfirm() {
onSubmit(e) {
e.preventDefault()
const collector = collect()
const address = state.view.address
const asset = createAsset(BTC.type, BTC.symbol, address)
setHref(routes.asset(getCoinId(asset)))
collector.emit()
}
onSubmit(e) {
e.preventDefault()
const collector = collect()
const ethereum_asset_id = state.view.ethereum_asset_id
const ethereum_asset = state.assets[ethereum_asset_id]
const address = ethereum_asset.address
const asset = createAsset(this.Coin.type, this.Coin.symbol, address)
const asset_id = getCoinId({ symbol: this.Coin.symbol, address })
copyPrivateKey(ethereum_asset_id, asset_id)
setHref(routes.asset(asset_id))
collector.emit()
}
onSubmit(e) {
e.preventDefault()
if (this.isFormValid) {
const collector = collect()
const address = state.view.address
const asset = createAsset(ETH.type, ETH.symbol, address)
setPrivateKey(
getCoinId({ symbol: ETH.symbol, address }),
state.view.private_key,
state.view.password
)
setHref(routes.asset(getCoinId(asset)))
collector.emit()
}
}
onSubmit(e) {
e.preventDefault()
if (this.isFormValid) {
const collector = collect()
const address = state.view.address
const asset = createAsset(BTC.type, BTC.symbol, address)
setPrivateKey(
getCoinId({ symbol: BTC.symbol, address }),
state.view.private_key,
state.view.password
)
setHref(routes.asset(getCoinId(asset)))
collector.emit()
}
}
onChangeTypeImport(e) {
const collector = collect()
state.view.type_import = e.target.value
collector.emit()
}