Skip to content

Commit

Permalink
Halcyon Halcyon
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenDelahoy committed Sep 21, 2018
1 parent a73a163 commit fccd495
Show file tree
Hide file tree
Showing 33 changed files with 600 additions and 364 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ We have a lot of exciting developments coming up, and we'll have our timeline ad

For more information about HYCON, visit the website at [https://hycon.io](https://hycon.io) or read the whitepaper in one of the following languages:

- [English](https://hycon.io/doc/whitepaper1.2.2_en.pdf)
- [Korean / 한국어](https://hycon.io/doc/whitepaper.1.2.2_kr.pdf)
- [Japanese / 日本語](https://hycon.io/doc/whitepaper_jp.pdf)
- [Chinese / 中文](https://hycon.io/doc/whitepaper_cn.pdf)
- [English](https://hycon.io/wp-content/uploads/2018/08/whitepaper1.2.2_en.pdf)
- [Korean / 한국어](https://hycon.io/wp-content/uploads/2018/08/whitepaper.1.2.2_kr.pdf)
- [Japanese / 日本語](https://hycon.io/wp-content/uploads/2018/08/whitepaper_jp.pdf)
- [Chinese / 中文](https://hycon.io/wp-content/uploads/2018/08/whitepaper_cn.pdf)

### Getting Releases

Expand Down
8 changes: 4 additions & 4 deletions data/clientDist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/clientDist/bundle.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion data/clientDist/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 62 additions & 62 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/api/client/addressInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { TxLine } from "./txLine"
interface IAddressProps {
rest: IRest
hash: string
name?: string
selectedAccount?: string
walletType?: string
}
Expand Down Expand Up @@ -40,7 +41,7 @@ export class AddressInfo extends React.Component<IAddressProps, IAddressView> {
index: 1,
minedBlocks: [],
minerIndex: 1,
name: "",
name: props.name ? props.name : "",
pendings: [],
redirectTxView: false,
rest: props.rest,
Expand Down Expand Up @@ -73,6 +74,9 @@ export class AddressInfo extends React.Component<IAddressProps, IAddressView> {
return < div ></div >
}
if (this.state.redirectTxView) {
if (this.state.walletType === "hdwallet") {
return <Redirect to={`/maketransactionHDWallet/hdwallet/${this.state.name}/${this.state.hash}/${this.state.accountIndex}`} />
}
return <Redirect to={`/maketransactionAddress/${this.state.walletType}/${this.state.hash}/${this.state.accountIndex}`} />
}
let count = 0
Expand Down Expand Up @@ -109,7 +113,7 @@ export class AddressInfo extends React.Component<IAddressProps, IAddressView> {
{this.state.pendings.map((tx: ITxProp) => {
return (
<div key={count++}>
<TxLine tx={tx} rest={this.state.rest} index={this.state.accountIndex} address={this.state.hash} walletType={this.state.walletType} />
<TxLine tx={tx} rest={this.state.rest} index={this.state.accountIndex} address={this.state.hash} walletType={this.state.walletType} name={this.state.name} />
<div>
{tx.from === this.state.hash ? (
<button className="mdl-button mdl-js-button mdl-button--raised mdl-button--accent txAmtBtn">
Expand Down
6 changes: 6 additions & 0 deletions src/api/client/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const routes: RouteConfig[] = [
{ exact: true, path: "/minerView" },
{ exact: true, path: "/hardwareWallet/:walletType" },
{ exact: true, path: "/address/:hash/:walletType/:selectedAccount" },
{ exact: true, path: "/address/:hash/:walletType/:name/:selectedAccount" },
// { exact: true, path: "/peer/:hash" },
]

Expand All @@ -68,6 +69,7 @@ export class App extends React.Component<{ rest: IRest }, any> {
public minerView: ({ match }: RouteComponentProps<{ name: string }>) => JSX.Element
public hardwareWalletView: ({ match }: RouteComponentProps<{ walletType: string }>) => JSX.Element
public hardwareAddressView: ({ match }: RouteComponentProps<{ walletType: string, hash: string, selectedAccount: string }>) => JSX.Element
public hdwalletAddressView: ({ match }: RouteComponentProps<{ walletType: string, hash: string, name: string, selectedAccount: string }>) => JSX.Element
public notFound: boolean

constructor(props: any) {
Expand Down Expand Up @@ -139,6 +141,9 @@ export class App extends React.Component<{ rest: IRest }, any> {
this.hardwareAddressView = ({ match }: RouteComponentProps<{ walletType: string, hash: string, selectedAccount: string }>) => (
<AddressInfo hash={match.params.hash} walletType={match.params.walletType} rest={this.rest} selectedAccount={match.params.selectedAccount} />
)
this.hdwalletAddressView = ({ match }: RouteComponentProps<{ walletType: string, hash: string, name: string, selectedAccount: string }>) => (
<AddressInfo hash={match.params.hash} walletType={match.params.walletType} rest={this.rest} name={match.params.name} selectedAccount={match.params.selectedAccount} />
)
}
public render() {
return (
Expand Down Expand Up @@ -184,6 +189,7 @@ export class App extends React.Component<{ rest: IRest }, any> {
<Route exact path="/minerView" component={this.minerView} />
<Route exact path="/hardwareWallet/:walletType" component={this.hardwareWalletView} />
<Route exact path="/address/:hash/:walletType/:selectedAccount" component={this.hardwareAddressView} />
<Route exact path="/address/:hash/:walletType/:name/:selectedAccount" component={this.hdwalletAddressView} />
</Switch>
</div>
</main>
Expand Down
10 changes: 9 additions & 1 deletion src/api/client/blockexplorer.css
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,21 @@ table {
-o-animation: blinkRed 0.5s infinite;
animation: blinkRed 0.5s infinite;
}
.led-orange {
width: 10px;
height: 10px;
background-color: #FA0;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #582f00 0 -1px 9px, rgba(225, 125, 0, 0.5) 0 2px 12px;
}


.led-red {
width: 10px;
height: 10px;
background-color: #F00;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 12px;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(200, 0, 0, 0.5) 0 2px 12px;
}

.textRed{
Expand Down
4 changes: 3 additions & 1 deletion src/api/client/makeTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ export class MakeTransaction extends React.Component<IMakeTransactionProps, any>
public render() {
let walletIndex = 0
if (this.state.redirect) {
if (this.state.walletType === "local" || this.state.walletType === "hdwallet") {
if (this.state.walletType === "local") {
return <Redirect to={`/wallet/detail/${this.state.name}`} />
} else if (this.state.walletType === "hdwallet") {
return <Redirect to={`/address/${this.state.fromAddress}/hdwallet/${this.state.name}/${this.state.selectedAccount}`} />
} else {
return <Redirect to={`/address/${this.state.fromAddress}/${this.state.walletType}/${this.state.selectedAccount}`} />
}
Expand Down
13 changes: 12 additions & 1 deletion src/api/client/minerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,15 @@ export class MinerView extends React.Component<IMinerViewProps, IMinerView> {
this.state.rest.setLoading(true)
this.state.rest.getWalletList().then((data: { walletList: IHyconWallet[], length: number }) => {
if (this.mounted) {
this.setState({ wallets: data.walletList, dialogOpen: true })
this.setState({ wallets: update(this.state.wallets, { $splice: [[0, this.state.wallets.length]] }) })
for (const wallet of data.walletList) {
if (wallet.address !== undefined && wallet.address !== "") {
this.setState({
wallets: update(this.state.wallets, { $push: [wallet] }),
})
}
}
this.setState({ dialogOpen: true })
}
this.state.rest.setLoading(false)
})
Expand Down Expand Up @@ -190,6 +198,9 @@ export class MinerView extends React.Component<IMinerViewProps, IMinerView> {
} else {
this.state.rest.setMinerCount(this.state.tmpCpuCount).then(() => {
this.setState({ cpuMinerCount: this.state.tmpCpuCount, adjustCpuMiner: false })
this.state.rest.getMiner().then((data: IMiner) => {
this.setState({ miner: data, minerAddress: data.currentMinerAddress, cpuMinerCount: data.cpuCount })
})
})
}
}
Expand Down
Loading

0 comments on commit fccd495

Please sign in to comment.