Skip to content

Commit

Permalink
fix: fix can not update and claim staking after last update
Browse files Browse the repository at this point in the history
  • Loading branch information
lanhaoxiang committed May 15, 2020
1 parent cbbc95c commit 6e0095f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/Modal/StakingClaimModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion app/components/Modal/StakingCreateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/components/Modal/StakingUpdateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6e0095f

Please sign in to comment.