Skip to content

Instantly share code, notes, and snippets.

@vdhanan
vdhanan / gist:a21918a5d82fcb7e6d5e03e5648de6f6
Created August 18, 2022 18:22
Install CMake 3.18.1 for Android
Open Android Studio
Click More Actions -> SDK Manager
Go to the SDK Tools tab
Select CMake 3.18.1
Optionally, you can remove 3.10.2 to free up space
Hit Apply at the bottom right
You're done!
@vdhanan
vdhanan / generateNonce
Created March 28, 2023 04:02
git diff for testing generateNonce from JS
diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js
index 4b5109344..f6a577595 100644
--- a/native/data/sqlite-data-handler.js
+++ b/native/data/sqlite-data-handler.js
@@ -75,6 +75,20 @@ function SQLiteDataHandler(): React.Node {
`SQLite database deletion was triggered by ${triggeredBy}`,
);
}
+ Alert.alert(new Date().toISOString());
+ const foo = commCoreModule.generateNonce();
diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
index ce8b4c053..314f40b1d 100644
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -5,12 +5,17 @@ import { Platform } from 'react-native';
import { useDispatch } from 'react-redux';
import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js';
-import { registerActionTypes, register } from 'lib/actions/user-actions.js';
+import {
diff --git a/web/root.js b/web/root.js
index 0c169af56..628b6a786 100644
--- a/web/root.js
+++ b/web/root.js
@@ -16,6 +16,9 @@ import App from './app.react.js';
import { SQLiteDataHandler } from './database/sqlite-data-handler.js';
import { localforageConfig } from './database/utils/constants.js';
import ErrorBoundary from './error-boundary.react.js';
+import { VersionInterceptor, AuthInterceptor } from './grpc/interceptor.js';
+import * as IdentityClient from './protobufs/identity-client.cjs';
diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
index 5c927853b..f19940b34 100644
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -14,8 +14,10 @@ use lazy_static::lazy_static;
use serde::Serialize;
use std::sync::Arc;
use tokio::runtime::{Builder, Runtime};
-use tonic::Status;
-use tracing::instrument;
diff --git a/web/root.js b/web/root.js
index 56e7b49af..a72bfa5b7 100644
--- a/web/root.js
+++ b/web/root.js
@@ -21,6 +21,7 @@ import App from './app.react.js';
import { SQLiteDataHandler } from './database/sqlite-data-handler.js';
import { localforageConfig } from './database/utils/constants.js';
import ErrorBoundary from './error-boundary.react.js';
+import { IdentityServiceClientWrapper } from './grpc/identity-service-client-wrapper.js';
import { defaultWebState } from './redux/default-state.js';
diff --git a/lib/webpack/shared.cjs b/lib/webpack/shared.cjs
index f31e32f8f..3b77cf051 100644
--- a/lib/webpack/shared.cjs
+++ b/lib/webpack/shared.cjs
@@ -98,19 +98,23 @@ function createBaseBrowserConfig(baseConfig) {
}
async function getConfigs() {
- const [alchemySecret, walletConnectSecret] = await Promise.all([
- getConfig({ folder: 'secrets', name: 'alchemy' }),
varun@varuns-MacBook-Pro keyserver % git diff
diff --git a/keyserver/src/keyserver.js b/keyserver/src/keyserver.js
index 4b1e116ab..a603cdfaf 100644
--- a/keyserver/src/keyserver.js
+++ b/keyserver/src/keyserver.js
@@ -51,10 +51,13 @@ import {
getWebAppURLFacts,
getWebAppCorsConfig,
} from './utils/urls.js';
+import { versionResponder } from './responders/version-responders.js';
@vdhanan
vdhanan / testplan.patch
Created February 6, 2024 22:54
test plan for D10977
diff --git a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
index 2a21d8f2e..16f350e1d 100644
--- a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
+++ b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
@@ -136,6 +136,10 @@ std::string CryptoModule::getIdentityKeys() {
std::string
CryptoModule::getOneTimeKeysForPublishing(size_t oneTimeKeysAmount) {
+ // REMOVE THIS START
+ // generating one one-time key to see how function handles its presence
@vdhanan
vdhanan / .patch
Created March 12, 2024 20:00
test plan
diff --git a/native/identity-service/identity-service-context-provider.react.js b/native/identity-service/identity-service-context-provider.react.js
index 3aaf69c749..49c195df97 100644
--- a/native/identity-service/identity-service-context-provider.react.js
+++ b/native/identity-service/identity-service-context-provider.react.js
@@ -333,7 +333,13 @@ function IdentityServiceContextProvider(props: Props): React.Node {
commCoreModule.getUserPublicKey(),
commCoreModule.getOneTimeKeys(ONE_TIME_KEYS_NUMBER),
commCoreModule.validateAndGetPrekeys(),
+ commCoreModule.validateAndUpload(
+ '3951934A-7764-4D20-8507-0CB96838F8C6',