diff options
author | twxia <passion804222@gmail.com> | 2019-01-09 18:36:18 +0800 |
---|---|---|
committer | twxia <passion804222@gmail.com> | 2019-01-09 18:36:18 +0800 |
commit | f19838ae66b6800d0a4420860a04d40f6772fe2a (patch) | |
tree | 9d204f0b9e2003fd4da727e6a3e910639a55a483 | |
parent | 52489c01ef7983f12c91a69b63676ed5841370a9 (diff) | |
download | dexon-lottery-f19838ae66b6800d0a4420860a04d40f6772fe2a.tar.gz dexon-lottery-f19838ae66b6800d0a4420860a04d40f6772fe2a.tar.zst dexon-lottery-f19838ae66b6800d0a4420860a04d40f6772fe2a.zip |
change dex to dxn
-rw-r--r-- | app/app/component/Candidates/CandidateProfile.tsx | 2 | ||||
-rw-r--r-- | app/app/component/Main/index.tsx | 2 | ||||
-rw-r--r-- | app/app/component/Refund/index.tsx | 4 | ||||
-rw-r--r-- | app/app/component/Sponsor/index.tsx | 4 | ||||
-rw-r--r-- | app/app/service/voteHandler/index.ts | 8 | ||||
-rw-r--r-- | truffle.js | 5 |
6 files changed, 12 insertions, 13 deletions
diff --git a/app/app/component/Candidates/CandidateProfile.tsx b/app/app/component/Candidates/CandidateProfile.tsx index e1300e4..8ea4d01 100644 --- a/app/app/component/Candidates/CandidateProfile.tsx +++ b/app/app/component/Candidates/CandidateProfile.tsx @@ -91,7 +91,7 @@ class CandidatesProfile extends React.Component<Props> { <Padding /> <StyledBtn onClick={() => { - const amount = prompt(`How much DEX do you want to sponsor candidate ${profile.name}?`); + const amount = prompt(`How much DXN do you want to sponsor candidate ${profile.name}?`); voteService.sponsorCandidate(id, amount); }} > diff --git a/app/app/component/Main/index.tsx b/app/app/component/Main/index.tsx index 1434837..296d48a 100644 --- a/app/app/component/Main/index.tsx +++ b/app/app/component/Main/index.tsx @@ -115,7 +115,7 @@ class Main extends React.Component { {(voteService.isVoting !== undefined) && ( (voteService.isVoting) ? <Keyword>Voting time!</Keyword> - : <><Keyword>Register now!</Keyword> Guarantee Deposit Fee: <Keyword>${voteService.guaranteeDepositInDex}</Keyword> DEX</> + : <><Keyword>Register now!</Keyword> Guarantee Deposit Fee: <Keyword>${voteService.guaranteeDepositInDxn}</Keyword> Dxn</> )} {!voteService.isVoting && ('')} </State> diff --git a/app/app/component/Refund/index.tsx b/app/app/component/Refund/index.tsx index 869af70..ff9c0ed 100644 --- a/app/app/component/Refund/index.tsx +++ b/app/app/component/Refund/index.tsx @@ -38,8 +38,8 @@ class RefundHistory extends React.Component { <Row key={key}> <Highlight>{it.name}</Highlight> received - <Highlight>{voteService.deiToDex(it.amount)}</Highlight> - DEX + <Highlight>{voteService.deiToDxn(it.amount)}</Highlight> + DXN </Row> ); })} diff --git a/app/app/component/Sponsor/index.tsx b/app/app/component/Sponsor/index.tsx index 0a38660..1e1663f 100644 --- a/app/app/component/Sponsor/index.tsx +++ b/app/app/component/Sponsor/index.tsx @@ -34,8 +34,8 @@ class Sponsor extends React.Component { <Row key={key}> <Highlight>{it.name}</Highlight> received - <Highlight>{voteService.deiToDex(it.amount)}</Highlight> - DEX + <Highlight>{voteService.deiToDxn(it.amount)}</Highlight> + DXN from <Highlight>{this.processId(it.sponsor)}</Highlight> </Row> ); diff --git a/app/app/service/voteHandler/index.ts b/app/app/service/voteHandler/index.ts index 3a91526..f52bff4 100644 --- a/app/app/service/voteHandler/index.ts +++ b/app/app/service/voteHandler/index.ts @@ -71,7 +71,7 @@ class VoteHandler { }, 200); - @computed public get guaranteeDepositInDex() { + @computed public get guaranteeDepositInDxn() { return this.guaranteedDeposit && this.web3.utils.fromWei(this.guaranteedDeposit); } @@ -126,11 +126,11 @@ class VoteHandler { this.writeContract('register', [name], this.guaranteedDeposit); } public sponsorCandidate(address : string, amount : string) { - this.writeContract('sponsor', [address], this.dexToDei(amount)); + this.writeContract('sponsor', [address], this.dxnToDei(amount)); } - public deiToDex = (amount) => this.web3.utils.fromWei(amount); - public dexToDei = (amount) => this.web3.utils.toWei(amount); + public deiToDxn = (amount) => this.web3.utils.fromWei(amount); + public dxnToDei = (amount) => this.web3.utils.toWei(amount); private writeContract = async ( method : string, params : Array<any>, value? : string @@ -26,10 +26,9 @@ module.exports = { network_id: "*" }, development: { - network_id: '*', + network_id: "*", host: "localhost", port: 8545, - gas: 4712388 - } + }, } }; |