Skip to content

Commit e67a227

Browse files
committed
fix: avoid unbound gas estimate data
1 parent ecca9ff commit e67a227

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
@@ -219,6 +219,8 @@ async def _build_tempo_transfer(
219219

220220
resolved_rpc = rpc_url or self.rpc_url
221221

222+
gas_estimate_data: str | None = None
223+
222224
if splits:
223225
from mpp.methods.tempo.intents import get_transfers
224226
from mpp.methods.tempo.schemas import Split as SplitModel
@@ -271,7 +273,7 @@ async def _build_tempo_transfer(
271273
resolved_rpc, nonce_address, currency, c.data.hex()
272274
)
273275
gas_limit = max(gas_limit, total_estimated + 5_000 * len(calls_tuple))
274-
else:
276+
elif gas_estimate_data is not None:
275277
estimated = await estimate_gas(
276278
resolved_rpc, nonce_address, currency, gas_estimate_data
277279
)

0 commit comments

Comments
 (0)