Skip to content

Commit

Permalink
Merge pull request #107 from MickWang/master
Browse files Browse the repository at this point in the history
update node list;fix some ui issues
  • Loading branch information
MickWang authored Oct 11, 2018
2 parents b38a6ee + f6e16da commit 3e60f26
Show file tree
Hide file tree
Showing 16 changed files with 300 additions and 91 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "owallet",
"productName": "OWallet",
"homepage": "http://ont.io",
"version": "v0.8.9",
"version": "v0.9.0",
"author": "Ontology Foundation Ltd. <[email protected]>",
"description": "OWallet is a comprehensive Ontology desktop wallet",
"license": "Apache-2.0",
Expand Down
10 changes: 7 additions & 3 deletions src/common/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export default {
rank: 'Rank',
name: 'Name',
currentStake: 'Current total stake',
process: 'Remaining stake',
process: 'Stake progress',
changes: 'Changes',
userParticipate: 'Only proceed if you want to participate in stake authorization!',
nodeName: 'Node name',
Expand Down Expand Up @@ -483,7 +483,7 @@ export default {
totalStakeAmount: 'Total Authorization Amount',
blocks: 'Blocks',
proportionNextRound: "Reward proportion for others",
proportionNextRoundTip: 'This is the portion of rewards received the node has chosen to share with users who have authorized stakes with them.',
proportionNextRoundTip: 'This is the portion of rewards received the node has chosen to share with users who have authorized stakes with them in the next consensus round.',
nodeAndUser: 'Node / User',
authorizeTip: `A user’s authorized stake amount for a node is made up of any authorized ONT from this consensus round and any authorized ONT from a previous consensus round.
If authorized ONT from this consensus round is cancelled it will be cancelled immediately and be shown as redeemable ONT.
Expand All @@ -505,7 +505,11 @@ Within their 50% share each consensus node will receive their share according to
stakeWalletAddress: 'Stake wallet address',
lastUpdate: 'Last update time',
walletRewardTip: 'This is all the reward of your wallet in current round.',
switchMainnet: 'Please switch to MainNet.'
switchMainnet: 'Please switch to MainNet.',
consensusNode: 'Consensus node',
candidateNode: 'Candidate consensus node',
lockedONT: 'Your locked ONT is your authorized stake amount currently held in a smart contract. Once it is available to be withdrawn, it will appear as redeemable ONT.',
unboundONG: 'This is the unbound ONG amount of your authorized ONT stake.'
},
exchange: {
exchange: 'Exchange',
Expand Down
6 changes: 5 additions & 1 deletion src/common/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ export default {
stakeWalletAddress: '质押钱包地址',
lastUpdate: '上次更新时间',
walletRewardTip: '这是当前周期内您的钱包所有的授权质押收益',
switchMainnet: '请切换到主网。'
switchMainnet: '请切换到主网。',
consensusNode: '共识节点',
candidateNode: '候选节点',
lockedONT: '当前锁定的ONT是由智能合约暂时持有的用户授权质押数额。锁定期满后,会在可提取的ONT中显示并可提取',
unboundONG: '这是用户授权质押的ONT所解绑的ONG。'
},
exchange: {
exchange: 'Exchange',
Expand Down
28 changes: 14 additions & 14 deletions src/core/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,32 @@ export const SWAP_ADDRESS = 'AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM'

export const CON_NODE = [
{
name: 'Dubhe',
pk: '02bcdd278a27e4969d48de95d6b7b086b65b8d1d4ff6509e7a9eab364a76115af7'
"name": "Dubhe",
"pk": "02bcdd278a27e4969d48de95d6b7b086b65b8d1d4ff6509e7a9eab364a76115af7"
},
{
name: 'Merak',
pk: '0251f06bc247b1da94ec7d9fe25f5f913cedaecba8524140353b826cf9b1cbd9f4'
"name": "Merak",
"pk": "0251f06bc247b1da94ec7d9fe25f5f913cedaecba8524140353b826cf9b1cbd9f4"
},
{
name: 'Phecda',
pk: '022e911fb5a20b4b2e4f917f10eb92f27d17cad16b916bce8fd2dd8c11ac2878c0'
"name": "Phecda",
"pk": "022e911fb5a20b4b2e4f917f10eb92f27d17cad16b916bce8fd2dd8c11ac2878c0"
},
{
name: 'Megrez',
pk: '0253719ac66d7cafa1fe49a64f73bd864a346da92d908c19577a003a8a4160b7fa'
"name": "Megrez",
"pk": "0253719ac66d7cafa1fe49a64f73bd864a346da92d908c19577a003a8a4160b7fa"
},
{
name: 'Alioth',
pk: '022bf80145bd448d993abffa237f4cd06d9df13eaad37afce5cb71d80c47b03feb'
"name": "Alioth",
"pk": "022bf80145bd448d993abffa237f4cd06d9df13eaad37afce5cb71d80c47b03feb"
},
{
name: 'Mixar',
pk: '02765d98bb092962734e365bd436bdc80c5b5991dcf22b28dbb02d3b3cf74d6444'
"name": "Mixar",
"pk": "02765d98bb092962734e365bd436bdc80c5b5991dcf22b28dbb02d3b3cf74d6444"
},
{
name: 'Alkaid',
pk: '03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53'
"name": "Alkaid",
"pk": "03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53"
}
]

Expand Down
162 changes: 162 additions & 0 deletions src/core/nodes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
[
{
"name": "Dubhe",
"pk": "02bcdd278a27e4969d48de95d6b7b086b65b8d1d4ff6509e7a9eab364a76115af7",
"isConsensus": true
},
{
"name": "Merak",
"pk": "0251f06bc247b1da94ec7d9fe25f5f913cedaecba8524140353b826cf9b1cbd9f4",
"isConsensus": true
},
{
"name": "Phecda",
"pk": "022e911fb5a20b4b2e4f917f10eb92f27d17cad16b916bce8fd2dd8c11ac2878c0",
"isConsensus": true
},
{
"name": "Megrez",
"pk": "0253719ac66d7cafa1fe49a64f73bd864a346da92d908c19577a003a8a4160b7fa",
"isConsensus": true
},
{
"name": "Alioth",
"pk": "022bf80145bd448d993abffa237f4cd06d9df13eaad37afce5cb71d80c47b03feb",
"isConsensus": true
},
{
"name": "Mixar",
"pk": "02765d98bb092962734e365bd436bdc80c5b5991dcf22b28dbb02d3b3cf74d6444",
"isConsensus": true
},
{
"name": "Alkaid",
"pk": "03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53",
"isConsensus": true
},
{
"name": "Jumple Foundation",
"pk": "038602b1b03637be0de5305639756db44da31b5241acde4cff86f2a181f76d9fee",
"isConsensus": false
},
{
"name": "Hashed",
"pk": "03ee9fd0557e56dab1eb7d9720e749d581fb0ebfd0a15f31bc973834c36e0b9c46",
"isConsensus": false
},
{
"name": "Infinity Stones",
"pk": "0244c959ed3bcd0f96da35d4c615bcf99c8a2d7ddb875142fa8f731bbf681eee44",
"isConsensus": false
},
{
"name": "ONEROOT Foundation",
"pk": "025222dc49b168d47c12a77aa9ae3370f6319cfe97eab4f92b0e7f61597ebcc158",
"isConsensus": false
},
{
"name": "Martview",
"pk": "03a0cf8494ef9901c7a78df98abb9a8a245961da77c157cb3f31e67db0325f070c",
"isConsensus": false
},
{
"name": "DAD",
"pk": "02872b863b9bee7a1bd15692330af591603bc3db3444272c00e51997a74ac1756c",
"isConsensus": false
},
{
"name": "SunStar",
"pk": "02584b9aa8d871017ff7d19fb8c7c934eeffbdc6b7de5501855e11c65ffbb67774",
"isConsensus": false
},
{
"name": "G&Q TECH LIMITED",
"pk": "036f29e06e57f36432ad6bb89dbfd8f81d12e42e7a1a5d454c322ac8e3b94a4bf0",
"isConsensus": false
},
{
"name": "InWeCrypto",
"pk": "026dd0e7b95843181e0f986ecb292f32a2165261ca62d097bba8c54195d527f73f",
"isConsensus": false
},
{
"name": "gf.network",
"pk": "031554b64b4145fb33e83f686081e9148188c2176aaf6a55c874b38fd093e1bc0c",
"isConsensus": false
},
{
"name": "J&D TECH LIMITED",
"pk": "033ad721e2443998bc036710b0415ac6ae67e2d490307ba9f4f8f41af62726f34d",
"isConsensus": false
},
{
"name": "ont-huobipool",
"pk": "03c793b05687137803952cb0327aaed8cfb1a7199badd23a34b2fa8417f614faae",
"isConsensus": false
},
{
"name": "Accomplice",
"pk": "034a7069c3ba649a762191b62e29992f6b4ba4b670d6502259e15597199cea17d2",
"isConsensus": false
},
{
"name": "Matrix Partners China",
"pk": "035e470667371300f87090c3410cfbb24a4b40c6955574ed7dd053644f94922632",
"isConsensus": false
},
{
"name": "CloudDesk",
"pk": "0349a0e3e018d275a09bb6d4237cb95ee199cf38c81c9a1228ecb72f2c6ab8fdfe",
"isConsensus": false
},
{
"name": "Collider",
"pk": "02da86115d1c2450eb5780da3ffd21c0e68c9094f990f3c7c489e0c5d50b72ec43",
"isConsensus": false
},
{
"name": "CertiK",
"pk": "02b9000043dba3a3c91185a963babbb975daf73ebfc4f07ab7cb80dc7172145c3d",
"isConsensus": false
},
{
"name": "Avocado",
"pk": "034b87ac6f457e44a33284fcd60d2b2f6ea2a508e553462bba5bf526a0dd285300",
"isConsensus": false
},
{
"name": "Ontology Universe",
"pk": "02a0ca41d2544cdea25fe98102157ea9ca051ac1e565e43847c3f006c9caedc297",
"isConsensus": false
},
{
"name": "ONTLabo",
"pk": "037acf1bb88200138b44f5d645d0e0c063043addc30db0102eea508db2585f9171",
"isConsensus": false
},
{
"name": "Blockchain Global Limited",
"pk": "03e96d1b80bfa4895763d640e6278c3e31323ba395cb32c9c578d54374e092e134",
"isConsensus": false
},
{
"name": "HZF Web",
"pk": "0292c695bb734f849d17ee65977d048ff8a9efae8317ee40589a944eb2bbcd9998",
"isConsensus": false
},
{
"name": "Crypto World",
"pk": "0280d0bfde8e6b73e48c15ee062728f890e41f125339d5f36ed8a29430d41c6d57",
"isConsensus": false
},
{
"name": "Points Foundation",
"pk": "035960c0a6b07532e149fd8e92d19f4670732735df5c0a419a9d79c1a06df8fc23",
"isConsensus": false
},
{
"name": "Trio Bravo",
"pk": "0287fe995c6f27ad0c1a7640f9cc6c2537ed47126cc430e738d96f0390583ac2d2",
"isConsensus": false
}
]
4 changes: 2 additions & 2 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
text-shadow: none !important;
}
.ant-spin-dot i {
/* .ant-spin-dot i {
background-color: white !important;
}
} */
.v-validate-span-errors {
color: red;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/CommonWallet/CommonRedeem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {
if (res.Error === 0) {
this.$message.success(this.$t('common.transSentSuccess'))
} else if (res.Error === -1) {
const err = res.Result || this.$t('common.ongNoEnough')
const err = res.Result.indexOf('cover gas cost') > -1 ? this.$t('common.ongNoEnough') : res.Result
this.$message.error(err)
return;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/CommonWallet/SendConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default {
if (res.Error === 0) {
this.$message.success(this.$t('common.transSentSuccess'))
} else if (res.Error === -1) {
const err = res.Result || this.$t('common.ongNoEnough')
const err = res.Result.indexOf('cover gas cost') > -1 ? this.$t('common.ongNoEnough') : res.Result
this.$message.error(err)
return;
} else {
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@ const ONG_GOVERNANCE_CONTRACT = 'AFmseVrdL9f9oyCzZefL9tG6UbviEH9ugK'
const txlist = response.data.Result.TxnList;
const completed = []
for(const t of txlist) {
if(t.TransferList.length === 1) {
continue;
}
// if(t.TransferList.length === 1 && t.TransferList[0].ToAddress === ONG_GOVERNANCE_CONTRACT) {
// continue;
// }
const tx = t.TransferList[0]
const asset = tx.AssetName === 'ont' ? 'ONT' : 'ONG'
let amount = asset === 'ONT' ? parseInt(tx.Amount) : Number(tx.Amount).toFixed(9);
Expand Down Expand Up @@ -595,8 +595,9 @@ const ONG_GOVERNANCE_CONTRACT = 'AFmseVrdL9f9oyCzZefL9tG6UbviEH9ugK'
},
refresh() {
this.$store.dispatch('showLoadingModals')
const that = this
setTimeout(() => {
this.$store.dispatch('hideLoadingModals')
that.$store.dispatch('hideLoadingModals')
}, 500)
this.getBalance();
this.getTransactions();
Expand Down
28 changes: 20 additions & 8 deletions src/renderer/components/Node/NodeAuthorize/AuthorizationMgmt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
width:100%;
}
.redeem-item span:first-child {
width:130px;
width:150px;
display: inline-block;
}
.redeem-item button {
Expand Down Expand Up @@ -112,16 +112,28 @@
<a-button type="default" class="cancel-btn" @click="cancelAuthorization">{{$t('nodeMgmt.cancelAuthorization')}}</a-button>
<div class="redeem-ont">
<p class="redeem-item">
<span class="font-medium-black label">{{$t('nodeMgmt.locked')}}: </span>
<span class="font-medium-black label">
<a-tooltip placement="right" :title="$t('nodeMgmt.lockedONT')">
<a-icon type="info-circle-o" />
</a-tooltip>
{{$t('nodeMgmt.locked')}}:
</span>
<span class="font-medium">{{authorizationInfo.locked}} ONT</span>
</p>
<p class="redeem-item">
<span class="font-medium-black label">{{$t('nodeMgmt.claimable')}}: </span>
<span class="font-medium-black label">
{{$t('nodeMgmt.claimable')}}:
</span>
<span class="font-medium">{{authorizationInfo.claimable}} ONT</span>
<a-button type="primary" class="redeem-btn" @click="redeemOnt">{{$t('nodeMgmt.redeem')}}</a-button>
</p>
<p class="redeem-item">
<span class="font-medium-black label">{{$t('nodeMgmt.unboundOng')}}: </span>
<span class="font-medium-black label">
<a-tooltip placement="right" :title="$t('nodeMgmt.unboundONG')">
<a-icon type="info-circle-o" />
</a-tooltip>
{{$t('nodeMgmt.unboundOng')}}:
</span>
<span class="font-medium">{{unboundOng}} ONG</span>
<a-button type="primary" class="redeem-btn" @click="redeemOng">{{$t('nodeMgmt.redeem')}}</a-button>
</p>
Expand Down Expand Up @@ -181,7 +193,7 @@ import Breadcrumb from '../../Breadcrumb'
import {mapState} from 'vuex'
import SignSendTx from '../../Common/SignSendTx'
import {GAS_PRICE, GAS_LIMIT} from '../../../../core/consts'
import {Crypto, GovernanceTxBuilder} from 'ontology-ts-sdk'
import {Crypto, GovernanceTxBuilder, utils} from 'ontology-ts-sdk'
import numeral from 'numeral'
import {varifyPositiveInt} from '../../../../core/utils.js'
Expand Down Expand Up @@ -284,9 +296,9 @@ export default {
nodePk: pk,
nodeName: this.current_node.name,
}
this.$store.dispatch('recordStakeHistory', {tx: this.tx, record}).then(res => {
this.tx = '';
})
const txHash = utils.reverseHex(this.tx.getHash());
this.tx = '';
this.$store.dispatch('recordStakeHistory', {txHash, record})
},
validateCancelAmount() {
if(!this.cancelAmount || !varifyPositiveInt(this.cancelAmount)) {
Expand Down
Loading

0 comments on commit 3e60f26

Please sign in to comment.