fix warnings
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
#![allow(ambiguous_glob_reexports)]
|
||||||
|
|
||||||
pub mod cancel;
|
pub mod cancel;
|
||||||
pub mod complete;
|
pub mod complete;
|
||||||
pub mod create_escrow;
|
pub mod create_escrow;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![allow(clippy::diverging_sub_expression)]
|
||||||
|
|
||||||
pub mod constants;
|
pub mod constants;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod instructions;
|
pub mod instructions;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
pub use anchor_lang::prelude::Pubkey;
|
||||||
|
pub use descro::{EscrowState, Winner as EscrowWinner};
|
||||||
use {
|
use {
|
||||||
anchor_lang::{
|
anchor_lang::{
|
||||||
solana_program::{instruction::Instruction, system_program},
|
solana_program::{instruction::Instruction, system_program},
|
||||||
@@ -10,8 +12,6 @@ use {
|
|||||||
solana_signer::Signer,
|
solana_signer::Signer,
|
||||||
solana_transaction::versioned::VersionedTransaction,
|
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 AMOUNT: u64 = 1_000_000_000;
|
||||||
pub const ESCROW_ID: u64 = 1;
|
pub const ESCROW_ID: u64 = 1;
|
||||||
@@ -82,7 +82,12 @@ pub fn ix_create_escrow(
|
|||||||
let vault = vault_pda(&escrow);
|
let vault = vault_pda(&escrow);
|
||||||
Instruction::new_with_bytes(
|
Instruction::new_with_bytes(
|
||||||
descro::id(),
|
descro::id(),
|
||||||
&descro::instruction::CreateEscrow { amount, dispute_resolver, escrow_id }.data(),
|
&descro::instruction::CreateEscrow {
|
||||||
|
amount,
|
||||||
|
dispute_resolver,
|
||||||
|
escrow_id,
|
||||||
|
}
|
||||||
|
.data(),
|
||||||
descro::accounts::CreateEscrow {
|
descro::accounts::CreateEscrow {
|
||||||
seller: *seller,
|
seller: *seller,
|
||||||
buyer: *buyer,
|
buyer: *buyer,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![allow(ambiguous_glob_reexports)]
|
||||||
|
|
||||||
pub mod register;
|
pub mod register;
|
||||||
pub mod update;
|
pub mod update;
|
||||||
pub mod update_stats;
|
pub mod update_stats;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![allow(clippy::diverging_sub_expression)]
|
||||||
|
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod instructions;
|
pub mod instructions;
|
||||||
pub mod state;
|
pub mod state;
|
||||||
@@ -12,8 +14,7 @@ pub use state::*;
|
|||||||
declare_id!("GwUPAKs3HHzCpj8uhet4NAnxk9GWNwfrYbpihu5DyFp");
|
declare_id!("GwUPAKs3HHzCpj8uhet4NAnxk9GWNwfrYbpihu5DyFp");
|
||||||
|
|
||||||
/// Escrow Program ID — only its PDA may call update_stats.
|
/// Escrow Program ID — only its PDA may call update_stats.
|
||||||
pub const ESCROW_PROGRAM_ID: Pubkey =
|
pub const ESCROW_PROGRAM_ID: Pubkey = pubkey!("DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3");
|
||||||
pubkey!("DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3");
|
|
||||||
|
|
||||||
#[program]
|
#[program]
|
||||||
pub mod descro_ext_resolvers {
|
pub mod descro_ext_resolvers {
|
||||||
@@ -28,7 +29,15 @@ pub mod descro_ext_resolvers {
|
|||||||
fee_recipient: Pubkey,
|
fee_recipient: Pubkey,
|
||||||
metadata_uri: String,
|
metadata_uri: String,
|
||||||
) -> Result<()> {
|
) -> 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(
|
pub fn update_resolver(
|
||||||
|
|||||||
Reference in New Issue
Block a user