fix: storeQuery base64 decode

This commit is contained in:
Richard Ramos 2023-01-05 11:47:21 -04:00
parent a0990d17c2
commit 0c2ab3dd5e
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760
3 changed files with 8 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@waku/react-native",
"version": "0.0.11",
"version": "0.0.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@waku/react-native",
"version": "0.0.11",
"version": "0.0.12",
"license": "MIT",
"dependencies": {
"base-64": "^1.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@waku/react-native",
"version": "0.0.11",
"version": "0.0.12",
"description": "Waku React Native",
"author": "Status Research & Development GMBH",
"authors": [

View File

@ -738,6 +738,11 @@ export function storeQuery(
if (response.error) {
reject(response.error);
} else {
if(response.result.messages){
for(let i = 0; i < response.result.messages.length; i++){
response.result.messages[i].payload = new Uint8Array(decode(response.result.messages[i].payload ?? []).split('').map(c => c.charCodeAt(0)));
}
}
resolve(response.result);
}
});