Skip to content

Instantly share code, notes, and snippets.

View marcinwasowicz's full-sized avatar

marcinwasowicz

View GitHub Profile
@marcinwasowicz
marcinwasowicz / gist:047b0f1b00079562b2547ebe3a8c18ad
Created July 4, 2024 16:38
Test outbound notifications session creation
diff --git a/lib/handlers/db-ops-handler.react.js b/lib/handlers/db-ops-handler.react.js
index 6eba0272ff..184bf066a9 100644
--- a/lib/handlers/db-ops-handler.react.js
+++ b/lib/handlers/db-ops-handler.react.js
@@ -1,8 +1,10 @@
// @flow
import * as React from 'react';
+import uuid from 'uuid';
diff --git a/node_modules/expo-secure-store/android/build/.transforms/d9fe774a16b12ae369e854e0adff00db/results.bin b/node_modules/expo-secure-store/android/build/.transforms/d9fe774a16b12ae369e854e0adff00db/results.bin
new file mode 100644
index 0000000..0d259dd
--- /dev/null
+++ b/node_modules/expo-secure-store/android/build/.transforms/d9fe774a16b12ae369e854e0adff00db/results.bin
@@ -0,0 +1 @@
+o/classes
diff --git a/node_modules/expo-secure-store/android/build/.transforms/d9fe774a16b12ae369e854e0adff00db/transformed/classes/classes.dex b/node_modules/expo-secure-store/android/build/.transforms/d9fe774a16b12ae369e854e0adff00db/transformed/classes/classes.dex
new file mode 100644
index 0000000..d4b832b
diff --git a/lib/utils/services-utils.js b/lib/utils/services-utils.js
index 684f444314..c22609665e 100644
--- a/lib/utils/services-utils.js
+++ b/lib/utils/services-utils.js
@@ -7,7 +7,7 @@ import type { AuthMetadata } from '../shared/identity-client-context.js';
// If this is true then we're using the identity service for auth. After we
// auth, the identity service gives us a CSAT, which we can use to auth with
// other Comm services.
-const usingCommServicesAccessToken = false;
+const usingCommServicesAccessToken = true;
@marcinwasowicz
marcinwasowicz / gist:1af0a2958830fd9eb080e639779b1628
Created June 13, 2024 16:00
Hack keyserver code to use custom APNs notif types and constructors
diff --git a/keyserver/flow-typed/npm/@parse/node-apn_vx.x.x.js b/keyserver/flow-typed/npm/@parse/node-apn_vx.x.x.js
index d0408dee13..f17faf856a 100644
--- a/keyserver/flow-typed/npm/@parse/node-apn_vx.x.x.js
+++ b/keyserver/flow-typed/npm/@parse/node-apn_vx.x.x.js
@@ -18,6 +18,8 @@ declare module '@parse/node-apn' {
declare export class Notification {
constructor(): this;
length(): number;
+ headers:() => any,
+ compile: () => string,
diff --git a/lib/hooks/peer-list-hooks.js b/lib/hooks/peer-list-hooks.js
index e8f968c90f..2d4379d417 100644
--- a/lib/hooks/peer-list-hooks.js
+++ b/lib/hooks/peer-list-hooks.js
@@ -29,7 +29,7 @@ function useCreateInitialPeerList(): () => Promise<void> {
peersDeviceLists.usersSignedDeviceLists,
);
const usersPlatformDetails = peersDeviceLists.usersDevicesPlatformDetails;
-
+ console.log(usersPlatformDetails);
@marcinwasowicz
marcinwasowicz / gist:dfd0f0c213e662d9c91289a5ee083820
Created April 11, 2024 16:36
Test SIWE backup message generation.
diff --git a/native/profile/tunnelbroker-menu.react.js b/native/profile/tunnelbroker-menu.react.js
index 15522363a6..2a29a0a665 100644
--- a/native/profile/tunnelbroker-menu.react.js
+++ b/native/profile/tunnelbroker-menu.react.js
@@ -24,6 +24,7 @@ import type { ProfileNavigationProp } from './profile.react.js';
import Button from '../components/button.react.js';
import TextInput from '../components/text-input.react.js';
import { olmAPI } from '../crypto/olm-api.js';
+import { commCoreModule } from '../native-modules.js';
import type { NavigationRoute } from '../navigation/route-names.js';
@marcinwasowicz
marcinwasowicz / gist:deb80232dd533caaffa908fbf5050c8f
Created March 26, 2024 16:01
Enable notifs from multiple keyservers
diff --git a/keyserver/docker-compose.yml b/keyserver/docker-compose.yml
index b9a0528e8f..7e79cb454a 100644
--- a/keyserver/docker-compose.yml
+++ b/keyserver/docker-compose.yml
@@ -10,10 +10,13 @@ services:
- COMM_JSONCONFIG_secrets_alchemy=${COMM_JSONCONFIG_secrets_alchemy}
- COMM_JSONCONFIG_secrets_walletconnect=${COMM_JSONCONFIG_secrets_walletconnect}
- COMM_JSONCONFIG_secrets_geoip_license=${COMM_JSONCONFIG_secrets_geoip_license}
+ - COMM_JSONCONFIG_secrets_comm_apn_config=${COMM_JSONCONFIG_secrets_comm_apn_config}
image: commapp/node-keyserver:1.0
@marcinwasowicz
marcinwasowicz / gist:f65e5a223ed47485d37ecc7977e21523
Created March 20, 2024 14:22
Fix SWIE Message Validator on dev env
diff --git a/lib/utils/siwe-utils.js b/lib/utils/siwe-utils.js
index ec538c34b6..ef996a137c 100644
--- a/lib/utils/siwe-utils.js
+++ b/lib/utils/siwe-utils.js
@@ -3,7 +3,7 @@
import invariant from 'invariant';
import { SiweMessage } from 'siwe';
-import { isDev } from './dev-utils.js';
+// import { isDev } from './dev-utils.js';
diff --git a/keyserver/docker-compose.yml b/keyserver/docker-compose.yml
index b9a0528e8f..adf04a8dd3 100644
--- a/keyserver/docker-compose.yml
+++ b/keyserver/docker-compose.yml
@@ -13,7 +13,7 @@ services:
image: commapp/node-keyserver:1.0
restart: always
ports:
- - '3000:3000'
+ - '3001:3000'
@marcinwasowicz
marcinwasowicz / gist:47964be1bd6aeaabc5504b3fa440f340
Created March 4, 2024 12:37
Test notifs account in CommCoreModule
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
index 81680db56..301887be2 100644
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -667,19 +667,19 @@ bool create_schema(sqlite3 *db) {
void set_encryption_key(
sqlite3 *db,
const std::string &encryptionKey = SQLiteQueryExecutor::encryptionKey) {
- std::string set_encryption_key_query =
- "PRAGMA key = \"x'" + encryptionKey + "'\";";