aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-08-10 03:25:38 +0800
committerkumavis <aaron@kumavis.me>2017-08-10 03:25:38 +0800
commit245125eb18a03f3ea91fa43a90ad59e628471d62 (patch)
treed4681c28df81d8a309c5be5a38cf35dee8256786 /ui
parent052d338b2b35bbea4cc4b11db6cdb13cbcc69001 (diff)
downloadtangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar.gz
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar.bz2
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar.lz
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar.xz
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.tar.zst
tangerine-wallet-browser-245125eb18a03f3ea91fa43a90ad59e628471d62.zip
ui - buy eth - formatting and moved network names to config
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/buy-button-subview.js42
1 files changed, 19 insertions, 23 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js
index d9ccb36c5..15281171c 100644
--- a/ui/app/components/buy-button-subview.js
+++ b/ui/app/components/buy-button-subview.js
@@ -8,11 +8,7 @@ const ShapeshiftForm = require('./shapeshift-form')
const Loading = require('./loading')
const AccountPanel = require('./account-panel')
const RadioList = require('./custom-radio-list')
-const networkNames = {
- 3: 'Ropsten',
- 4: 'Rinkeby',
- 42: 'Kovan',
-}
+const networkNames = require('../../../app/scripts/config.js').networkNames
module.exports = connect(mapStateToProps)(BuyButtonSubview)
@@ -146,30 +142,30 @@ BuyButtonSubview.prototype.primarySubview = function () {
case '3':
case '4':
case '42':
- const networkName = networkNames[network]
- const label = `${networkName} Test Faucet`
- return (
- h('div.flex-column', {
- style: {
- alignItems: 'center',
- margin: '20px 50px',
- },
- }, [
- h('button.text-transform-uppercase', {
- onClick: () => this.props.dispatch(actions.buyEth({ network })),
+ const networkName = networkNames[network]
+ const label = `${networkName} Test Faucet`
+ return (
+ h('div.flex-column', {
style: {
- marginTop: '15px',
+ alignItems: 'center',
+ margin: '20px 50px',
},
- }, label),
- // Kovan only: Dharma loans beta
- network === '42' ? (
+ }, [
h('button.text-transform-uppercase', {
- onClick: () => this.navigateTo('https://borrow.dharma.io/'),
+ onClick: () => this.props.dispatch(actions.buyEth({ network })),
style: {
marginTop: '15px',
},
- }, 'Borrow With Dharma (Beta)')
- ) : null,
+ }, label),
+ // Kovan only: Dharma loans beta
+ network === '42' ? (
+ h('button.text-transform-uppercase', {
+ onClick: () => this.navigateTo('https://borrow.dharma.io/'),
+ style: {
+ marginTop: '15px',
+ },
+ }, 'Borrow With Dharma (Beta)')
+ ) : null,
])
)