Skip to content

Commit 7d77262

Browse files
committed
Make "Code" and "About" configurable in config.js
Initialize values with the same URLs for all environments
1 parent 83dce83 commit 7d77262

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ react.log
6363
npm-debug.log*
6464
yarn-debug.log*
6565
yarn-error.log*
66+
.vscode

src/components/Advanced.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { PrimaryButton, BorderButton } from '../components/Buttons'
1414
import getConfig from '../config'
1515
import { getStoredValue, storeValues } from "../services/localStorage";
1616

17-
const { CURRENCY } = getConfig()
17+
const { CURRENCY, LINKS } = getConfig()
1818

1919
export default class Advanced extends React.Component {
2020
constructor(props) {
@@ -169,18 +169,20 @@ export default class Advanced extends React.Component {
169169
<Text>Enable advanced features</Text>
170170
<Checkbox onChange={this.updateAdvancedBalance} checked={expertMode} />
171171
</Flex>
172+
172173
<hr style={{paddingTop:20}}/>
174+
173175
<div>
174176
<div style={{width:"100%",textAlign:"center"}}><h5>Learn More</h5></div>
175177
<div className="content ops row settings-row" style={{marginBottom:10}}>
176-
<a href="https://github.com/leapdao/burner-wallet" style={{color:"#FFFFFF"}} target="_blank" rel="noopener noreferrer">
178+
<a href={LINKS.CODE} style={{color:"#FFFFFF"}} target="_blank" rel="noopener noreferrer">
177179
<BorderButton width={1}>
178180
<Scaler config={{startZoomAt:400,origin:"50% 50%"}}>
179181
<i className="fas fa-code"/> {i18n.t('code')}
180182
</Scaler>
181183
</BorderButton>
182184
</a>
183-
<a href="https://leapdao.org/" style={{color:"#FFFFFF"}} target="_blank" rel="noopener noreferrer">
185+
<a href={LINKS.ABOUT} style={{color:"#FFFFFF"}} target="_blank" rel="noopener noreferrer">
184186
<BorderButton width={1}>
185187
<Scaler config={{startZoomAt:400,origin:"50% 50%"}}>
186188
<i className="fas fa-info"/> {i18n.t('about')}

src/config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ const configs = [
55
CURRENCY_LIST: ["USD", "EUR", "GBP"],
66
DEFAULT_CURRENCY: "USD"
77
},
8+
LINKS: {
9+
CODE: "https://github.com/leapdao/burner-wallet",
10+
ABOUT: "https://leapdao.org/",
11+
},
812
SIDECHAIN: {
913
NAME: "Leap Testnet",
1014
RPC: "https://testnet-node.leapdao.org",
@@ -46,6 +50,10 @@ const configs = [
4650
CURRENCY_LIST: ["EUR", "USD", "GBP"],
4751
DEFAULT_CURRENCY: "USD"
4852
},
53+
LINKS: {
54+
CODE: "https://github.com/leapdao/burner-wallet",
55+
ABOUT: "https://leapdao.org/",
56+
},
4957
SIDECHAIN: {
5058
NAME: "Leap Testnet",
5159
RPC: "https://testnet-node.leapdao.org",
@@ -87,6 +95,10 @@ const configs = [
8795
CURRENCY_LIST: ["EUR", "USD", "GBP"],
8896
DEFAULT_CURRENCY: "USD"
8997
},
98+
LINKS: {
99+
CODE: "https://github.com/leapdao/burner-wallet",
100+
ABOUT: "https://leapdao.org/",
101+
},
90102
SIDECHAIN: {
91103
NAME: "Leap Network",
92104
RPC: "wss://mainnet-node1.leapdao.org:1443",

0 commit comments

Comments
 (0)