refactor,format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
dd8086d8eb
commit
331bb7ebf0
|
@ -13,7 +13,7 @@ pub struct StubOracleCreate<'info> {
|
|||
|
||||
#[account(
|
||||
init,
|
||||
seeds = [group.key().as_ref(), b"StubOracle".as_ref(), token_mint.key().as_ref()],
|
||||
seeds = [group.key().as_ref(), b"StubOracle".as_ref(), mint.key().as_ref()],
|
||||
bump,
|
||||
payer = payer,
|
||||
space = 8 + std::mem::size_of::<StubOracle>(),
|
||||
|
@ -22,7 +22,7 @@ pub struct StubOracleCreate<'info> {
|
|||
|
||||
pub admin: Signer<'info>,
|
||||
|
||||
pub token_mint: Account<'info, Mint>,
|
||||
pub mint: Account<'info, Mint>,
|
||||
|
||||
#[account(mut)]
|
||||
pub payer: Signer<'info>,
|
||||
|
@ -33,7 +33,7 @@ pub struct StubOracleCreate<'info> {
|
|||
pub fn stub_oracle_create(ctx: Context<StubOracleCreate>, price: I80F48) -> Result<()> {
|
||||
let mut oracle = ctx.accounts.oracle.load_init()?;
|
||||
oracle.group = ctx.accounts.group.key();
|
||||
oracle.mint = ctx.accounts.token_mint.key();
|
||||
oracle.mint = ctx.accounts.mint.key();
|
||||
oracle.price = price;
|
||||
oracle.last_updated = Clock::get()?.unix_timestamp;
|
||||
|
||||
|
|
|
@ -926,7 +926,7 @@ impl<'keypair> ClientInstruction for StubOracleCreate<'keypair> {
|
|||
let accounts = Self::Accounts {
|
||||
group: self.group,
|
||||
oracle,
|
||||
token_mint: self.mint,
|
||||
mint: self.mint,
|
||||
admin: self.admin.pubkey(),
|
||||
payer: self.payer.pubkey(),
|
||||
system_program: System::id(),
|
||||
|
|
|
@ -403,7 +403,7 @@ export class MangoClient {
|
|||
.accounts({
|
||||
group: group.publicKey,
|
||||
admin: (this.program.provider as AnchorProvider).wallet.publicKey,
|
||||
tokenMint: mintPk,
|
||||
mint: mintPk,
|
||||
payer: (this.program.provider as AnchorProvider).wallet.publicKey,
|
||||
})
|
||||
.rpc();
|
||||
|
|
|
@ -950,7 +950,7 @@ export type MangoV4 = {
|
|||
"kind": "account",
|
||||
"type": "publicKey",
|
||||
"account": "Mint",
|
||||
"path": "token_mint"
|
||||
"path": "mint"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -961,7 +961,7 @@ export type MangoV4 = {
|
|||
"isSigner": true
|
||||
},
|
||||
{
|
||||
"name": "tokenMint",
|
||||
"name": "mint",
|
||||
"isMut": false,
|
||||
"isSigner": false
|
||||
},
|
||||
|
@ -5954,7 +5954,7 @@ export const IDL: MangoV4 = {
|
|||
"kind": "account",
|
||||
"type": "publicKey",
|
||||
"account": "Mint",
|
||||
"path": "token_mint"
|
||||
"path": "mint"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -5965,7 +5965,7 @@ export const IDL: MangoV4 = {
|
|||
"isSigner": true
|
||||
},
|
||||
{
|
||||
"name": "tokenMint",
|
||||
"name": "mint",
|
||||
"isMut": false,
|
||||
"isSigner": false
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue