Stellar-Wallets-Kit icon indicating copy to clipboard operation
Stellar-Wallets-Kit copied to clipboard

Wallet Connect not working

Open mihaic195 opened this issue 1 year ago • 0 comments

I successfully connected to a Dapp using Wallet Connect through Fireblocks console. Nothing happens on the Fireblocks/Wallet Connect side when I try to submit a transaction. The same transaction works just fine using Freighter Wallet.

I can see that upon submission, an attestation request is made to WC, for which I get a plaintext OK response.

This is an example:

Request URL:
https://verify.walletconnect.com/attestation
Request Method:
POST
Status Code:
200 OK
Remote Address:
[2606:4700::6812:1a2e]:443
Referrer Policy:
strict-origin-when-cross-origin
Request Payload:
{"attestationId":"xxxxx","origin":"http://localhost:3000"}
Response:
OK

Testing on an EVM chain, the WC verification endpoint has different parameters and returns a different application/JSON response, which triggers the transaction to be signed on the WC/Fireblocks side. It works just fine in this case.

This is what the request looks like in this case:

Request URL:
https://verify.walletconnect.org/v2/attestation?projectId=yyyyyy
Request Method:
POST
Status Code:
200 OK
Remote Address:
[2606:4700::6812:14fa]:443
Referrer Policy:
strict-origin-when-cross-origin
access-control-allow-origin:
*
cf-ray:
8cfd7e88b8905b30-VIE
content-encoding:
br
content-type:
application/json; charset=UTF-8
date:
Wed, 09 Oct 2024 09:55:18 GMT
server:
cloudflare
vary:
Accept-Encoding
Request Payload:
{"id":"xxxxx","decryptedId":"zzzzz"}
Response:
{
    "srcdoc": "<script>window.parent.postMessage(JSON.stringify({type:\"verify_attestation\",attestation:\"<RETURNS HERE AN ENCODED JWT TOKEN>\"}),\"*\")</script>"
}

I'm assuming that in the case of Stellar, nothing happens because something is not right with the attestation.

mihaic195 avatar Oct 09 '24 10:10 mihaic195