From 59870142d10817ac2b11656b98f77b6b3070b566 Mon Sep 17 00:00:00 2001 From: cryptoDev222 Date: Wed, 25 Aug 2021 12:54:44 -0500 Subject: [PATCH] refactor: fix small issues --- contracts/mainnet/connectors/uniswapStaker/main.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/mainnet/connectors/uniswapStaker/main.sol b/contracts/mainnet/connectors/uniswapStaker/main.sol index 72872a5e..b33e0734 100644 --- a/contracts/mainnet/connectors/uniswapStaker/main.sol +++ b/contracts/mainnet/connectors/uniswapStaker/main.sol @@ -90,6 +90,7 @@ abstract contract UniswapResolver is Helpers, Events { payable returns (string memory _eventName, bytes memory _eventParam) { + if (_tokenId == 0) _tokenId = _getLastNftId(address(this)); address poolAddr = getPoolAddress(_tokenId); IUniswapV3Pool pool = IUniswapV3Pool(poolAddr); @@ -127,6 +128,7 @@ abstract contract UniswapResolver is Helpers, Events { payable returns (string memory _eventName, bytes memory _eventParam) { + if (_tokenId == 0) _tokenId = _getLastNftId(address(this)); address poolAddr = getPoolAddress(_tokenId); IUniswapV3Pool pool = IUniswapV3Pool(poolAddr); @@ -189,6 +191,7 @@ abstract contract UniswapResolver is Helpers, Events { payable returns (string memory _eventName, bytes memory _eventParam) { + if (_tokenId == 0) _tokenId = _getLastNftId(address(this)); address poolAddr = getPoolAddress(_tokenId); IUniswapV3Pool pool = IUniswapV3Pool(poolAddr); @@ -210,5 +213,5 @@ abstract contract UniswapResolver is Helpers, Events { } contract ConnectV2UniswapV3Staker is UniswapResolver { - string public constant name = "UniswapStaker-v1"; + string public constant name = "Uniswap-V3-Staker-v1"; }