From 24f144cafaa5ddad5a184620614dadd4464c8288 Mon Sep 17 00:00:00 2001 From: sosaucily Date: Mon, 15 Jul 2024 11:52:10 +0200 Subject: [PATCH] remove unused imports, refactor var def to better place --- contracts/DLCManager.sol | 2 +- test/DLCManager.test.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/contracts/DLCManager.sol b/contracts/DLCManager.sol index 5015ef8..a8ff004 100644 --- a/contracts/DLCManager.sol +++ b/contracts/DLCManager.sol @@ -340,6 +340,7 @@ contract DLCManager is // During a withdrawal, a burn should have already happened revert UnderCollateralized(newValueLocked, dlc.valueMinted); } + uint256 amountToMint = newValueLocked - dlc.valueMinted; uint256 amountToLockDiff; if (newValueLocked > dlc.valueLocked) { @@ -354,7 +355,6 @@ contract DLCManager is revert DepositTooSmall(amountToLockDiff, minimumDeposit); } - uint256 amountToMint = newValueLocked - dlc.valueMinted; dlc.fundingTxId = btcTxId; dlc.wdTxId = ""; dlc.status = DLCLink.DLCStatus.FUNDED; diff --git a/test/DLCManager.test.js b/test/DLCManager.test.js index 45b5272..8f65cc7 100644 --- a/test/DLCManager.test.js +++ b/test/DLCManager.test.js @@ -4,8 +4,6 @@ const hardhat = require('hardhat'); const crypto = require('crypto'); const { getSignatures, setSigners } = require('./utils'); -const { get } = require('http'); -const exp = require('constants'); async function whitelistAddress(dlcManager, user) { await dlcManager.whitelistAddress(user.address);