Skip to content

stake: Improve collision errors #91

@lubej

Description

@lubej

Current implementation checks for diff between existing staked items and new ones. Add retry logic, so that it is more resilient.

Same goes for un-staking flow.

// This should work in 99% of cases!
const [diff] = undelegations.filter(
und =>
!prevUndelegations.some(prevUnd => {
return FormattingUtils.serializeObj(prevUnd) === FormattingUtils.serializeObj(und)
})
)

const [diff] = delegations.filter(
d =>
!prevDelegations.some(prevD => {
return FormattingUtils.serializeObj(prevD) === FormattingUtils.serializeObj(d)
})
)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions