From 6e0095f7a40cba4b3ab6e64952360ee9c2dbfbf2 Mon Sep 17 00:00:00 2001 From: lanhaoxiang Date: Fri, 15 May 2020 19:12:48 +0800 Subject: [PATCH] fix: fix can not update and claim staking after last update --- app/components/Modal/StakingClaimModal.jsx | 2 +- app/components/Modal/StakingCreateModal.jsx | 2 +- app/components/Modal/StakingUpdateModal.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/Modal/StakingClaimModal.jsx b/app/components/Modal/StakingClaimModal.jsx index a1e9550..36ae982 100644 --- a/app/components/Modal/StakingClaimModal.jsx +++ b/app/components/Modal/StakingClaimModal.jsx @@ -124,7 +124,7 @@ class StakingClaimModal extends React.Component { (item) => item !== null && item.get("name") === trustNodeName ); this.setState({ - trustNodeId: trustNode[0].get("id") + trustNodeId: trustNode.get(0).get("id") }); } else { this.setState({ diff --git a/app/components/Modal/StakingCreateModal.jsx b/app/components/Modal/StakingCreateModal.jsx index 3b75555..26a3060 100644 --- a/app/components/Modal/StakingCreateModal.jsx +++ b/app/components/Modal/StakingCreateModal.jsx @@ -153,7 +153,7 @@ class StakingCreateModal extends React.Component { AccountActions.createStaking( currentProgramID, this.state.ownerId, - ChainStore.getWitnessById(this.state.trustNodeId).get("id"), + ChainStore.getWitnessById(this.state.trustNode.get("id")).get("id"), amount * precision, currentProgram.weight, currentProgram.staking_days diff --git a/app/components/Modal/StakingUpdateModal.jsx b/app/components/Modal/StakingUpdateModal.jsx index 69a7314..06ac6ec 100644 --- a/app/components/Modal/StakingUpdateModal.jsx +++ b/app/components/Modal/StakingUpdateModal.jsx @@ -122,7 +122,7 @@ class StakingUpdateModal extends React.Component { if (trustNodeName) { let trustNode = this.state.trustNodes.filter(item => item !== null && item.get("name") === trustNodeName); this.setState({ - trustNodeId: trustNode[0].get("id") + trustNodeId: trustNode.get(0).get("id") }); } else { this.setState({