Skip to content

Commit d8f6052

Browse files
committed
fix: avoid unbound gas estimate data
1 parent 2927146 commit d8f6052

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/mpp/methods/tempo/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ async def _build_tempo_transfer(
212212

213213
resolved_rpc = rpc_url or self.rpc_url
214214

215+
gas_estimate_data: str | None = None
216+
215217
if splits:
216218
from mpp.methods.tempo.intents import get_transfers
217219
from mpp.methods.tempo.schemas import Split as SplitModel
@@ -264,7 +266,7 @@ async def _build_tempo_transfer(
264266
resolved_rpc, nonce_address, currency, c.data.hex()
265267
)
266268
gas_limit = max(gas_limit, total_estimated + 5_000 * len(calls_tuple))
267-
else:
269+
elif gas_estimate_data is not None:
268270
estimated = await estimate_gas(
269271
resolved_rpc, nonce_address, currency, gas_estimate_data
270272
)

0 commit comments

Comments
 (0)