aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortwxia <passion804222@gmail.com>2019-01-09 18:36:18 +0800
committertwxia <passion804222@gmail.com>2019-01-09 18:36:18 +0800
commitf19838ae66b6800d0a4420860a04d40f6772fe2a (patch)
tree9d204f0b9e2003fd4da727e6a3e910639a55a483
parent52489c01ef7983f12c91a69b63676ed5841370a9 (diff)
downloaddexon-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.tsx2
-rw-r--r--app/app/component/Main/index.tsx2
-rw-r--r--app/app/component/Refund/index.tsx4
-rw-r--r--app/app/component/Sponsor/index.tsx4
-rw-r--r--app/app/service/voteHandler/index.ts8
-rw-r--r--truffle.js5
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
diff --git a/truffle.js b/truffle.js
index 1515e7f..f32c4d6 100644
--- a/truffle.js
+++ b/truffle.js
@@ -26,10 +26,9 @@ module.exports = {
network_id: "*"
},
development: {
- network_id: '*',
+ network_id: "*",
host: "localhost",
port: 8545,
- gas: 4712388
- }
+ },
}
};