aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-03-06 01:03:46 +0800
committerGitHub <noreply@github.com>2018-03-06 01:03:46 +0800
commit1bd18cebd7e08edbbcf35407b962e71dcd2c3399 (patch)
tree4cbf19a137bdafaeb3eb90cf669f8a1724e77846 /ui/app/components
parent0d97ff221017b78ccfa02defdb7a52ad701981a5 (diff)
downloadtangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar.gz
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar.bz2
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar.lz
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar.xz
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.tar.zst
tangerine-wallet-browser-1bd18cebd7e08edbbcf35407b962e71dcd2c3399.zip
Fixes shapeshift coin selection dropdown. (#3416)
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/shapeshift-form.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js
index 2270b8236..648b05049 100644
--- a/ui/app/components/shapeshift-form.js
+++ b/ui/app/components/shapeshift-form.js
@@ -51,8 +51,7 @@ ShapeshiftForm.prototype.componentWillMount = function () {
this.props.shapeShiftSubview()
}
-ShapeshiftForm.prototype.onCoinChange = function (e) {
- const coin = e.target.value
+ShapeshiftForm.prototype.onCoinChange = function (coin) {
this.setState({
depositCoin: coin,
errorMessage: '',
@@ -133,7 +132,7 @@ ShapeshiftForm.prototype.renderMarketInfo = function () {
}
ShapeshiftForm.prototype.renderQrCode = function () {
- const { depositAddress, isLoading } = this.state
+ const { depositAddress, isLoading, depositCoin } = this.state
const qrImage = qrcode(4, 'M')
qrImage.addData(depositAddress)
qrImage.make()
@@ -141,7 +140,7 @@ ShapeshiftForm.prototype.renderQrCode = function () {
return h('div.shapeshift-form', {}, [
h('div.shapeshift-form__deposit-instruction', [
- 'Deposit your BTC to the address below:',
+ `Deposit your ${depositCoin.toUpperCase()} to the address below:`,
]),
h('div', depositAddress),
@@ -182,7 +181,7 @@ ShapeshiftForm.prototype.render = function () {
h(SimpleDropdown, {
selectedOption: this.state.depositCoin,
- onSelect: this.onCoinChange,
+ onSelect: (coin) => this.onCoinChange(coin),
options: Object.entries(coinOptions).map(([coin]) => ({
value: coin.toLowerCase(),
displayValue: coin,