Skip to content

Commit e5783e8

Browse files
committed
Fix: update NFT uri
1 parent e4394ad commit e5783e8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

programs/amm/src/instructions/open_position.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ pub fn open_position<'a, 'b, 'c: 'info, 'info>(
586586
token_program,
587587
system_program,
588588
rent,
589+
personal_position.key(),
589590
with_matedata,
590591
)?;
591592

@@ -920,9 +921,6 @@ pub fn update_position(
920921
Ok((flipped_lower, flipped_upper))
921922
}
922923

923-
const METADATA_URI: &str =
924-
"https://cloudflare-ipfs.com/ipfs/QmbzJafuKY3B4t25eq9zdKZMgXiMeW4jHLzf6KE6ZmHWn1/02.json";
925-
926924
fn create_nft_with_metadata<'info>(
927925
payer: &Signer<'info>,
928926
pool_state_loader: &AccountLoader<'info, PoolState>,
@@ -933,6 +931,7 @@ fn create_nft_with_metadata<'info>(
933931
token_program: &Program<'info, Token>,
934932
system_program: &Program<'info, System>,
935933
rent: &Sysvar<'info, Rent>,
934+
personal_position_id: Pubkey,
936935
with_matedata: bool,
937936
) -> Result<()> {
938937
let pool_state = pool_state_loader.load()?;
@@ -960,7 +959,10 @@ fn create_nft_with_metadata<'info>(
960959
pool_state_loader.key(),
961960
String::from("Raydium Concentrated Liquidity"),
962961
String::from("RCL"),
963-
METADATA_URI.to_string(),
962+
format!(
963+
"https://dynamic-ipfs.raydium.io/clmm/position?id={}",
964+
personal_position_id.to_string()
965+
),
964966
Some(vec![Creator {
965967
address: pool_state_loader.key(),
966968
verified: true,

0 commit comments

Comments
 (0)