Skip to content

Commit e590b12

Browse files
bensigaaroncox
authored andcommitted
Libre (#1311)
* add libre mainnet and testnet * Fix small issues for building and running locally
1 parent d9a7723 commit e590b12

File tree

11 files changed

+84
-10
lines changed

11 files changed

+84
-10
lines changed

.flowconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PROJECT_ROOT>/dll/.*
99
<PROJECT_ROOT>/release/.*
1010
<PROJECT_ROOT>/git/.*
11-
11+
.*/node_modules/(?!(styled-components|react|next|memory-cache|next-routes|prop-types|webpack|redux|express))/*.
1212
[include]
1313

1414
[libs]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ If you'd rather build the application yourself, please ensure you have nodejs/np
6464
```
6565
git clone https://github.com/greymass/anchor.git anchor
6666
cd anchor
67-
nvm use v13
68-
yarn --frozen-lockfile
67+
nvm use v14
68+
yarn --frozen-lockfile --ignore-engines
6969
cd app
7070
yarn --frozen-lockfile
7171
cd ..

app/modules/main/containers/Sections/Wallet/Ram.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class WalletRamContainer extends Component<Props> {
3737
system,
3838
t,
3939
} = this.props;
40-
// Disable RAM markets on specific chains (Worbli)
41-
const disableRamMarket = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f');
40+
// Disable RAM markets on specific chains (Worbli, Libre)
41+
const disableRamMarket = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f' | connection.chainId === '38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465');
4242
// Disable features based on distribution feature (BEOS)
4343
const distributionPeriod = get(chain, 'distributionPeriodInfo.beosDistribution', false);
4444
return (

app/renderer/assets/images/libre.png

13.6 KB
Loading

app/shared/actions/blockexplorers.js

+18
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,24 @@ export function getBlockExplorers() {
171171
txid: 'https://wax.bloks.io/transaction/{txid}'
172172
}
173173
},
174+
],
175+
"libre-testnet": [
176+
{
177+
name: "testnet.libre.org/v2/explore",
178+
patterns: {
179+
account: "https://testnet.libre.org/v2/explore/account/{account}",
180+
txid: "https://testnet.libre.org/v2/explore/transaction/{txid}",
181+
},
182+
},
183+
],
184+
"libre-mainnet": [
185+
{
186+
name: "lb.libre.org/v2/explore",
187+
patterns: {
188+
account: "https://lb.libre.org/v2/explore/account/{account}",
189+
txid: "https://lb.libre.org/v2/explore/transaction/{txid}",
190+
},
191+
},
174192
]
175193
};
176194

app/shared/components/Global/Fragment/ChainLogo.js

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import telosLogo from '../../../../renderer/assets/images/telos.png';
2020
import uxLogo from '../../../../renderer/assets/images/ux.png';
2121
import worbliLogo from '../../../../renderer/assets/images/worbli.png';
2222
import waxLogo from '../../../../renderer/assets/images/wax.png';
23+
import libreLogo from "../../../../renderer/assets/images/libre.png"; //libre
2324

2425
const logos = {
2526
'b912d19a6abd2b1b05611ae5be473355d64d95aeff0c09bedc8c166cd6468fe4': beosLogo, // mainnet (beos)
@@ -46,6 +47,8 @@ const logos = {
4647
'73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f': worbliLogo, // mainnet (worbli)
4748
'1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4': waxLogo, // mainnet (wax)
4849
'f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12': waxLogo,
50+
'38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465': libreLogo, // mainnet (libre)
51+
'b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee': libreLogo // testnet (libre)
4952
};
5053

5154
export class GlobalFragmentChainLogo extends PureComponent<Props> {

app/shared/components/Wallet/Panel/Unlocked.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class WalletPanelUnlocked extends Component<Props> {
7676
const {
7777
isWaxChain
7878
} = this.state;
79-
// Disable RAM markets on specific chains (Worbli)
80-
const disableRamMarket = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f');
79+
// Disable RAM markets on specific chains (Worbli, Libre)
80+
const disableRamMarket = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f' || connection.chainId === '38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465');
8181
// Disable features based on distribution feature (BEOS)
8282
const distributionPeriod = get(chain, 'distributionPeriodInfo.beosDistribution', false);
8383

app/shared/containers/Tools.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ class ToolsContainer extends Component<Props> {
276276
}
277277
}
278278
}
279-
// Disable "create new account" on specific chains (Worbli)
280-
const disableCreateAccount = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f');
279+
// Disable "create new account" on specific chains (Worbli, Libre)
280+
const disableCreateAccount = (connection.chainId === '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f' || connection.chainId === '38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465');
281281
if (pane.name === 'create_account' && disableCreateAccount) {
282282
return false;
283283
}

app/shared/containers/Welcome/Import.js

+2
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,6 @@ const blockchains = {
446446
'73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f': 'https://api.worbli.io',
447447
'1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4': 'https://wax.greymass.com',
448448
'f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12': 'https://waxtestnet.greymass.com',
449+
'b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee': 'https://testnet.libre.org',
450+
'38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465': 'https://lb.libre.org',
449451
};

app/shared/reducers/blockchains.js

+27
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ const supportedContracts = [
9999
chainId: '73647cde120091e0a4b85bced2f3cfdb3041e266cbbe95cee59b73235a1b3b6f',
100100
supportedContracts: [],
101101
},
102+
{
103+
// 'libre-testnet'
104+
chainId: 'b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee',
105+
supportedContracts: ['producerinfo'],
106+
},
107+
{
108+
// 'libre-mainnet'
109+
chainId: '38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465',
110+
supportedContracts: ['producerinfo'],
111+
},
102112
];
103113

104114
const defaultValues = {
@@ -312,6 +322,23 @@ const knownChains = [
312322
"testnet": true,
313323
"tokenPrecision": 8,
314324
"voteDecayPeriod": 13
325+
},
326+
{
327+
"_id": "libre-testnet",
328+
"chainId": "b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee",
329+
"name": "Libre (Testnet)",
330+
"node": "https://testnet.libre.org",
331+
"symbol": "LIBRE",
332+
"testnet": true,
333+
"tokenPrecision": 4,
334+
},
335+
{
336+
"_id": "libre-mainnet",
337+
"chainId": "38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465",
338+
"name": "Libre",
339+
"node": "https://lb.libre.org",
340+
"symbol": "LIBRE",
341+
"tokenPrecision": 4,
315342
}
316343
];
317344
/* eslint-enable */

docs/blockchains.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,29 @@
125125
"contracts": [],
126126
"systemToken": "WBI",
127127
"testnet": false
128+
},
129+
{
130+
"_id": "libre-testnet",
131+
"chainId": "b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee",
132+
"keyPrefix": "EOS",
133+
"name": "Libre (Testnet)",
134+
"node": "https://testnet.libre.org",
135+
"contracts": [
136+
"producerinfo"
137+
],
138+
"systemToken": "LIBRE",
139+
"testnet": true
140+
},
141+
{
142+
"_id": "libre-mainnet",
143+
"chainId": "38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465",
144+
"keyPrefix": "EOS",
145+
"name": "Libre",
146+
"node": "https://lb.libre.org",
147+
"contracts": [
148+
"producerinfo"
149+
],
150+
"systemToken": "LIBRE",
151+
"testnet": false
128152
}
129-
]
153+
]

0 commit comments

Comments
 (0)