Wallet: fix Trust Wallet chain-add + personal_sign ("invalid method parameters")

- wallet_addEthereumChain omits blockExplorerUrls when the config explorer is
  empty (rehearsal has none) — an empty-string URL made Trust Wallet reject the
  add with "invalid method parameters", blocking new users from adding the chain.
- personal_sign now hex-encodes the SIWE message (Trust Wallet requires hex;
  MetaMask took raw). Signed bytes are identical so server recovery is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-07 06:58:12 -05:00
parent 41d3293486
commit 85a6ac5bb0
3 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -634,7 +634,7 @@
</div>
</div>
<script src="/assets/common.js?v=20260907e"></script>
<script src="/assets/wallet.js?v=20260907e"></script>
<script src="/assets/wallet.js?v=20260907f"></script>
<script src="/assets/my.js?v=20260907e"></script>
<script src="/assets/chat.js?v=20260907e"></script>
</body>