fix warnings

This commit is contained in:
thesn10
2026-05-19 10:28:26 +02:00
parent 5bfde3ec6e
commit 18d577aa49
5 changed files with 26 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
#![allow(ambiguous_glob_reexports)]
pub mod cancel;
pub mod complete;
pub mod create_escrow;

View File

@@ -1,3 +1,5 @@
#![allow(clippy::diverging_sub_expression)]
pub mod constants;
pub mod error;
pub mod instructions;

View File

@@ -1,3 +1,5 @@
pub use anchor_lang::prelude::Pubkey;
pub use descro::{EscrowState, Winner as EscrowWinner};
use {
anchor_lang::{
solana_program::{instruction::Instruction, system_program},
@@ -10,8 +12,6 @@ use {
solana_signer::Signer,
solana_transaction::versioned::VersionedTransaction,
};
pub use anchor_lang::prelude::Pubkey;
pub use descro::{EscrowState, Winner as EscrowWinner};
pub const AMOUNT: u64 = 1_000_000_000;
pub const ESCROW_ID: u64 = 1;
@@ -82,7 +82,12 @@ pub fn ix_create_escrow(
let vault = vault_pda(&escrow);
Instruction::new_with_bytes(
descro::id(),
&descro::instruction::CreateEscrow { amount, dispute_resolver, escrow_id }.data(),
&descro::instruction::CreateEscrow {
amount,
dispute_resolver,
escrow_id,
}
.data(),
descro::accounts::CreateEscrow {
seller: *seller,
buyer: *buyer,

View File

@@ -1,3 +1,5 @@
#![allow(ambiguous_glob_reexports)]
pub mod register;
pub mod update;
pub mod update_stats;

View File

@@ -1,3 +1,5 @@
#![allow(clippy::diverging_sub_expression)]
pub mod error;
pub mod instructions;
pub mod state;
@@ -12,8 +14,7 @@ pub use state::*;
declare_id!("GwUPAKs3HHzCpj8uhet4NAnxk9GWNwfrYbpihu5DyFp");
/// Escrow Program ID — only its PDA may call update_stats.
pub const ESCROW_PROGRAM_ID: Pubkey =
pubkey!("DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3");
pub const ESCROW_PROGRAM_ID: Pubkey = pubkey!("DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3");
#[program]
pub mod descro_ext_resolvers {
@@ -28,7 +29,15 @@ pub mod descro_ext_resolvers {
fee_recipient: Pubkey,
metadata_uri: String,
) -> Result<()> {
register::handler(ctx, resolver_type, name, description, fee_bps, fee_recipient, metadata_uri)
register::handler(
ctx,
resolver_type,
name,
description,
fee_bps,
fee_recipient,
metadata_uri,
)
}
pub fn update_resolver(