Skip to content

Commit

Permalink
Post-cherry-pick minimal changes to allow the old UI to work against …
Browse files Browse the repository at this point in the history
…the new program
  • Loading branch information
dankelleher committed Mar 7, 2023
1 parent ecb5df1 commit 57b54c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 30 deletions.
17 changes: 0 additions & 17 deletions packages/client/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ export const Environment: Record<WalletAdapterNetwork, EnvironmentConfig> = {
holdingAccount: new PublicKey(
"dhcB568T3skiP2D9ujf4eAJEnW2gACaaA9BUCVbwbXD"
),
yieldControllerState: new PublicKey(
"77aJfgRudbv9gFfjRQw3tuYzgnjoDgs9jorVTmK7cv73"
),
yieldControllerState: new PublicKey(
"77aJfgRudbv9gFfjRQw3tuYzgnjoDgs9jorVTmK7cv73"
),
Expand All @@ -62,20 +59,6 @@ export const Environment: Record<WalletAdapterNetwork, EnvironmentConfig> = {
bsolMint: new PublicKey("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1"),
},
},
localnet: {
state: new PublicKey("28SkW4iD7UJc9zkxcq6yNb1MFX2hxqdJjxjZs67Jwr2b"),
holdingAccount: new PublicKey(
"dhcB568T3skiP2D9ujf4eAJEnW2gACaaA9BUCVbwbXD"
),
yieldControllerState: new PublicKey(
"77aJfgRudbv9gFfjRQw3tuYzgnjoDgs9jorVTmK7cv73"
),
percentageStakeToMarinade: 75,
blaze: {
pool: new PublicKey("azFVdHtAJN8BX3sbGAYkXvtdjdrT5U6rj9rovvUFos9"),
bsolMint: new PublicKey("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1"),
},
},
};

const ActiveEnvironment =
Expand Down
31 changes: 18 additions & 13 deletions packages/client/src/marinade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,25 @@ export const liquidUnstake = async (
marinadeProgram,
};

const { instruction: rebalanceInstruction } = await triggerRebalance(
config,
marinade,
marinadeState,
program,
stateAddress,
staker
);
// Disable triggerRebalance - this allows the old client (with minimal additional changes)
// to be used against the new program

return program.methods
.liquidUnstake(lamports)
.accounts(accounts)
.postInstructions([rebalanceInstruction])
.transaction();
// const { instruction: rebalanceInstruction } = await triggerRebalance(
// config,
// marinade,
// marinadeState,
// program,
// stateAddress,
// staker
// );

return (
program.methods
.liquidUnstake(lamports)
.accounts(accounts)
// .postInstructions([rebalanceInstruction])
.transaction()
);
};

export const orders = async (
Expand Down

0 comments on commit 57b54c4

Please sign in to comment.