Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcinwasowicz/dfd0f0c213e662d9c91289a5ee083820 to your computer and use it in GitHub Desktop.
Save marcinwasowicz/dfd0f0c213e662d9c91289a5ee083820 to your computer and use it in GitHub Desktop.
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';
import { useSelector } from '../redux/redux-utils.js';
import { useColors, useStyles } from '../themes/colors.js';
@@ -194,6 +195,19 @@ function TunnelbrokerMenu(props: Props): React.Node {
Send encrypted message to recipient
</Text>
</Button>
+ <Button
+ onPress={async () => {
+ console.log(await commCoreModule.getSIWEBackupSecrets());
+ }}
+ style={styles.row}
+ iosFormat="highlight"
+ iosHighlightUnderlayColor={colors.panelIosHighlightUnderlay}
+ iosActiveOpacity={0.85}
+ >
+ <Text style={styles.submenuText}>
+ Show SIWE backup secrets in the console
+ </Text>
+ </Button>
</View>
<Text style={styles.header}>MESSAGES</Text>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment