Fix buy crash on wallets that return a numeric chainId
The chain guard did cur.toLowerCase() on the eth_chainId result. Per EIP-695 that's a hex string, but some wallets (Orlando's) return a number, so cur.toLowerCase was undefined -> "cur.toLowerCase is not a function" aborted the purchase. Compare chain ids numerically via a chainNum() normalizer (handles hex string, decimal string, and number) in both the sendTx guard and ensureChain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -695,7 +695,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260908c"></script>
|
||||
<script src="/assets/wallet.js?v=20260908q"></script>
|
||||
<script src="/assets/wallet.js?v=20260908r"></script>
|
||||
<script src="/assets/my.js?v=20260908l"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user