From a51c6270db74c4dd48da111c7b1aa9e2545131fb Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:43:02 +0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20swaps=20without=20`surcharge`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mappings/nfts/createSwap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappings/nfts/createSwap.ts b/src/mappings/nfts/createSwap.ts index 991bbda1..126bfd01 100644 --- a/src/mappings/nfts/createSwap.ts +++ b/src/mappings/nfts/createSwap.ts @@ -45,8 +45,8 @@ export async function handleCreateSwap(context: Context): Promise { final.desired = desired final.expiration = deadline final.price = event.price - if ('surcharge' in final) { - final.surcharge = event.surcharge + if (!offer) { + (final as Swap).surcharge = event.surcharge } final.status = final.blockNumber >= deadline ? TradeStatus.EXPIRED : TradeStatus.ACTIVE final.updatedAt = event.timestamp