Skip to content

Commit

Permalink
Merge pull request #392 from pshenmic/feat/aliases-fixik
Browse files Browse the repository at this point in the history
Aliases status fix
  • Loading branch information
pshenmic authored Dec 27, 2024
2 parents 34dbcd4 + ce8a492 commit 7b85eef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/api/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,11 @@ const getAliasStateByVote = (aliasInfo, alias, identifier) => {
}
}

const isLocked = base58.encode(
const bs58Identifier = base58.encode(
Buffer.from(aliasInfo.contestedState?.finishedVoteInfo?.wonByIdentityId ?? '', 'base64')
) !== identifier
)

if (isLocked) {
if (identifier !== bs58Identifier && bs58Identifier !== '') {
status = 'locked'
} else if (aliasInfo.contestedState?.finishedVoteInfo?.wonByIdentityId === undefined) {
status = 'pending'
Expand Down

0 comments on commit 7b85eef

Please sign in to comment.