@@ -71,12 +71,13 @@ def weth_address(self) -> ChecksumAddress:
71
71
"""
72
72
:return: Wrapped ether checksummed address
73
73
"""
74
- if self .network == EthereumNetwork .MAINNET :
75
- return ChecksumAddress ("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" )
76
- elif self .network == EthereumNetwork .RINKEBY :
77
- return ChecksumAddress ("0xc778417E063141139Fce010982780140Aa0cD5Ab" )
78
- else : # XDAI
79
- return ChecksumAddress ("0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1" )
74
+ if self .network == EthereumNetwork .GNOSIS : # WXDAI
75
+ return ChecksumAddress ("0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d" )
76
+ if self .network == EthereumNetwork .GOERLI : # Goerli WETH9
77
+ return ChecksumAddress ("0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6" )
78
+
79
+ # Mainnet WETH9
80
+ return ChecksumAddress ("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" )
80
81
81
82
def get_quote (
82
83
self , order : Order , from_address : ChecksumAddress
@@ -129,9 +130,10 @@ def place_order(
129
130
from_address = Account .from_key (private_key ).address
130
131
if not order .feeAmount :
131
132
fee_amount = self .get_fee (order , from_address )
132
- if "errorType" in fee_amount : # ErrorResponse
133
+ if isinstance (fee_amount , int ):
134
+ order .feeAmount = fee_amount
135
+ elif "errorType" in fee_amount : # ErrorResponse
133
136
return fee_amount
134
- order .feeAmount = fee_amount
135
137
136
138
signable_hash = eip712_encode_hash (
137
139
order .get_eip712_structured_data (
0 commit comments