Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substrate accounts management #293

Merged
merged 43 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d13508b
chore: Squashed old branch
maciejhirsz Jul 23, 2019
106a47f
feat: expose blake2s hash function
maciejhirsz Jul 23, 2019
bbaeb3c
fix(): network selection
Tbaut Jul 29, 2019
af2c36a
fix(): backward compatible
Tbaut Jul 30, 2019
a9c36ae
fix(): Mock for a sparta account, add prefixes for substrate
Tbaut Jul 30, 2019
62943a4
fix(): address map for substrate accounts
Tbaut Jul 30, 2019
7c0b8d3
fix: Duplicate function names in iOS
maciejhirsz Jul 31, 2019
44c91f7
Merge branch 'master' into mh-sr25519
maciejhirsz Jul 31, 2019
bfa084e
Merge branch 'master' into mh-sr25519
maciejhirsz Aug 1, 2019
0c331d3
feat: Expose `substrateAddress` in native.js
maciejhirsz Aug 1, 2019
8b651d1
fix: merge master
Tbaut Aug 5, 2019
121b44e
fix: use genesisHash and Address
Tbaut Aug 5, 2019
66840f7
Merge branch 'master' into tbaut-substrate-accounts
Tbaut Aug 6, 2019
be0d887
fix: new account creation with mock
Tbaut Aug 7, 2019
918b9de
fix: advanced derived path field for new account
Tbaut Aug 7, 2019
6c47c72
fix: use react hooks in AccountIcon
Tbaut Aug 7, 2019
89f462e
fix: fix address and nits
Tbaut Aug 7, 2019
6ef950f
fix: fix genesis in QR
Tbaut Aug 7, 2019
3e1b4fd
fix: genesisHash as string
Tbaut Aug 7, 2019
f841700
fix: use real accounts and mnemonic
Tbaut Aug 7, 2019
3c78763
fix: unneeded hexToAscii
Tbaut Aug 12, 2019
5276807
feat: sr25519 signing
maciejhirsz Aug 12, 2019
afab547
fix: put current account in the state
Tbaut Aug 13, 2019
2bd5cab
feat: Complete SURI derivation
maciejhirsz Aug 14, 2019
f126ac4
fix: use genesisHash
Tbaut Aug 14, 2019
da9e9be
Merge remote-tracking branch 'origin/mh-sr25519' into tbaut-substrate…
Tbaut Aug 14, 2019
69fceb7
fix: use substrateAddress
Tbaut Aug 14, 2019
fa6fd52
fix: recover
Tbaut Aug 14, 2019
3e36b8c
fix: recover derivation
Tbaut Aug 14, 2019
f1ca0e9
fix: refactor advanced (derivation path) field
Tbaut Aug 15, 2019
61db6fe
fix: derivation path validity + refactor
Tbaut Aug 15, 2019
7e62d0f
fix: display derivation path and link to check pasword
Tbaut Aug 15, 2019
f40b733
fix: derivation for new accounts
Tbaut Aug 15, 2019
9b53a01
fix: verify derivation pw
Tbaut Aug 16, 2019
2f3dfbf
fix: lock when saving accounts
Tbaut Aug 19, 2019
6a61ee4
fix: lock when unmounting backup view
Tbaut Aug 19, 2019
8a36e7e
fix: name wasn't save properly in securestore
Tbaut Aug 19, 2019
28eadd5
Merge branch 'master' into tbaut-substrate-accounts
Tbaut Aug 19, 2019
8f40aeb
fix: comment out Polkadot and add testnet
Tbaut Aug 19, 2019
4e81753
fix: bug ethereum new account and duplicated functions
Tbaut Aug 20, 2019
7ae517b
fix: stray comment
Tbaut Aug 20, 2019
507fb3a
fix: derive path
Tbaut Aug 20, 2019
b2dec85
fix: seed validation
Tbaut Aug 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const EthereumNetworkKeys = Object.freeze({

// genesisHash is used as Network key for Substrate networks
export const SubstrateNetworkKeys = Object.freeze({
// POLKADOT: '123',
KUSAMA: '456',
pmespresso marked this conversation as resolved.
Show resolved Hide resolved
POLKADOT_TEST: 's42', // needs a dummy genesis different than any other id (Eth chain id included)
// POLKADOT: '123',
// POLKADOT_TEST: 's42', // needs a dummy genesis different than any other id (Eth chain id included)
});

const substrateNetworkBase = {
Expand All @@ -29,12 +29,12 @@ const substrateNetworkBase = {
prefix: 2,
title: 'Kusama'
},
[SubstrateNetworkKeys.POLKADOT_TEST]: {
color: '#ff8c00',
genesisHash: SubstrateNetworkKeys.POLKADOT_TEST,
prefix: 42,
title: 'Polkadot Testnet'
},
// [SubstrateNetworkKeys.POLKADOT_TEST]: {
// color: '#ff8c00',
// genesisHash: SubstrateNetworkKeys.POLKADOT_TEST,
// prefix: 42,
// title: 'Polkadot Testnet'
// },
// [SubstrateNetworkKeys.POLKADOT]: {
// color: '#e6007a',
// genesisHash: SubstrateNetworkKeys.POLKADOT,
Expand Down
3 changes: 2 additions & 1 deletion src/screens/AccountRecover.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class AccountRecoverView extends React.Component {
);
}}
ref={this._seed}
valid={validateSeed(seedPhrase, validBip39Seed).valid}
valid={validateSeed(seedPhrase, validBip39Seed).valid || (isSubstrate && address)}
onChangeText={seedPhrase => {
this.debouncedAddressGeneration(seedPhrase, derivationPath, derivationPassword);
this.setState({ seedPhrase });
Expand All @@ -184,6 +184,7 @@ class AccountRecoverView extends React.Component {
/>
<Button
buttonStyles={{ marginBottom: 40 }}
disabled={isSubstrate && !address}
title="Next Step"
onPress={() => {
const validation = validateSeed(
Expand Down