|
@ -10,7 +10,9 @@ import { |
|
|
setJumblrAddress, |
|
|
setJumblrAddress, |
|
|
importPrivkey, |
|
|
importPrivkey, |
|
|
copyCoinAddress, |
|
|
copyCoinAddress, |
|
|
copyString |
|
|
copyString, |
|
|
|
|
|
resumeJumblr, |
|
|
|
|
|
pauseJumblr, |
|
|
} from '../../../actions/actionCreators'; |
|
|
} from '../../../actions/actionCreators'; |
|
|
import Store from '../../../store'; |
|
|
import Store from '../../../store'; |
|
|
import Config from '../../../config'; |
|
|
import Config from '../../../config'; |
|
@ -69,9 +71,59 @@ class Jumblr extends React.Component { |
|
|
this.copyPassphrase = this.copyPassphrase.bind(this); |
|
|
this.copyPassphrase = this.copyPassphrase.bind(this); |
|
|
this.checkPassphraseValid = this.checkPassphraseValid.bind(this); |
|
|
this.checkPassphraseValid = this.checkPassphraseValid.bind(this); |
|
|
this.importJumblrSecretAddress = this.importJumblrSecretAddress.bind(this); |
|
|
this.importJumblrSecretAddress = this.importJumblrSecretAddress.bind(this); |
|
|
|
|
|
this._pauseJumblr = this._pauseJumblr.bind(this); |
|
|
|
|
|
this._resumeJumblr = this._resumeJumblr.bind(this); |
|
|
this.onChange = this.onChange.bind(this); |
|
|
this.onChange = this.onChange.bind(this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_pauseJumblr() { |
|
|
|
|
|
pauseJumblr(this.props.ActiveCoin.coin) |
|
|
|
|
|
.then((json) => { |
|
|
|
|
|
if (json.error && |
|
|
|
|
|
json.error.code) { |
|
|
|
|
|
Store.dispatch( |
|
|
|
|
|
triggerToaster( |
|
|
|
|
|
json.error.message, |
|
|
|
|
|
'Error', |
|
|
|
|
|
'error' |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
} else if (json.result && json.result.result && json.result.result === 'paused') { |
|
|
|
|
|
Store.dispatch( |
|
|
|
|
|
triggerToaster( |
|
|
|
|
|
'Jumblr paused', |
|
|
|
|
|
'Jumblr', |
|
|
|
|
|
'success' |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_resumeJumblr() { |
|
|
|
|
|
resumeJumblr(this.props.ActiveCoin.coin) |
|
|
|
|
|
.then((json) => { |
|
|
|
|
|
if (json.error && |
|
|
|
|
|
json.error.code) { |
|
|
|
|
|
Store.dispatch( |
|
|
|
|
|
triggerToaster( |
|
|
|
|
|
json.error.message, |
|
|
|
|
|
'Error', |
|
|
|
|
|
'error' |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
} else if (json.result && json.result.result && json.result.result === 'resumed') { |
|
|
|
|
|
Store.dispatch( |
|
|
|
|
|
triggerToaster( |
|
|
|
|
|
'Jumblr resumed', |
|
|
|
|
|
'Jumblr', |
|
|
|
|
|
'success' |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
generateKeys(passphrase) { |
|
|
generateKeys(passphrase) { |
|
|
if (!passphrase) { |
|
|
if (!passphrase) { |
|
|
const key = new Bitcoin.ECKey(false).setCompressed(true); |
|
|
const key = new Bitcoin.ECKey(false).setCompressed(true); |
|
|