fix: bigint
This commit is contained in:
parent
a32ebd6bd2
commit
6dea7bb417
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@waku/react-native",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.11",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@waku/react-native",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base-64": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@waku/react-native",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"description": "Waku React Native",
|
||||
"author": "Status Research & Development GMBH",
|
||||
"authors": [
|
||||
|
|
|
@ -166,7 +166,10 @@ export function relayPublish(
|
|||
timeoutMs: Number = 0
|
||||
): Promise<string> {
|
||||
return new Promise<string>(async (resolve, reject) => {
|
||||
let messageJSON = JSON.stringify(msg);
|
||||
let messageJSON = JSON.stringify(msg).replace(
|
||||
/"timestamp":"([0-9]+)"/,
|
||||
`"timestamp":$1`
|
||||
);
|
||||
let response = JSON.parse(
|
||||
await ReactNative.relayPublish(messageJSON, pubsubTopic, timeoutMs)
|
||||
);
|
||||
|
@ -516,7 +519,10 @@ export function lightpushPublish(
|
|||
timeoutMs: Number = 0
|
||||
): Promise<string> {
|
||||
return new Promise<string>(async (resolve, reject) => {
|
||||
let messageJSON = JSON.stringify(msg);
|
||||
let messageJSON = JSON.stringify(msg).replace(
|
||||
/"timestamp":"([0-9]+)"/,
|
||||
`"timestamp":$1`
|
||||
);
|
||||
let response = JSON.parse(
|
||||
await ReactNative.lightpushPublish(
|
||||
messageJSON,
|
||||
|
@ -722,7 +728,9 @@ export function storeQuery(
|
|||
? bigInt(query.endTime.valueOf()).multiply(OneMillion).toString(10)
|
||||
: 0,
|
||||
pagingOptions: query.pagingOptions,
|
||||
});
|
||||
})
|
||||
.replace(/"startTime":"([0-9]+)"/, `"startTime":$1`)
|
||||
.replace(/"endTime":"([0-9]+)"/, `"endTime":$1`);
|
||||
let response = JSON.parse(
|
||||
await ReactNative.storeQuery(queryJSON, peerID, timeoutMs)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue