I am currently working on a snap to integrate with XRPL. However, I have a problem when I want to get data from rippled server.
This is the URL that I am calling: POST https://s.altnet.rippletest.net:51234
This is my payload
{
"method": "account_info",
"params": [
{
"account": "rDtBYnfg4ehGdYKg98GbxPK63w2rWzYUpT",
"ledger_index": "current",
}
]
}
I always get error saying Failed to fetch
I am doing a call like this:
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
redirect: 'follow',
body: JSON.stringify(payload),
});
And there are my initial permissions from snap manifest:
"initialPermissions": {
"snap_confirm": {},
"snap_manageState": {},
"endowment:network-access": {}
},
I am always getting following error:
{
"code": -32603,
"message": "Failed to fetch",
"data": {
"originalError": {}
}
}