Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion programs/drift/src/instructions/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4754,7 +4754,8 @@ pub struct Withdraw<'info> {
pub drift_signer: AccountInfo<'info>,
#[account(
mut,
constraint = &spot_market_vault.mint.eq(&user_token_account.mint)
constraint = &spot_market_vault.mint.eq(&user_token_account.mint),
constraint = user_token_account.key() != spot_market_vault.key() @ ErrorCode::InvalidSpotPosition
)]
pub user_token_account: Box<InterfaceAccount<'info, TokenAccount>>,
pub token_program: Interface<'info, TokenInterface>,
Expand Down
5 changes: 2 additions & 3 deletions sdk/src/constants/spotMarkets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ export const DevnetSpotMarkets: SpotMarketConfig[] = [
symbol: 'USDC',
marketIndex: 0,
poolId: 0,
oracle: new PublicKey('9VCioxmni2gDLv11qufWzT3RDERhQE4iY5Gf7NTfYyAV'),
oracleSource: OracleSource.PYTH_LAZER_STABLE_COIN,
oracle: new PublicKey('En8hkHLkRe9d9DraYmBTrus518BvmVH448YcvmrFM6Ce'),
oracleSource: OracleSource.PYTH_STABLE_COIN_PULL,
mint: new PublicKey('8zGuJQqwhZafTah7Uc7Z4tXRnguqkn5KLFAP8oV6PHe2'),
precision: new BN(10).pow(SIX),
precisionExp: SIX,
pythFeedId:
'0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a',
pythLazerId: 7,
},
{
symbol: 'SOL',
Expand Down