Skip to content

Commit

Permalink
update node quit warm msg and fix ui bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sulingxiao committed Sep 6, 2021
2 parents bb70fb2 + 8b4e8fb commit 2cb53d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Node/NodeStake/NodeStakeInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
padding-top:20px;
}
.detail-item {
margin-bottom: 15px;
margin-bottom: 10px;
}
.detail-item p {
margin-bottom: 5px;
Expand Down Expand Up @@ -188,6 +188,7 @@
@ok="handleWalletSignOK"
@cancel="handleWalletSignCancel">
<div v-if="stakeWallet.key">
<p v-if="isQuit">{{$t('nodeStake.quitWarmMsg')}}</p><br>
<p>{{$t('nodeStake.enterWalletPass')}}</p>
<a-input class="input" v-model="walletPassword" :plaecholder="$t('nodeStake.password')" type="password"></a-input>
</div>
Expand Down Expand Up @@ -242,6 +243,8 @@ export default {
redeemPosVisible: false,
isQuit: false,
};
},
mounted() {
Expand Down Expand Up @@ -304,6 +307,7 @@ export default {
handleWalletSignCancel() {
this.tx = "";
this.walletPassModal = false;
this.isQuit = false;
this.walletPassword = '';
},
handleWalletSignOK() {
Expand Down Expand Up @@ -386,6 +390,7 @@ export default {
net === "TEST_NET" ? ONT_PASS_NODE : ONT_PASS_NODE_PRD;
axios.post(ontPassNode + ONT_PASS_URL.DelegateSendTx, body).then(res => {
this.walletPassModal = false;
this.isQuit = false;
this.walletPassword = ''
this.tx = ''
this.$store.dispatch("hideLoadingModals");
Expand All @@ -408,6 +413,7 @@ export default {
restClient.sendRawTransaction(tx.serialize()).then(res => {
console.log(res)
this.isDelegateSendTx = true;
this.isQuit = false;
this.walletPassModal = false;
this.walletPassword = '';
this.$store.dispatch("hideLoadingModals");
Expand Down Expand Up @@ -481,6 +487,7 @@ export default {
const payer = userAddr;
const tx = GovernanceTxBuilder.makeQuitNodeTx(userAddr, peerPubkey, payer, GAS_PRICE, GAS_LIMIT)
this.tx = tx;
this.isQuit = true;
this.walletPassModal = true;
},
handleNewStake() {
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ export default {
signWithWallet: 'Sign with selected wallet',
enterOntidPass: 'Please enter the password of your ONT ID',
enterWalletPass: 'Please enter the password of the selected wallet',
quitWarmMsg: 'If you choose to quit the node, all the initial staked amount will be returned. The candidate node can get the staked amount returned after one cycle, and the consensus node can get it returned after two cycles. After quitting the node, if you want to run a node again, you have to sign up again.',
back: 'Back',
recall: 'Recall',
refund: 'Refund',
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export default {
signWithWallet: '使用钱包签名',
enterOntidPass: '请输入ONT ID的密码',
enterWalletPass: '请输入钱包的密码',
quitWarmMsg: '选择退出节点,则可退回所有初始质押。候选节点退出后一周期可以退回质押,共识节点需要两周期。退出节点后,如果想要再次运行节点,需要重新注册。',
back: '返回',
recall: '撤销',
refund: '退款',
Expand Down

0 comments on commit 2cb53d4

Please sign in to comment.