Skip to content

Commit

Permalink
updated wallet utils
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyvoronov committed Jul 9, 2018
1 parent 2c5df84 commit e38c6c0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/assets/styles/containers/TokenListContainer.less
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
padding: 15px 25px;
}
}
td {
cursor: pointer;
}
input {
height: 40px;
font-family: @nrl-monospace;
Expand Down
3 changes: 2 additions & 1 deletion src/containers/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React, { Component } from 'react';
import ReactDOM from 'react';

// import { Provider } from 'react-redux';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import RoutesContainer from 'containers/RoutesContainer/RoutesContainer';
Expand All @@ -20,5 +22,4 @@ class App extends Component {
);
}
}

export default App;
27 changes: 22 additions & 5 deletions src/containers/TokenListContainer/TokenListContainer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import bip39 from 'bip39';
import { Row, Col, Input, Button, Layout } from 'antd';
import { confirmAlert } from 'react-confirm-alert';
Expand Down Expand Up @@ -112,6 +113,10 @@ class TokenListContainer extends PureComponent {
});
}

copyHashToClipboard = (hashValue) => {
console.log(hashValue)
}

render () {
return (
<div className="block dashboard">
Expand All @@ -133,6 +138,7 @@ class TokenListContainer extends PureComponent {
<CopyToClipboard text={this.state.mnemonic} onCopy={() => this.setState({copied: true})}>
<Button className="mnemonic_copy_btn">Copy to clipboard</Button>
</CopyToClipboard>

</Row>
<Row>
<div className="table_container">
Expand All @@ -150,10 +156,22 @@ class TokenListContainer extends PureComponent {
{
this.state.tokenList.map((token, index) => {
return (<tr key={index}>
<td>{token.name}</td>
<td><Input disabled={true} value={token.address} onClick={({target: {value}}) =>this.setState({mnemonic :value, copied: false})}/></td>
<td><Input disabled={true} value={token.privateKey} onClick={({target: {value}}) => this.setState({mnemonic :value, copied: false})}/></td>
<td><Input disabled={true} value={token.publicKey} onClick={({target: {value}}) => this.setState({mnemonic :value, copied: false})}/></td>
<td><pre>{token.name}</pre></td>
<td>
<CopyToClipboard text={token.address} onCopy={() => this.setState({copied: true})}>
<pre>{token.address}</pre>
</CopyToClipboard>
</td>
<td>
<CopyToClipboard text={token.privateKey} onCopy={() => this.setState({copied: true})}>
<pre>{token.privateKey}</pre>
</CopyToClipboard>
</td>
<td>
<CopyToClipboard text={token.publicKey} onCopy={() => this.setState({copied: true})}>
<pre>{token.publicKey}</pre>
</CopyToClipboard>
</td>
</tr>)
})
}
Expand All @@ -168,5 +186,4 @@ class TokenListContainer extends PureComponent {
);
}
}

export default TokenListContainer;
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ ReactDOM.render(
</BrowserRouter>,
document.getElementById('root')
);

registerServiceWorker();

0 comments on commit e38c6c0

Please sign in to comment.