From deb5f5a715a133f5566f357faebc9c636bc5f368 Mon Sep 17 00:00:00 2001 From: dylan Date: Mon, 19 Feb 2024 14:37:37 +0800 Subject: [PATCH] update dex lock args setup --- contracts/dex-lock/src/helper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/dex-lock/src/helper.rs b/contracts/dex-lock/src/helper.rs index a4735ee..319fa2d 100644 --- a/contracts/dex-lock/src/helper.rs +++ b/contracts/dex-lock/src/helper.rs @@ -33,7 +33,9 @@ impl DexArgs { let owner_lock = Script::from_slice(&data[..owner_size]).map_err(|_e| Error::Encoding)?; let setup = data[owner_size]; - if setup != 0 { + // If the third bit of setup is 0, it means FT(0b0000_0000), otherwise it means + // NFT(0b0000_0100) + if setup != 0 && setup != 4 { return Err(Error::DexSetupInvalid); } let total_value =