-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Document the wallet configuration proccess and the related hapi env variables. refs #137 * Document the wallet configuration proccess and the related hapi env variables. refs #137 * fix typos. refs #137 * fix typos. refs #137 * fix: add missing parameter. refs #137 * reduce final bundle size (#293) * chore: avoid load unused icons from ual-reactjs-renderer to reduce the final bundle size * chore: update eslint config * feat: add new actions for permissioning committee and entity account (#332) Co-authored-by: kurono <kurono@riseup.net> Co-authored-by: adriel <adriexnet@gmail.com>
- Loading branch information
1 parent
3309b9e
commit 92e0c40
Showing
13 changed files
with
738 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Dashboard wallet creation and configuration | ||
|
||
The EOSIO dashboard collects information from different networks but also | ||
allows users to execute specific administrative actions on certain networks, | ||
by EOSIO accounts and their respective keys. All this requires to use a | ||
wallet that acts as an intermediary to sign transactions and interact with | ||
permissioned actions in the networks. | ||
|
||
Here we explain how to create and configure such a wallet for the EOSIO | ||
dashboard. Inside the wallet pod, please execute the following commands: | ||
|
||
```bash | ||
# Create a default wallet | ||
cleos --wallet-url http://localhost:8888 wallet create --to-console | ||
# Create a wallet called eosmechanics | ||
cleos --wallet-url http://localhost:8888 wallet create -n eosmechanics --to-console | ||
``` | ||
|
||
The previews commands will create a default wallet and another wallet called | ||
eosmechanics. The returned passwords (a string starting with PW...) should be | ||
used to fulfill the following environment variables: | ||
|
||
```bash | ||
HAPI_EOS_BASE_ACCOUNT=eosmechanics | ||
HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... | ||
HAPI_EOS_MECHANICS_ACCOUNT=eosmechanics | ||
HAPI_EOS_MECHANICS_PASSWORD=PW... | ||
``` | ||
|
||
Let's make sure that the wallet was created correctly: | ||
|
||
```bash | ||
cleos -u https://jungle.eosio.cr --wallet-url http://localhost:8888 wallet list | ||
``` | ||
|
||
If the wallet is present but locked, then execute the following command: | ||
|
||
```bash | ||
cleos -u https://jungle.eosio.cr --wallet-url http://localhost:8888 wallet unlock -n eosmechanics | ||
``` | ||
|
||
Finally, we will import an EOSIO key for reading information about statistics of the block | ||
producers called eosmechanics (Ask the admins about the key): | ||
|
||
```bash | ||
cleos -u https://jungle.eosio.cr --wallet-url http://localhost:8888 wallet import -n eosmechanics | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* eslint camelcase: 0 */ | ||
import React, { useEffect, useState } from 'react' | ||
import PropTypes from 'prop-types' | ||
import TextField from '@material-ui/core/TextField' | ||
|
||
import getAuthoritTemplate from '../utils/get-authority-template' | ||
|
||
const LacchainNewAccount = ({ | ||
value, | ||
onChange, | ||
label, | ||
variant, | ||
className, | ||
...props | ||
}) => { | ||
const [internalValue, setInternalValue] = useState() | ||
|
||
const handleOnFieldChange = (event) => { | ||
onChange({ | ||
target: { | ||
value: getAuthoritTemplate(event.target.value) | ||
} | ||
}) | ||
} | ||
|
||
useEffect(() => { | ||
if (!value) { | ||
return | ||
} | ||
|
||
try { | ||
setInternalValue(value?.keys[0]?.key || '') | ||
} catch (error) {} | ||
}, [value]) | ||
|
||
return ( | ||
<TextField | ||
{...props} | ||
className={className} | ||
value={internalValue || ''} | ||
onChange={handleOnFieldChange} | ||
label={label} | ||
variant={variant} | ||
/> | ||
) | ||
} | ||
|
||
LacchainNewAccount.propTypes = { | ||
value: PropTypes.any, | ||
onChange: PropTypes.func, | ||
label: PropTypes.string, | ||
variant: PropTypes.string, | ||
className: PropTypes.string | ||
} | ||
|
||
export default LacchainNewAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { eosConfig } from '../config' | ||
|
||
const getAuthoritTemplate = (key) => { | ||
if (eosConfig.networkName === 'lacchain') { | ||
return { | ||
threshold: 2, | ||
keys: [{ weight: 1, key: key || '' }], | ||
accounts: [ | ||
{ weight: 1, permission: { actor: 'writer', permission: 'access' } } | ||
], | ||
waits: [] | ||
} | ||
} | ||
|
||
return { | ||
threshold: 1, | ||
keys: [{ weight: 1, key: key || '' }], | ||
accounts: [], | ||
waits: [] | ||
} | ||
} | ||
|
||
export default getAuthoritTemplate |
Oops, something went wrong.