Skip to content

Commit

Permalink
Merge branch 'main' into add-upgrader-contract-to-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cgorenflo authored Jan 9, 2025
2 parents e8c2953 + 0f819f7 commit c4035f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stellar/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,15 @@ const getAmplifierVerifiers = async (config, chainAxelarId) => {
);
const signers = Object.values(verifierSet.signers);

// Include pubKey for sorting, sort based on pubKey, then remove pubKey after sorting.
const weightedSigners = signers
.map((signer) => ({
signer: Address.account(Buffer.from(arrayify(`0x${signer.pub_key.ed25519}`))).toString(),
weight: Number(signer.weight),
pubKey: signer.pub_key.ed25519,
}))
.sort((a, b) => a.signer.localeCompare(b.signer));
.sort((a, b) => a.pubKey.localeCompare(b.pubKey))
.map(({ signer, weight }) => ({ signer, weight }));

return {
signers: weightedSigners,
Expand Down

0 comments on commit c4035f0

Please sign in to comment.