Skip to content

Commit

Permalink
Merge pull request igneous-labs#49 from igneous-labs/feat/amm-key-sta…
Browse files Browse the repository at this point in the history
…ble-ordering

pubkey ordering
  • Loading branch information
billythedummy authored Feb 8, 2024
2 parents fe77bf0 + 986276d commit e2ac26c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/src/pda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ pub fn stake_pool_pair_amm_key_seeds<'seeds>(
pool1: &'seeds Pubkey,
pool2: &'seeds Pubkey,
) -> [&'seeds [u8]; 2] {
[pool1.as_ref(), pool2.as_ref()]
if pool1 < pool2 {
[pool1.as_ref(), pool2.as_ref()]
} else {
[pool2.as_ref(), pool1.as_ref()]
}
}

pub fn bridge_stake_seeds<'seeds>(
Expand Down

0 comments on commit e2ac26c

Please sign in to comment.