You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli-sdk): add pre-flight balance check and on-chain tx confirmation (#42)
* fix(cli-sdk): add pre-flight balance check and on-chain tx confirmation to swidge
1. Pre-flight balance check: after the LI.FI quote resolves the token
address, check balanceOf (ERC-20) or eth_getBalance (native) and
error early with "Insufficient balance: have X, need Y" instead of
sending a doomed tx to the wallet.
2. On-chain tx confirmation: poll eth_getTransactionReceipt after both
approval and bridge transactions. Only report "confirmed" after
receipt.status === 0x1. Throw on revert instead of silently
reporting success.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli-sdk): add process-level unhandledRejection handler for clean error output
Catches any relay/WC errors that escape the per-request handler and
prints a clean error message instead of dumping minified source.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add pre-flight balance check before swidge (errors early with "Insufficient balance: have X, need Y") and on-chain tx receipt confirmation (polls eth_getTransactionReceipt instead of treating submission as confirmation)
0 commit comments