mirror of
				https://github.com/Instadapp/dsa-connectors.git
				synced 2024-07-29 22:37:00 +00:00 
			
		
		
		
	Fix: contracts names + polygon native token
This commit is contained in:
		
							parent
							
								
									09312ae247
								
							
						
					
					
						commit
						ab33acf097
					
				|  | @ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| contract ConnectV2ConnextOptimism is ConnextResolver { | ||||
| contract ConnectV2ConnextArbitrum is ConnextResolver { | ||||
| 	string public constant name = "Connext-v1.0"; | ||||
| } | ||||
|  |  | |||
|  | @ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| contract ConnectV2ConnextOptimism is ConnextResolver { | ||||
| contract ConnectV2Connext is ConnextResolver { | ||||
| 	string public constant name = "Connext-v1.0"; | ||||
| } | ||||
|  |  | |||
|  | @ -30,14 +30,14 @@ abstract contract ConnextResolver is Helpers { | |||
| 	{ | ||||
| 		uint256 _amount = getUint(getId, params.amount); | ||||
| 		TokenInterface tokenContract = TokenInterface(params.asset); | ||||
| 		bool isNative = params.asset == ethAddr; | ||||
| 		bool isNative = params.asset == maticAddr; | ||||
| 
 | ||||
| 		if (isNative) { | ||||
| 			_amount = _amount == uint256(-1) ? address(this).balance : _amount; | ||||
| 			params.asset = wethAddr; | ||||
| 			params.asset = wmaticAddr; | ||||
| 			tokenContract = TokenInterface(params.asset); | ||||
| 			// xcall does not take native asset, must wrap  | ||||
| 			convertEthToWeth(true, tokenContract, _amount); | ||||
| 			convertMaticToWmatic(true, tokenContract, _amount); | ||||
| 
 | ||||
| 		} else { | ||||
| 			_amount = _amount == uint256(-1) ? tokenContract.balanceOf(address(this)) : _amount; | ||||
|  | @ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| contract ConnectV2ConnextOptimism is ConnextResolver { | ||||
| contract ConnectV2ConnextPolygon is ConnextResolver { | ||||
| 	string public constant name = "Connext-v1.0"; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Shriya Tyagi
						Shriya Tyagi