mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 15:18:18 -05:00
Simplify alias tooling and relax export sorting (#867)
* Simplify alias config * Restore export sorting overrides * save migration pattern * alias last minute updates * fix tests * improved import sorting * Implement typed event emitter (#869) * Implement typed event emitter * cr suggestion
This commit is contained in:
@@ -54,23 +54,25 @@ module.exports = {
|
||||
{
|
||||
groups: [
|
||||
// Node.js built-ins
|
||||
|
||||
['^node:'],
|
||||
['^node:.*/'],
|
||||
// External packages
|
||||
|
||||
['^[a-zA-Z]'],
|
||||
// External packages (including @-prefixed external packages)
|
||||
['^[a-zA-Z]', '^@(?!selfxyz|/)'],
|
||||
|
||||
// Internal workspace packages
|
||||
|
||||
['^@selfxyz/'],
|
||||
// Internal relative imports
|
||||
|
||||
// Internal alias imports (new @/ alias)
|
||||
['^@/'],
|
||||
|
||||
// Internal relative imports
|
||||
['^[./]'],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
// Export sorting - using sort-exports for better type prioritization
|
||||
// Export sorting
|
||||
|
||||
'sort-exports/sort-exports': [
|
||||
'error',
|
||||
@@ -167,6 +169,20 @@ module.exports = {
|
||||
'@typescript-eslint/indent': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
// Disable export sorting for files with dependency issues
|
||||
files: [
|
||||
'src/components/NavBar/BaseNavBar.tsx',
|
||||
'src/navigation/index.tsx',
|
||||
'src/providers/passportDataProvider.tsx',
|
||||
'src/utils/cloudBackup/helpers.ts',
|
||||
'src/utils/haptic/index.ts',
|
||||
'src/utils/proving/provingUtils.ts',
|
||||
],
|
||||
rules: {
|
||||
'sort-exports/sort-exports': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['tests/**/*.{ts,tsx}'],
|
||||
parserOptions: {
|
||||
@@ -201,19 +217,5 @@ module.exports = {
|
||||
'no-undef': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
// Disable export sorting for files with dependency issues
|
||||
files: [
|
||||
'src/components/NavBar/BaseNavBar.tsx',
|
||||
'src/navigation/index.tsx',
|
||||
'src/providers/passportDataProvider.tsx',
|
||||
'src/utils/cloudBackup/helpers.ts',
|
||||
'src/utils/haptic/index.ts',
|
||||
'src/utils/proving/provingUtils.ts',
|
||||
],
|
||||
rules: {
|
||||
'sort-exports/sort-exports': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = {
|
||||
'module-resolver',
|
||||
{
|
||||
root: ['./src'],
|
||||
alias: { '@src': './src' },
|
||||
alias: { '@': './src' },
|
||||
},
|
||||
],
|
||||
['@babel/plugin-transform-private-methods', { loose: true }],
|
||||
|
||||
@@ -9,8 +9,8 @@ module.exports = {
|
||||
moduleNameMapper: {
|
||||
'^@env$': '<rootDir>/tests/__setup__/@env.js',
|
||||
'\\.svg$': '<rootDir>/tests/__setup__/svgMock.js',
|
||||
'^@src/(.*)$': '<rootDir>/src/$1',
|
||||
'^@src$': '<rootDir>/src',
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
'^@$': '<rootDir>/src',
|
||||
'^@tests/(.*)$': '<rootDir>/tests/src/$1',
|
||||
'^@tests$': '<rootDir>/tests/src',
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ const extraNodeModules = {
|
||||
util: require.resolve('util'),
|
||||
assert: require.resolve('assert'),
|
||||
'@babel/runtime': path.join(trueMonorepoNodeModules, '@babel/runtime'),
|
||||
'@src': path.join(__dirname, 'src'),
|
||||
'@': path.join(__dirname, 'src'),
|
||||
'@selfxyz/common': path.resolve(commonPath, 'dist'),
|
||||
'@selfxyz/mobile-sdk-alpha': path.resolve(sdkAlphaPath, 'dist'),
|
||||
// Main exports
|
||||
|
||||
@@ -3,30 +3,10 @@ const path = require('node:path');
|
||||
const { Project, SyntaxKind } = require('ts-morph');
|
||||
|
||||
function determineAliasStrategy(dir, abs, baseDir, baseAlias) {
|
||||
// Always use base alias with path relative to baseDir (no special '@/' handling)
|
||||
const rel = path.relative(baseDir, abs).replace(/\\/g, '/');
|
||||
return rel ? `${baseAlias}/${rel}` : baseAlias;
|
||||
}
|
||||
|
||||
function optimizeExistingSrcImport(spec) {
|
||||
// Convert @src/path/to/file to @/file if it's a same-directory import
|
||||
// This migration no longer shortens to '@/' because tooling can't resolve contextual '@/'
|
||||
if (!spec.startsWith('@src/')) return spec;
|
||||
return spec;
|
||||
}
|
||||
|
||||
// Migrate legacy '@/File' (same-directory shorthand) to '@src/<relative-from-src>/<File>'
|
||||
function migrateAtShorthand(spec, dir, srcDir) {
|
||||
if (!spec.startsWith('@/')) return spec;
|
||||
const fileBase = spec.slice(2); // remove '@/'
|
||||
// Compute path relative to src for the current directory, then append the fileBase
|
||||
const relFromSrcToCurrentDir = path.relative(srcDir, dir).replace(/\\/g, '/');
|
||||
const finalPath = relFromSrcToCurrentDir
|
||||
? `@src/${relFromSrcToCurrentDir}/${fileBase}`
|
||||
: `@src/${fileBase}`;
|
||||
return finalPath;
|
||||
}
|
||||
|
||||
function transformProjectToAliasImports(project, appRootPath) {
|
||||
const srcDir = path.join(appRootPath, 'src');
|
||||
const testsDir = path.join(appRootPath, 'tests', 'src');
|
||||
@@ -39,21 +19,8 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
for (const declaration of sourceFile.getImportDeclarations()) {
|
||||
const spec = declaration.getModuleSpecifierValue();
|
||||
|
||||
// Handle existing @src/ imports - keep as-is (no '@/' optimization)
|
||||
if (spec.startsWith('@src/')) {
|
||||
const optimized = optimizeExistingSrcImport(spec, dir, srcDir);
|
||||
if (optimized !== spec) {
|
||||
declaration.setModuleSpecifier(optimized);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle legacy '@/File' shorthand and migrate it
|
||||
if (spec.startsWith('@/')) {
|
||||
const migrated = migrateAtShorthand(spec, dir, srcDir);
|
||||
if (migrated !== spec) {
|
||||
declaration.setModuleSpecifier(migrated);
|
||||
}
|
||||
// Skip existing alias imports
|
||||
if (spec.startsWith('@/') || spec.startsWith('@tests/')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -67,7 +34,7 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
const relFromSrc = path.relative(srcDir, abs);
|
||||
if (!relFromSrc.startsWith('..') && !path.isAbsolute(relFromSrc)) {
|
||||
baseDir = srcDir;
|
||||
baseAlias = '@src';
|
||||
baseAlias = '@';
|
||||
} else {
|
||||
const relFromTests = path.relative(testsDir, abs);
|
||||
if (!relFromTests.startsWith('..') && !path.isAbsolute(relFromTests)) {
|
||||
@@ -87,21 +54,8 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
const spec = declaration.getModuleSpecifierValue();
|
||||
if (!spec) continue;
|
||||
|
||||
// Handle existing @src/ exports - keep as-is
|
||||
if (spec.startsWith('@src/')) {
|
||||
const optimized = optimizeExistingSrcImport(spec, dir, srcDir);
|
||||
if (optimized !== spec) {
|
||||
declaration.setModuleSpecifier(optimized);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle legacy '@/File' shorthand and migrate it
|
||||
if (spec.startsWith('@/')) {
|
||||
const migrated = migrateAtShorthand(spec, dir, srcDir);
|
||||
if (migrated !== spec) {
|
||||
declaration.setModuleSpecifier(migrated);
|
||||
}
|
||||
// Skip existing alias exports
|
||||
if (spec.startsWith('@/') || spec.startsWith('@tests/')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -114,7 +68,7 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
const relFromSrc = path.relative(srcDir, abs);
|
||||
if (!relFromSrc.startsWith('..') && !path.isAbsolute(relFromSrc)) {
|
||||
baseDir = srcDir;
|
||||
baseAlias = '@src';
|
||||
baseAlias = '@';
|
||||
} else {
|
||||
const relFromTests = path.relative(testsDir, abs);
|
||||
if (!relFromTests.startsWith('..') && !path.isAbsolute(relFromTests)) {
|
||||
@@ -152,21 +106,8 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
|
||||
const spec = arg.getLiteralValue();
|
||||
|
||||
// Handle existing @src/ requires - keep as-is
|
||||
if (spec.startsWith('@src/')) {
|
||||
const optimized = optimizeExistingSrcImport(spec, dir, srcDir);
|
||||
if (optimized !== spec) {
|
||||
arg.setLiteralValue(optimized);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle legacy '@/File' shorthand and migrate it
|
||||
if (spec.startsWith('@/')) {
|
||||
const migrated = migrateAtShorthand(spec, dir, srcDir);
|
||||
if (migrated !== spec) {
|
||||
arg.setLiteralValue(migrated);
|
||||
}
|
||||
// Skip existing alias requires
|
||||
if (spec.startsWith('@/') || spec.startsWith('@tests/')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -181,7 +122,7 @@ function transformProjectToAliasImports(project, appRootPath) {
|
||||
const relFromSrc = path.relative(srcDir, abs);
|
||||
if (!relFromSrc.startsWith('..') && !path.isAbsolute(relFromSrc)) {
|
||||
baseDir = srcDir;
|
||||
baseAlias = '@src';
|
||||
baseAlias = '@';
|
||||
} else {
|
||||
const relFromTests = path.relative(testsDir, abs);
|
||||
if (!relFromTests.startsWith('..') && !path.isAbsolute(relFromTests)) {
|
||||
|
||||
@@ -58,7 +58,7 @@ describe('alias-imports transform', () => {
|
||||
const b = project.getSourceFileOrThrow(fileB);
|
||||
const imports = b.getImportDeclarations();
|
||||
assert.strictEqual(imports.length, 1);
|
||||
assert.strictEqual(imports[0].getModuleSpecifierValue(), '@src/utils/a');
|
||||
assert.strictEqual(imports[0].getModuleSpecifierValue(), '@/utils/a');
|
||||
});
|
||||
|
||||
it('transforms relative require to @src alias', () => {
|
||||
@@ -85,7 +85,7 @@ describe('alias-imports transform', () => {
|
||||
transformProjectToAliasImports(project, appRoot);
|
||||
|
||||
const c = project.getSourceFileOrThrow(fileC);
|
||||
assert.ok(c.getText().includes("require('@src/utils/x')"));
|
||||
assert.ok(c.getText().includes("require('@/utils/x')"));
|
||||
});
|
||||
|
||||
it('transforms relative TS import in tests to @tests alias', () => {
|
||||
@@ -194,10 +194,7 @@ describe('alias-imports transform', () => {
|
||||
const specFile = project.getSourceFileOrThrow(deepSpecFile);
|
||||
const imports = specFile.getImportDeclarations();
|
||||
assert.strictEqual(imports.length, 1);
|
||||
assert.strictEqual(
|
||||
imports[0].getModuleSpecifierValue(),
|
||||
'@src/utils/haptic',
|
||||
);
|
||||
assert.strictEqual(imports[0].getModuleSpecifierValue(), '@/utils/haptic');
|
||||
});
|
||||
|
||||
it("transforms deep relative require '../../../src/...' to @src alias from tests", () => {
|
||||
@@ -226,7 +223,7 @@ describe('alias-imports transform', () => {
|
||||
transformProjectToAliasImports(project, appRoot);
|
||||
|
||||
const specFile = project.getSourceFileOrThrow(deepSpecFile);
|
||||
assert.ok(specFile.getText().includes("require('@src/utils/haptic')"));
|
||||
assert.ok(specFile.getText().includes("require('@/utils/haptic')"));
|
||||
});
|
||||
|
||||
it('aliases export star re-exports with ../ from sibling directory', () => {
|
||||
@@ -251,7 +248,7 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const indexFile = project.getSourceFileOrThrow(fileIndex);
|
||||
const exportDecl = indexFile.getExportDeclarations()[0];
|
||||
assert.strictEqual(exportDecl.getModuleSpecifierValue(), '@src/utils/a');
|
||||
assert.strictEqual(exportDecl.getModuleSpecifierValue(), '@/utils/a');
|
||||
});
|
||||
|
||||
it('aliases export named re-exports with ../ from sibling directory', () => {
|
||||
@@ -276,7 +273,7 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const indexFile = project.getSourceFileOrThrow(fileIndex);
|
||||
const exportDecl = indexFile.getExportDeclarations()[0];
|
||||
assert.strictEqual(exportDecl.getModuleSpecifierValue(), '@src/utils/a');
|
||||
assert.strictEqual(exportDecl.getModuleSpecifierValue(), '@/utils/a');
|
||||
});
|
||||
|
||||
it('aliases dynamic import() with relative specifier', () => {
|
||||
@@ -304,7 +301,7 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const featureFile = project.getSourceFileOrThrow(feature);
|
||||
const text = featureFile.getText();
|
||||
assert.ok(text.includes("import('@src/utils/lazy')"));
|
||||
assert.ok(text.includes("import('@/utils/lazy')"));
|
||||
});
|
||||
|
||||
it('aliases jest.mock relative specifier', () => {
|
||||
@@ -332,7 +329,7 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const featureFile = project.getSourceFileOrThrow(feature);
|
||||
const text = featureFile.getText();
|
||||
assert.ok(text.includes("jest.mock('@src/utils/mod')"));
|
||||
assert.ok(text.includes("jest.mock('@/utils/mod')"));
|
||||
});
|
||||
|
||||
it('aliases jest.doMock and jest.unmock relative specifiers', () => {
|
||||
@@ -360,8 +357,8 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const featureFile = project.getSourceFileOrThrow(feature);
|
||||
const text = featureFile.getText();
|
||||
assert.ok(text.includes("jest.doMock('@src/utils/mod2')"));
|
||||
assert.ok(text.includes("jest.unmock('@src/utils/mod2')"));
|
||||
assert.ok(text.includes("jest.doMock('@/utils/mod2')"));
|
||||
assert.ok(text.includes("jest.unmock('@/utils/mod2')"));
|
||||
});
|
||||
|
||||
it('aliases relative imports starting with ./', () => {
|
||||
@@ -389,10 +386,150 @@ describe('alias-imports transform', () => {
|
||||
|
||||
const indexFile = project.getSourceFileOrThrow(index);
|
||||
const importDecl = indexFile.getImportDeclarations()[0];
|
||||
// Same-directory imports are migrated to @src/<relative-from-src>/<file>
|
||||
// Same-directory imports are migrated to @/<relative-from-src>/<file>
|
||||
assert.strictEqual(
|
||||
importDecl.getModuleSpecifierValue(),
|
||||
'@src/utils/haptic/trigger',
|
||||
'@/utils/haptic/trigger',
|
||||
);
|
||||
});
|
||||
|
||||
describe('Migration functionality', () => {
|
||||
it('migrates @src/ import to @/', () => {
|
||||
const appRoot = tempRoot;
|
||||
const srcDir = path.join(appRoot, 'src');
|
||||
const fileA = path.join(srcDir, 'components', 'Button.tsx');
|
||||
const fileB = path.join(srcDir, 'utils', 'colors.ts');
|
||||
|
||||
writeFileEnsured(
|
||||
fileA,
|
||||
'export const Button = () => <div>Button</div>;\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileB,
|
||||
"import { Button } from '@src/components/Button';\nexport const colors = { primary: '#007AFF' };\n",
|
||||
);
|
||||
|
||||
// Simulate the migration: replace @src/ with @/
|
||||
const content = fs.readFileSync(fileB, 'utf8');
|
||||
const migratedContent = content.replace(/@src\//g, '@/');
|
||||
fs.writeFileSync(fileB, migratedContent, 'utf8');
|
||||
|
||||
// Verify the migration worked
|
||||
const finalContent = fs.readFileSync(fileB, 'utf8');
|
||||
assert.ok(finalContent.includes("from '@/components/Button'"));
|
||||
assert.ok(!finalContent.includes('@src/'));
|
||||
});
|
||||
|
||||
it('migrates @src/ export to @/', () => {
|
||||
const appRoot = tempRoot;
|
||||
const srcDir = path.join(appRoot, 'src');
|
||||
const fileA = path.join(srcDir, 'components', 'Button.tsx');
|
||||
const fileIndex = path.join(srcDir, 'components', 'index.ts');
|
||||
|
||||
writeFileEnsured(
|
||||
fileA,
|
||||
'export const Button = () => <div>Button</div>;\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileIndex,
|
||||
"export { Button } from '@src/components/Button';\n",
|
||||
);
|
||||
|
||||
// Simulate the migration: replace @src/ with @/
|
||||
const content = fs.readFileSync(fileIndex, 'utf8');
|
||||
const migratedContent = content.replace(/@src\//g, '@/');
|
||||
fs.writeFileSync(fileIndex, migratedContent, 'utf8');
|
||||
|
||||
// Verify the migration worked
|
||||
const finalContent = fs.readFileSync(fileIndex, 'utf8');
|
||||
assert.ok(finalContent.includes("from '@/components/Button'"));
|
||||
assert.ok(!finalContent.includes('@src/'));
|
||||
});
|
||||
|
||||
it('migrates @src/ require to @/', () => {
|
||||
const appRoot = tempRoot;
|
||||
const srcDir = path.join(appRoot, 'src');
|
||||
const fileA = path.join(srcDir, 'utils', 'colors.ts');
|
||||
const fileB = path.join(srcDir, 'components', 'Theme.tsx');
|
||||
|
||||
writeFileEnsured(
|
||||
fileA,
|
||||
'export const colors = { primary: "#007AFF" };\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileB,
|
||||
"const colors = require('@src/utils/colors');\nexport const Theme = () => <div>Theme</div>;\n",
|
||||
);
|
||||
|
||||
// Simulate the migration: replace @src/ with @/
|
||||
const content = fs.readFileSync(fileB, 'utf8');
|
||||
const migratedContent = content.replace(/@src\//g, '@/');
|
||||
fs.writeFileSync(fileB, migratedContent, 'utf8');
|
||||
|
||||
// Verify the migration worked
|
||||
const finalContent = fs.readFileSync(fileB, 'utf8');
|
||||
assert.ok(finalContent.includes("require('@/utils/colors')"));
|
||||
assert.ok(!finalContent.includes('@src/'));
|
||||
});
|
||||
|
||||
it('preserves full paths (no aggressive optimization)', () => {
|
||||
const appRoot = tempRoot;
|
||||
const srcDir = path.join(appRoot, 'src');
|
||||
const fileA = path.join(srcDir, 'components', 'buttons', 'Button.tsx');
|
||||
const fileB = path.join(srcDir, 'screens', 'Home.tsx');
|
||||
|
||||
writeFileEnsured(
|
||||
fileA,
|
||||
'export const Button = () => <div>Button</div>;\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileB,
|
||||
"import { Button } from '@src/components/buttons/Button';\nexport const Home = () => <Button />;\n",
|
||||
);
|
||||
|
||||
// Simulate the migration: replace @src/ with @/
|
||||
const content = fs.readFileSync(fileB, 'utf8');
|
||||
const migratedContent = content.replace(/@src\//g, '@/');
|
||||
fs.writeFileSync(fileB, migratedContent, 'utf8');
|
||||
|
||||
// Verify the migration preserved the full path
|
||||
const finalContent = fs.readFileSync(fileB, 'utf8');
|
||||
assert.ok(finalContent.includes("from '@/components/buttons/Button'"));
|
||||
assert.ok(!finalContent.includes("from '@/Button'"));
|
||||
assert.ok(!finalContent.includes('@src/'));
|
||||
});
|
||||
|
||||
it('migrates multiple @src/ imports in same file', () => {
|
||||
const appRoot = tempRoot;
|
||||
const srcDir = path.join(appRoot, 'src');
|
||||
const fileA = path.join(srcDir, 'utils', 'colors.ts');
|
||||
const fileB = path.join(srcDir, 'utils', 'dateFormatter.ts');
|
||||
const fileC = path.join(srcDir, 'screens', 'Home.tsx');
|
||||
|
||||
writeFileEnsured(
|
||||
fileA,
|
||||
'export const colors = { primary: "#007AFF" };\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileB,
|
||||
'export const formatDate = (date: Date) => date.toISOString();\n',
|
||||
);
|
||||
writeFileEnsured(
|
||||
fileC,
|
||||
"import { Button } from '@src/components/buttons/Button';\nimport { colors } from '@src/utils/colors';\nimport { formatDate } from '@src/utils/dateFormatter';\nexport const Home = () => <Button />;\n",
|
||||
);
|
||||
|
||||
// Simulate the migration: replace @src/ with @/
|
||||
const content = fs.readFileSync(fileC, 'utf8');
|
||||
const migratedContent = content.replace(/@src\//g, '@/');
|
||||
fs.writeFileSync(fileC, migratedContent, 'utf8');
|
||||
|
||||
// Verify all imports were migrated
|
||||
const finalContent = fs.readFileSync(fileC, 'utf8');
|
||||
assert.ok(finalContent.includes("from '@/components/buttons/Button'"));
|
||||
assert.ok(finalContent.includes("from '@/utils/colors'"));
|
||||
assert.ok(finalContent.includes("from '@/utils/dateFormatter'"));
|
||||
assert.ok(!finalContent.includes('@src/'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import type { FirebaseRemoteConfigTypes } from '@react-native-firebase/remote-config';
|
||||
import remoteConfig from '@react-native-firebase/remote-config';
|
||||
|
||||
import type {
|
||||
FeatureFlagValue,
|
||||
RemoteConfigBackend,
|
||||
StorageBackend,
|
||||
} from '@src/RemoteConfig.shared';
|
||||
} from '@/RemoteConfig.shared';
|
||||
import {
|
||||
clearAllLocalOverrides as clearAllLocalOverridesShared,
|
||||
clearLocalOverride as clearLocalOverrideShared,
|
||||
@@ -17,7 +18,7 @@ import {
|
||||
initRemoteConfig as initRemoteConfigShared,
|
||||
refreshRemoteConfig as refreshRemoteConfigShared,
|
||||
setLocalOverride as setLocalOverrideShared,
|
||||
} from '@src/RemoteConfig.shared';
|
||||
} from '@/RemoteConfig.shared';
|
||||
|
||||
// Mobile-specific storage backend using AsyncStorage
|
||||
const mobileStorageBackend: StorageBackend = {
|
||||
@@ -53,7 +54,7 @@ const mobileRemoteConfigBackend: RemoteConfigBackend = {
|
||||
},
|
||||
};
|
||||
|
||||
export type { FeatureFlagValue } from '@src/RemoteConfig.shared';
|
||||
export type { FeatureFlagValue } from '@/RemoteConfig.shared';
|
||||
|
||||
export const clearAllLocalOverrides = () =>
|
||||
clearAllLocalOverridesShared(mobileStorageBackend);
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
FeatureFlagValue,
|
||||
RemoteConfigBackend,
|
||||
StorageBackend,
|
||||
} from '@src/RemoteConfig.shared';
|
||||
} from '@/RemoteConfig.shared';
|
||||
import {
|
||||
clearAllLocalOverrides as clearAllLocalOverridesShared,
|
||||
clearLocalOverride as clearLocalOverrideShared,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
initRemoteConfig as initRemoteConfigShared,
|
||||
refreshRemoteConfig as refreshRemoteConfigShared,
|
||||
setLocalOverride as setLocalOverrideShared,
|
||||
} from '@src/RemoteConfig.shared';
|
||||
} from '@/RemoteConfig.shared';
|
||||
|
||||
// Web-specific storage backend using LocalStorage
|
||||
const webStorageBackend: StorageBackend = {
|
||||
@@ -87,7 +87,7 @@ class MockFirebaseRemoteConfig implements RemoteConfigBackend {
|
||||
const webRemoteConfigBackend: RemoteConfigBackend =
|
||||
new MockFirebaseRemoteConfig();
|
||||
|
||||
export type { FeatureFlagValue } from '@src/RemoteConfig.shared';
|
||||
export type { FeatureFlagValue } from '@/RemoteConfig.shared';
|
||||
|
||||
export const clearAllLocalOverrides = () =>
|
||||
clearAllLocalOverridesShared(webStorageBackend);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import '@ethersproject/shims';
|
||||
import { SEGMENT_KEY } from '@env';
|
||||
import type { SegmentEvent } from '@segment/analytics-react-native';
|
||||
import {
|
||||
@@ -10,6 +9,8 @@ import {
|
||||
PluginType,
|
||||
} from '@segment/analytics-react-native';
|
||||
|
||||
import '@ethersproject/shims';
|
||||
|
||||
let segmentClient: ReturnType<typeof createClient> | null = null;
|
||||
|
||||
class DisableTrackingPlugin extends EventPlugin {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
export const loadMiscAnimation = () => import('@src/assets/animations/loading/misc.json');
|
||||
export const loadPassportAnimation = () => import('@src/assets/animations/passport_verify.json');
|
||||
export const loadMiscAnimation = () => import('@/assets/animations/loading/misc.json');
|
||||
export const loadPassportAnimation = () => import('@/assets/animations/passport_verify.json');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
|
||||
import { shouldShowAesopRedesign } from '@src/hooks/useAesopRedesign';
|
||||
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
|
||||
|
||||
interface ButtonsContainerProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -7,9 +7,9 @@ import type { Country3LetterCode } from '@selfxyz/common/constants';
|
||||
import { countryCodes } from '@selfxyz/common/constants';
|
||||
import type { SelfAppDisclosureConfig } from '@selfxyz/common/utils';
|
||||
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import CheckMark from '@src/images/icons/checkmark.svg';
|
||||
import { slate200, slate500 } from '@src/utils/colors';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import CheckMark from '@/images/icons/checkmark.svg';
|
||||
import { slate200, slate500 } from '@/utils/colors';
|
||||
|
||||
interface DisclosureProps {
|
||||
disclosures: SelfAppDisclosureConfig;
|
||||
|
||||
@@ -4,8 +4,8 @@ import type { ErrorInfo } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
|
||||
import { captureException } from '@src/Sentry';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { captureException } from '@/Sentry';
|
||||
import analytics from '@/utils/analytics';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { Button, Text, XStack, YStack } from 'tamagui';
|
||||
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import {
|
||||
black,
|
||||
slate50,
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
slate500,
|
||||
teal500,
|
||||
white,
|
||||
} from '@src/utils/colors';
|
||||
import { confirmTap } from '@src/utils/haptic';
|
||||
} from '@/utils/colors';
|
||||
import { confirmTap } from '@/utils/haptic';
|
||||
|
||||
interface MnemonicProps {
|
||||
words?: string[];
|
||||
|
||||
@@ -5,10 +5,10 @@ import type { SystemBarStyle } from 'react-native-edge-to-edge';
|
||||
import { SystemBars } from 'react-native-edge-to-edge';
|
||||
import type { TextProps, ViewProps, XStackProps } from 'tamagui';
|
||||
import { Button, View, XStack } from 'tamagui';
|
||||
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { ChevronLeft, X } from '@tamagui/lucide-icons';
|
||||
|
||||
import { Title } from '@/components/typography/Title';
|
||||
|
||||
interface NavBarProps extends XStackProps {
|
||||
children: React.ReactNode;
|
||||
backgroundColor?: string;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
import React from 'react';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import type { TextStyle, ViewStyle } from 'tamagui';
|
||||
|
||||
import type { NativeStackHeaderProps } from '@react-navigation/native-stack';
|
||||
import { NavBar } from '@src/components/NavBar/BaseNavBar';
|
||||
import { white } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { buttonTap } from '@src/utils/haptic';
|
||||
|
||||
import { NavBar } from '@/components/NavBar/BaseNavBar';
|
||||
import { white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { buttonTap } from '@/utils/haptic';
|
||||
|
||||
export const DefaultNavBar = (props: NativeStackHeaderProps) => {
|
||||
const { goBack, canGoBack } = props.navigation;
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
import React from 'react';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Button } from 'tamagui';
|
||||
|
||||
import type { NativeStackHeaderProps } from '@react-navigation/native-stack';
|
||||
import { NavBar } from '@src/components/NavBar/BaseNavBar';
|
||||
import ActivityIcon from '@src/images/icons/activity.svg';
|
||||
import SettingsIcon from '@src/images/icons/settings.svg';
|
||||
import { black, neutral400, white } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { buttonTap } from '@src/utils/haptic';
|
||||
|
||||
import { NavBar } from '@/components/NavBar/BaseNavBar';
|
||||
import ActivityIcon from '@/images/icons/activity.svg';
|
||||
import SettingsIcon from '@/images/icons/settings.svg';
|
||||
import { black, neutral400, white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { buttonTap } from '@/utils/haptic';
|
||||
|
||||
export const HomeNavBar = (props: NativeStackHeaderProps) => {
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
@@ -4,14 +4,14 @@ import React from 'react';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import type { TextStyle, ViewStyle } from 'tamagui';
|
||||
import { XStack, YStack } from 'tamagui';
|
||||
|
||||
import type {
|
||||
NativeStackHeaderProps,
|
||||
NativeStackNavigationOptions,
|
||||
} from '@react-navigation/native-stack';
|
||||
import { NavBar } from '@src/components/NavBar/BaseNavBar';
|
||||
import { cyan300, slate200, white } from '@src/utils/colors';
|
||||
import { buttonTap } from '@src/utils/haptic';
|
||||
|
||||
import { NavBar } from '@/components/NavBar/BaseNavBar';
|
||||
import { cyan300, slate200, white } from '@/utils/colors';
|
||||
import { buttonTap } from '@/utils/haptic';
|
||||
|
||||
interface ProgressNavBarProps extends NativeStackHeaderProps {
|
||||
currentStep?: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
export { DefaultNavBar } from '@src/components/NavBar/DefaultNavBar';
|
||||
export { HomeNavBar } from '@src/components/NavBar/HomeNavBar';
|
||||
export { ProgressNavBar } from '@src/components/NavBar/ProgressNavBar';
|
||||
export { DefaultNavBar } from '@/components/NavBar/DefaultNavBar';
|
||||
export { HomeNavBar } from '@/components/NavBar/HomeNavBar';
|
||||
export { ProgressNavBar } from '@/components/NavBar/ProgressNavBar';
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import React from 'react';
|
||||
import { Text, View } from 'tamagui';
|
||||
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import { slate500 } from '@src/utils/colors';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import { slate500 } from '@/utils/colors';
|
||||
|
||||
export interface TipProps {
|
||||
title: string;
|
||||
|
||||
@@ -6,10 +6,10 @@ import { Platform, StyleSheet } from 'react-native';
|
||||
import type { ViewProps } from 'tamagui';
|
||||
import { Button, Text } from 'tamagui';
|
||||
|
||||
import { pressedStyle } from '@src/components/buttons/pressedStyle';
|
||||
import { shouldShowAesopRedesign } from '@src/hooks/useAesopRedesign';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { pressedStyle } from '@/components/buttons/pressedStyle';
|
||||
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
export interface ButtonProps extends ViewProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { ActivityIndicator, View } from 'react-native';
|
||||
import { assign, createMachine } from 'xstate';
|
||||
|
||||
import { HeldPrimaryButton } from '@src/components/buttons/PrimaryButtonLongHold';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { ProofEvents } from '@src/consts/analytics';
|
||||
import { black } from '@src/utils/colors';
|
||||
import { useMachine } from '@xstate/react';
|
||||
|
||||
import { HeldPrimaryButton } from '@/components/buttons/PrimaryButtonLongHold';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { ProofEvents } from '@/consts/analytics';
|
||||
import { black } from '@/utils/colors';
|
||||
|
||||
interface HeldPrimaryButtonProveScreenProps {
|
||||
onVerify: () => void;
|
||||
selectedAppSessionId: string | undefined | null;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import type { ButtonProps } from '@src/components/buttons/AbstractButton';
|
||||
import AbstractButton from '@src/components/buttons/AbstractButton';
|
||||
import { amber50, black, slate300, white } from '@src/utils/colors';
|
||||
import { normalizeBorderWidth } from '@src/utils/styleUtils';
|
||||
import type { ButtonProps } from '@/components/buttons/AbstractButton';
|
||||
import AbstractButton from '@/components/buttons/AbstractButton';
|
||||
import { amber50, black, slate300, white } from '@/utils/colors';
|
||||
import { normalizeBorderWidth } from '@/utils/styleUtils';
|
||||
|
||||
export function PrimaryButton({ children, ...props }: ButtonProps) {
|
||||
const { borderWidth, ...restProps } = props;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import type { ButtonProps } from '@src/components/buttons/AbstractButton';
|
||||
import type { ButtonProps } from '@/components/buttons/AbstractButton';
|
||||
|
||||
export interface HeldPrimaryButtonProps extends ButtonProps {
|
||||
onLongPress: () => void;
|
||||
|
||||
@@ -4,12 +4,12 @@ import React, { useEffect, useState } from 'react';
|
||||
import type { LayoutChangeEvent } from 'react-native';
|
||||
import { Animated, StyleSheet, useAnimatedValue } from 'react-native';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import type { HeldPrimaryButtonProps } from '@src/components/buttons/PrimaryButtonLongHold.shared';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import type { HeldPrimaryButtonProps } from '@/components/buttons/PrimaryButtonLongHold.shared';
|
||||
import {
|
||||
ACTION_TIMER,
|
||||
COLORS,
|
||||
} from '@src/components/buttons/PrimaryButtonLongHold.shared';
|
||||
} from '@/components/buttons/PrimaryButtonLongHold.shared';
|
||||
|
||||
export function HeldPrimaryButton({
|
||||
children,
|
||||
|
||||
@@ -5,12 +5,12 @@ import type { LayoutChangeEvent } from 'react-native';
|
||||
// Tamagui imports for web
|
||||
import { AnimatePresence, YStack } from 'tamagui';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import type { HeldPrimaryButtonProps } from '@src/components/buttons/PrimaryButtonLongHold.shared';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import type { HeldPrimaryButtonProps } from '@/components/buttons/PrimaryButtonLongHold.shared';
|
||||
import {
|
||||
ACTION_TIMER,
|
||||
COLORS,
|
||||
} from '@src/components/buttons/PrimaryButtonLongHold.shared';
|
||||
} from '@/components/buttons/PrimaryButtonLongHold.shared';
|
||||
|
||||
export function HeldPrimaryButton({
|
||||
children,
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import type { ButtonProps } from '@src/components/buttons/AbstractButton';
|
||||
import AbstractButton from '@src/components/buttons/AbstractButton';
|
||||
import { slate200, slate300, slate500, white } from '@src/utils/colors';
|
||||
import { normalizeBorderWidth } from '@src/utils/styleUtils';
|
||||
import type { ButtonProps } from '@/components/buttons/AbstractButton';
|
||||
import AbstractButton from '@/components/buttons/AbstractButton';
|
||||
import { slate200, slate300, slate500, white } from '@/utils/colors';
|
||||
import { normalizeBorderWidth } from '@/utils/styleUtils';
|
||||
|
||||
export function SecondaryButton({ children, ...props }: ButtonProps) {
|
||||
const { borderWidth, ...restProps } = props;
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
|
||||
import { extractMRZInfo } from '@selfxyz/mobile-sdk-alpha';
|
||||
|
||||
import { RCTFragment } from '@src/components/native/RCTFragment';
|
||||
import { RCTFragment } from '@/components/native/RCTFragment';
|
||||
|
||||
interface NativePassportOCRViewProps {
|
||||
onPassportRead: (
|
||||
|
||||
@@ -4,7 +4,7 @@ import React, { useCallback } from 'react';
|
||||
import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
|
||||
import { PixelRatio, Platform, requireNativeComponent } from 'react-native';
|
||||
|
||||
import { RCTFragment } from '@src/components/native/RCTFragment';
|
||||
import { RCTFragment } from '@/components/native/RCTFragment';
|
||||
|
||||
interface NativeQRCodeScannerViewProps {
|
||||
onQRData: (event: NativeSyntheticEvent<{ data: string }>) => void;
|
||||
|
||||
@@ -4,9 +4,9 @@ import React from 'react';
|
||||
import type { TextProps } from 'react-native';
|
||||
import { StyleSheet, Text } from 'react-native';
|
||||
|
||||
import { shouldShowAesopRedesign } from '@src/hooks/useAesopRedesign';
|
||||
import { slate400 } from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
|
||||
import { slate400 } from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
interface AdditionalProps extends TextProps {}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { styled, Text } from 'tamagui';
|
||||
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
export const BodyText = styled(Text, {
|
||||
fontFamily: dinot,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import { styled } from 'tamagui';
|
||||
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { slate400 } from '@src/utils/colors';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { slate400 } from '@/utils/colors';
|
||||
|
||||
export const Caption = styled(BodyText, {
|
||||
fontSize: 15,
|
||||
|
||||
@@ -4,8 +4,8 @@ import React from 'react';
|
||||
import type { TextProps } from 'react-native';
|
||||
import { StyleSheet, Text } from 'react-native';
|
||||
|
||||
import { slate700 } from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { slate700 } from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
interface CautionProps extends TextProps {}
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { StyleSheet } from 'react-native';
|
||||
import type { TextProps } from 'tamagui';
|
||||
import { Text } from 'tamagui';
|
||||
|
||||
import { shouldShowAesopRedesign } from '@src/hooks/useAesopRedesign';
|
||||
import { slate500 } from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
|
||||
import { slate500 } from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
interface DescriptionProps extends TextProps {}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { styled, Text } from 'tamagui';
|
||||
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
export const DescriptionTitle = styled(Text, {
|
||||
fontSize: 18,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { styled, Text } from 'tamagui';
|
||||
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
export const SubHeader = styled(Text, {
|
||||
fontFamily: dinot,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { StyleProp, TextStyle } from 'react-native';
|
||||
import { styled, Text } from 'tamagui';
|
||||
|
||||
import { advercase } from '@src/utils/fonts';
|
||||
import { advercase } from '@/utils/fonts';
|
||||
|
||||
export const Title = styled(
|
||||
Text,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { StyleSheet } from 'react-native';
|
||||
|
||||
import { black } from '@src/utils/colors';
|
||||
import { black } from '@/utils/colors';
|
||||
|
||||
export const typography = StyleSheet.create({
|
||||
strong: {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Linking } from 'react-native';
|
||||
import { checkVersion } from 'react-native-check-version';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { AppEvents } from '@src/consts/analytics';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { registerModalCallbacks } from '@src/utils/modalCallbackRegistry';
|
||||
|
||||
import { AppEvents } from '@/consts/analytics';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { registerModalCallbacks } from '@/utils/modalCallbackRegistry';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { useState } from 'react';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { AppEvents } from '@src/consts/analytics';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { registerModalCallbacks } from '@src/utils/modalCallbackRegistry';
|
||||
|
||||
import { AppEvents } from '@/consts/analytics';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { registerModalCallbacks } from '@/utils/modalCallbackRegistry';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
import { useEffect } from 'react';
|
||||
import { Linking, Platform } from 'react-native';
|
||||
|
||||
import { SettingsEvents } from '@src/consts/analytics';
|
||||
import { useModal } from '@src/hooks/useModal';
|
||||
import { useNetInfo } from '@src/hooks/useNetInfo';
|
||||
import { navigationRef } from '@src/navigation';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { SettingsEvents } from '@/consts/analytics';
|
||||
import { useModal } from '@/hooks/useModal';
|
||||
import { useNetInfo } from '@/hooks/useNetInfo';
|
||||
import { navigationRef } from '@/navigation';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import type { NavigationProp } from '@react-navigation/native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { RootStackParamList } from '@src/navigation/index';
|
||||
import { impactLight, impactMedium, selectionChange } from '@src/utils/haptic';
|
||||
|
||||
import type { RootStackParamList } from '@/navigation/index';
|
||||
import { impactLight, impactMedium, selectionChange } from '@/utils/haptic';
|
||||
|
||||
type NavigationAction = 'default' | 'cancel' | 'confirm';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { ethers } from 'ethers';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import { useAuth } from '@src/providers/authProvider';
|
||||
import { useAuth } from '@/providers/authProvider';
|
||||
|
||||
export default function useMnemonic() {
|
||||
const { getOrCreateMnemonic } = useAuth();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { ModalParams } from '@src/screens/misc/ModalScreen';
|
||||
|
||||
import type { ModalParams } from '@/screens/misc/ModalScreen';
|
||||
import {
|
||||
getModalCallbacks,
|
||||
registerModalCallbacks,
|
||||
unregisterModalCallbacks,
|
||||
} from '@src/utils/modalCallbackRegistry';
|
||||
} from '@/utils/modalCallbackRegistry';
|
||||
|
||||
export const useModal = (params: ModalParams) => {
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useModal } from '@src/hooks/useModal';
|
||||
import { navigationRef } from '@src/navigation';
|
||||
import { usePassport } from '@src/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import { useModal } from '@/hooks/useModal';
|
||||
import { navigationRef } from '@/navigation';
|
||||
import { usePassport } from '@/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
|
||||
// TODO: need to debug and test the logic. it pops up too often.
|
||||
export default function useRecoveryPrompts() {
|
||||
|
||||
@@ -13,8 +13,8 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import type { ViewProps } from 'tamagui';
|
||||
import { View } from 'tamagui';
|
||||
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
|
||||
// Get the current font scale factor
|
||||
const fontScale = PixelRatio.getFontScale();
|
||||
|
||||
@@ -5,11 +5,11 @@ import React from 'react';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { ScrollView, YStack } from 'tamagui';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { white } from '@src/utils/colors';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { white } from '@/utils/colors';
|
||||
|
||||
interface DetailListProps
|
||||
extends PropsWithChildren<{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { ProgressNavBar } from '@src/components/NavBar';
|
||||
import { shouldShowAesopRedesign } from '@src/hooks/useAesopRedesign';
|
||||
import { white } from '@src/utils/colors';
|
||||
|
||||
import { ProgressNavBar } from '@/components/NavBar';
|
||||
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
|
||||
import { white } from '@/utils/colors';
|
||||
|
||||
const PassportOnboardingScreen = lazy(
|
||||
() => import('@src/screens/aesop/PassportOnboardingScreen'),
|
||||
() => import('@/screens/aesop/PassportOnboardingScreen'),
|
||||
);
|
||||
|
||||
const aesopScreens = {
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import DevPrivateKeyScreen from '@src/screens/dev/DevPrivateKeyScreen';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
|
||||
import DevPrivateKeyScreen from '@/screens/dev/DevPrivateKeyScreen';
|
||||
import { black, white } from '@/utils/colors';
|
||||
|
||||
const DevFeatureFlagsScreen = lazy(
|
||||
() => import('@src/screens/dev/DevFeatureFlagsScreen'),
|
||||
() => import('@/screens/dev/DevFeatureFlagsScreen'),
|
||||
);
|
||||
const DevHapticFeedbackScreen = lazy(
|
||||
() => import('@src/screens/dev/DevHapticFeedback'),
|
||||
() => import('@/screens/dev/DevHapticFeedback'),
|
||||
);
|
||||
const DevSettingsScreen = lazy(
|
||||
() => import('@src/screens/dev/DevSettingsScreen'),
|
||||
);
|
||||
const MockDataScreen = lazy(() => import('@src/screens/dev/MockDataScreen'));
|
||||
const DevSettingsScreen = lazy(() => import('@/screens/dev/DevSettingsScreen'));
|
||||
const MockDataScreen = lazy(() => import('@/screens/dev/MockDataScreen'));
|
||||
const MockDataScreenDeepLink = lazy(
|
||||
() => import('@src/screens/dev/MockDataScreenDeepLink'),
|
||||
() => import('@/screens/dev/MockDataScreenDeepLink'),
|
||||
);
|
||||
|
||||
const devScreens = {
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { HomeNavBar } from '@src/components/NavBar';
|
||||
import { black } from '@src/utils/colors';
|
||||
|
||||
const DisclaimerScreen = lazy(
|
||||
() => import('@src/screens/home/DisclaimerScreen'),
|
||||
);
|
||||
const HomeScreen = lazy(() => import('@src/screens/home/HomeScreen'));
|
||||
import { HomeNavBar } from '@/components/NavBar';
|
||||
import { black } from '@/utils/colors';
|
||||
|
||||
const DisclaimerScreen = lazy(() => import('@/screens/home/DisclaimerScreen'));
|
||||
const HomeScreen = lazy(() => import('@/screens/home/HomeScreen'));
|
||||
const ProofHistoryDetailScreen = lazy(
|
||||
() => import('@src/screens/home/ProofHistoryDetailScreen'),
|
||||
() => import('@/screens/home/ProofHistoryDetailScreen'),
|
||||
);
|
||||
const ProofHistoryScreen = lazy(
|
||||
() => import('@src/screens/home/ProofHistoryScreen'),
|
||||
() => import('@/screens/home/ProofHistoryScreen'),
|
||||
);
|
||||
const homeScreens = {
|
||||
Disclaimer: {
|
||||
|
||||
@@ -4,26 +4,26 @@ import React, { Suspense, useEffect } from 'react';
|
||||
import { Platform, View } from 'react-native';
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
import { Text } from 'tamagui';
|
||||
|
||||
import type { StaticParamList } from '@react-navigation/native';
|
||||
import {
|
||||
createNavigationContainerRef,
|
||||
createStaticNavigation,
|
||||
} from '@react-navigation/native';
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||
import { DefaultNavBar } from '@src/components/NavBar';
|
||||
import AppLayout from '@src/layouts/AppLayout';
|
||||
import { getAesopScreens } from '@src/navigation/aesop';
|
||||
import devScreens from '@src/navigation/dev';
|
||||
import homeScreens from '@src/navigation/home';
|
||||
import miscScreens from '@src/navigation/misc';
|
||||
import passportScreens from '@src/navigation/passport';
|
||||
import proveScreens from '@src/navigation/prove';
|
||||
import recoveryScreens from '@src/navigation/recovery';
|
||||
import settingsScreens from '@src/navigation/settings';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { white } from '@src/utils/colors';
|
||||
import { setupUniversalLinkListenerInNavigation } from '@src/utils/deeplinks';
|
||||
|
||||
import { DefaultNavBar } from '@/components/NavBar';
|
||||
import AppLayout from '@/layouts/AppLayout';
|
||||
import { getAesopScreens } from '@/navigation/aesop';
|
||||
import devScreens from '@/navigation/dev';
|
||||
import homeScreens from '@/navigation/home';
|
||||
import miscScreens from '@/navigation/misc';
|
||||
import passportScreens from '@/navigation/passport';
|
||||
import proveScreens from '@/navigation/prove';
|
||||
import recoveryScreens from '@/navigation/recovery';
|
||||
import settingsScreens from '@/navigation/settings';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { white } from '@/utils/colors';
|
||||
import { setupUniversalLinkListenerInNavigation } from '@/utils/deeplinks';
|
||||
|
||||
export const navigationScreens = {
|
||||
...miscScreens,
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
import React, { lazy } from 'react';
|
||||
import { SystemBars } from 'react-native-edge-to-edge';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
|
||||
// Important: SplashScreen is imported directly and not lazy-loaded.
|
||||
// This is because it's used as a fallback for the Suspense boundary in the root navigator,
|
||||
// ensuring it's immediately available at startup.
|
||||
import SplashScreen from '@src/screens/misc/SplashScreen';
|
||||
import { black } from '@src/utils/colors';
|
||||
import SplashScreen from '@/screens/misc/SplashScreen';
|
||||
import { black } from '@/utils/colors';
|
||||
|
||||
const LaunchScreen = lazy(() => import('@src/screens/misc/LaunchScreen'));
|
||||
const LoadingScreen = lazy(() => import('@src/screens/misc/LoadingScreen'));
|
||||
const ModalScreen = lazy(() => import('@src/screens/misc/ModalScreen'));
|
||||
const LaunchScreen = lazy(() => import('@/screens/misc/LaunchScreen'));
|
||||
const LoadingScreen = lazy(() => import('@/screens/misc/LoadingScreen'));
|
||||
const ModalScreen = lazy(() => import('@/screens/misc/ModalScreen'));
|
||||
|
||||
const miscScreens = {
|
||||
Launch: {
|
||||
|
||||
@@ -1,29 +1,28 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
|
||||
const PassportCameraScreen = lazy(
|
||||
() => import('@src/screens/passport/PassportCameraScreen'),
|
||||
() => import('@/screens/passport/PassportCameraScreen'),
|
||||
);
|
||||
const PassportCameraTrouble = lazy(
|
||||
() => import('@src/screens/passport/PassportCameraTroubleScreen'),
|
||||
() => import('@/screens/passport/PassportCameraTroubleScreen'),
|
||||
);
|
||||
const PassportNFCScanScreen = lazy(
|
||||
() => import('@src/screens/passport/PassportNFCScanScreen'),
|
||||
() => import('@/screens/passport/PassportNFCScanScreen'),
|
||||
);
|
||||
const PassportNFCTrouble = lazy(
|
||||
() => import('@src/screens/passport/PassportNFCTroubleScreen'),
|
||||
() => import('@/screens/passport/PassportNFCTroubleScreen'),
|
||||
);
|
||||
const PassportOnboardingScreen = lazy(
|
||||
() => import('@src/screens/passport/PassportOnboardingScreen'),
|
||||
() => import('@/screens/passport/PassportOnboardingScreen'),
|
||||
);
|
||||
const UnsupportedPassportScreen = lazy(
|
||||
() => import('@src/screens/passport/UnsupportedPassportScreen'),
|
||||
() => import('@/screens/passport/UnsupportedPassportScreen'),
|
||||
);
|
||||
const NFCMethodSelectionScreen = lazy(
|
||||
() => import('@src/screens/passport/NFCMethodSelectionScreen'),
|
||||
() => import('@/screens/passport/NFCMethodSelectionScreen'),
|
||||
);
|
||||
|
||||
const passportScreens = {
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
|
||||
import { black, white } from '@/utils/colors';
|
||||
|
||||
const ConfirmBelongingScreen = lazy(
|
||||
() => import('@src/screens/prove/ConfirmBelongingScreen'),
|
||||
() => import('@/screens/prove/ConfirmBelongingScreen'),
|
||||
);
|
||||
const ProofRequestStatusScreen = lazy(
|
||||
() => import('@src/screens/prove/ProofRequestStatusScreen'),
|
||||
() => import('@/screens/prove/ProofRequestStatusScreen'),
|
||||
);
|
||||
const ProveScreen = lazy(() => import('@src/screens/prove/ProveScreen'));
|
||||
const ProveScreen = lazy(() => import('@/screens/prove/ProveScreen'));
|
||||
const QRCodeTroubleScreen = lazy(
|
||||
() => import('@src/screens/prove/QRCodeTroubleScreen'),
|
||||
() => import('@/screens/prove/QRCodeTroubleScreen'),
|
||||
);
|
||||
const QRCodeViewFinderScreen = lazy(
|
||||
() => import('@src/screens/prove/ViewFinderScreen'),
|
||||
() => import('@/screens/prove/ViewFinderScreen'),
|
||||
);
|
||||
|
||||
const proveScreens = {
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { black, slate300 } from '@src/utils/colors';
|
||||
|
||||
import { black, slate300 } from '@/utils/colors';
|
||||
|
||||
const AccountRecoveryChoiceScreen = lazy(
|
||||
() => import('@src/screens/recovery/AccountRecoveryChoiceScreen'),
|
||||
() => import('@/screens/recovery/AccountRecoveryChoiceScreen'),
|
||||
);
|
||||
const AccountRecoveryScreen = lazy(
|
||||
() => import('@src/screens/recovery/AccountRecoveryScreen'),
|
||||
() => import('@/screens/recovery/AccountRecoveryScreen'),
|
||||
);
|
||||
const AccountVerifiedSuccessScreen = lazy(
|
||||
() => import('@src/screens/recovery/AccountVerifiedSuccessScreen'),
|
||||
() => import('@/screens/recovery/AccountVerifiedSuccessScreen'),
|
||||
);
|
||||
const PassportDataNotFound = lazy(
|
||||
() => import('@src/screens/recovery/PassportDataNotFoundScreen'),
|
||||
() => import('@/screens/recovery/PassportDataNotFoundScreen'),
|
||||
);
|
||||
const RecoverWithPhraseScreen = lazy(
|
||||
() => import('@src/screens/recovery/RecoverWithPhraseScreen'),
|
||||
() => import('@/screens/recovery/RecoverWithPhraseScreen'),
|
||||
);
|
||||
const SaveRecoveryPhraseScreen = lazy(
|
||||
() => import('@src/screens/recovery/SaveRecoveryPhraseScreen'),
|
||||
() => import('@/screens/recovery/SaveRecoveryPhraseScreen'),
|
||||
);
|
||||
|
||||
const recoveryScreens = {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
|
||||
const PassportDataNotFound = lazy(
|
||||
() => import('@src/screens/recovery/PassportDataNotFoundScreen'),
|
||||
() => import('@/screens/recovery/PassportDataNotFoundScreen'),
|
||||
);
|
||||
|
||||
const recoveryScreens = {
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { black, slate300, white } from '@src/utils/colors';
|
||||
|
||||
import { black, slate300, white } from '@/utils/colors';
|
||||
|
||||
const CloudBackupScreen = lazy(
|
||||
() => import('@src/screens/settings/CloudBackupScreen'),
|
||||
() => import('@/screens/settings/CloudBackupScreen'),
|
||||
);
|
||||
const ManageDocumentsScreen = lazy(
|
||||
() => import('@src/screens/settings/ManageDocumentsScreen'),
|
||||
() => import('@/screens/settings/ManageDocumentsScreen'),
|
||||
);
|
||||
const PassportDataInfoScreen = lazy(
|
||||
() => import('@src/screens/settings/PassportDataInfoScreen'),
|
||||
);
|
||||
const SettingsScreen = lazy(
|
||||
() => import('@src/screens/settings/SettingsScreen'),
|
||||
() => import('@/screens/settings/PassportDataInfoScreen'),
|
||||
);
|
||||
const SettingsScreen = lazy(() => import('@/screens/settings/SettingsScreen'));
|
||||
const ShowRecoveryPhraseScreen = lazy(
|
||||
() => import('@src/screens/settings/ShowRecoveryPhraseScreen'),
|
||||
() => import('@/screens/settings/ShowRecoveryPhraseScreen'),
|
||||
);
|
||||
|
||||
const settingsScreens = {
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import { lazy } from 'react';
|
||||
|
||||
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
|
||||
import { black, white } from '@/utils/colors';
|
||||
|
||||
const ManageDocumentsScreen = lazy(
|
||||
() => import('@src/screens/settings/ManageDocumentsScreen'),
|
||||
() => import('@/screens/settings/ManageDocumentsScreen'),
|
||||
);
|
||||
const PassportDataInfoScreen = lazy(
|
||||
() => import('@src/screens/settings/PassportDataInfoScreen'),
|
||||
);
|
||||
const SettingsScreen = lazy(
|
||||
() => import('@src/screens/settings/SettingsScreen'),
|
||||
() => import('@/screens/settings/PassportDataInfoScreen'),
|
||||
);
|
||||
const SettingsScreen = lazy(() => import('@/screens/settings/SettingsScreen'));
|
||||
|
||||
const settingsScreens = {
|
||||
ManageDocuments: {
|
||||
|
||||
@@ -12,10 +12,10 @@ import React, {
|
||||
import ReactNativeBiometrics from 'react-native-biometrics';
|
||||
import Keychain from 'react-native-keychain';
|
||||
|
||||
import { AuthEvents } from '@src/consts/analytics';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import type { Mnemonic } from '@src/types/mnemonic';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { AuthEvents } from '@/consts/analytics';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import type { Mnemonic } from '@/types/mnemonic';
|
||||
import analytics from '@/utils/analytics';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ import React, {
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
import { AuthEvents } from '@src/consts/analytics';
|
||||
import type { Mnemonic } from '@src/types/mnemonic';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { AuthEvents } from '@/consts/analytics';
|
||||
import type { Mnemonic } from '@/types/mnemonic';
|
||||
import analytics from '@/utils/analytics';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React, { createContext, useEffect } from 'react';
|
||||
|
||||
import { useProofHistoryStore } from '@src/stores/proofHistoryStore';
|
||||
import { useProofHistoryStore } from '@/stores/proofHistoryStore';
|
||||
|
||||
export const DatabaseContext = createContext(null);
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import messaging from '@react-native-firebase/messaging';
|
||||
import { NotificationEvents } from '@src/consts/analytics';
|
||||
import analytics from '@src/utils/analytics';
|
||||
|
||||
import { NotificationEvents } from '@/consts/analytics';
|
||||
import analytics from '@/utils/analytics';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
parseCertificateSimple,
|
||||
} from '@selfxyz/common/utils';
|
||||
|
||||
import { unsafe_getPrivateKey, useAuth } from '@src/providers/authProvider';
|
||||
import { unsafe_getPrivateKey, useAuth } from '@/providers/authProvider';
|
||||
|
||||
// Create safe wrapper functions to prevent undefined errors during early initialization
|
||||
// These need to be declared early to avoid dependency issues
|
||||
@@ -234,7 +234,7 @@ export const PassportProvider = ({ children }: PassportProviderProps) => {
|
||||
export async function checkAndUpdateRegistrationStates(): Promise<void> {
|
||||
// Lazy import to avoid circular dependency
|
||||
const { checkAndUpdateRegistrationStates: validateDocCheckAndUpdate } =
|
||||
await import('@src/utils/proving/validateDocument');
|
||||
await import('@/utils/proving/validateDocument');
|
||||
return validateDocCheckAndUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React, { createContext, useContext, useEffect, useState } from 'react';
|
||||
|
||||
import { initRemoteConfig } from '@src/RemoteConfig';
|
||||
import { initRemoteConfig } from '@/RemoteConfig';
|
||||
|
||||
interface RemoteConfigContextValue {
|
||||
isInitialized: boolean;
|
||||
|
||||
@@ -5,20 +5,20 @@ import React, { useEffect, useRef } from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { SystemBars } from 'react-native-edge-to-edge';
|
||||
|
||||
import passportOnboardingAnimation from '@src/assets/animations/passport_onboarding.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import TextsContainer from '@src/components/TextsContainer';
|
||||
import Additional from '@src/components/typography/Additional';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { DescriptionTitle } from '@src/components/typography/DescriptionTitle';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import Scan from '@src/images/icons/passport_camera_scan.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@src/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import passportOnboardingAnimation from '@/assets/animations/passport_onboarding.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import TextsContainer from '@/components/TextsContainer';
|
||||
import Additional from '@/components/typography/Additional';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { DescriptionTitle } from '@/components/typography/DescriptionTitle';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import Scan from '@/images/icons/passport_camera_scan.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
|
||||
interface PassportOnboardingScreenProps {}
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ import {
|
||||
YStack,
|
||||
} from 'tamagui';
|
||||
|
||||
import type { FeatureFlagValue } from '@src/RemoteConfig';
|
||||
import type { FeatureFlagValue } from '@/RemoteConfig';
|
||||
import {
|
||||
clearAllLocalOverrides,
|
||||
getAllFeatureFlags,
|
||||
refreshRemoteConfig,
|
||||
setLocalOverride,
|
||||
} from '@src/RemoteConfig';
|
||||
import { textBlack } from '@src/utils/colors';
|
||||
} from '@/RemoteConfig';
|
||||
import { textBlack } from '@/utils/colors';
|
||||
|
||||
interface FeatureFlag {
|
||||
key: string;
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
notificationSuccess,
|
||||
notificationWarning,
|
||||
selectionChange,
|
||||
} from '@src/utils/haptic';
|
||||
} from '@/utils/haptic';
|
||||
|
||||
const StyledButton = styled(Button, {
|
||||
width: '75%',
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { Button, Text, XStack, YStack } from 'tamagui';
|
||||
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import { unsafe_getPrivateKey } from '@src/providers/authProvider';
|
||||
import { black, slate50, slate200, teal500, white } from '@src/utils/colors';
|
||||
import { confirmTap } from '@src/utils/haptic';
|
||||
|
||||
import { unsafe_getPrivateKey } from '@/providers/authProvider';
|
||||
import { black, slate50, slate200, teal500, white } from '@/utils/colors';
|
||||
import { confirmTap } from '@/utils/haptic';
|
||||
|
||||
interface DevPrivateKeyScreen {}
|
||||
|
||||
|
||||
@@ -5,15 +5,16 @@ import React, { useMemo, useState } from 'react';
|
||||
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
||||
import { Alert, ScrollView } from 'react-native';
|
||||
import { Adapt, Button, Select, Sheet, Text, XStack, YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
|
||||
import BugIcon from '@src/images/icons/bug_icon.svg';
|
||||
import IdIcon from '@src/images/icons/id_icon.svg';
|
||||
import WarningIcon from '@src/images/icons/warning.svg';
|
||||
import type { RootStackParamList } from '@src/navigation';
|
||||
import { unsafe_clearSecrets } from '@src/providers/authProvider';
|
||||
import { usePassport } from '@src/providers/passportDataProvider';
|
||||
import { Check, ChevronDown, ChevronRight } from '@tamagui/lucide-icons';
|
||||
|
||||
import BugIcon from '@/images/icons/bug_icon.svg';
|
||||
import IdIcon from '@/images/icons/id_icon.svg';
|
||||
import WarningIcon from '@/images/icons/warning.svg';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { unsafe_clearSecrets } from '@/providers/authProvider';
|
||||
import { usePassport } from '@/providers/passportDataProvider';
|
||||
import {
|
||||
red500,
|
||||
slate100,
|
||||
@@ -25,9 +26,8 @@ import {
|
||||
slate900,
|
||||
white,
|
||||
yellow500,
|
||||
} from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { Check, ChevronDown, ChevronRight } from '@tamagui/lucide-icons';
|
||||
} from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
interface DevSettingsScreenProps extends PropsWithChildren {
|
||||
color?: string;
|
||||
|
||||
@@ -17,6 +17,8 @@ import {
|
||||
XStack,
|
||||
YStack,
|
||||
} from 'tamagui';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { ChevronDown, Minus, Plus, X } from '@tamagui/lucide-icons';
|
||||
|
||||
import { countryCodes } from '@selfxyz/common/constants';
|
||||
import type { IdDocInput } from '@selfxyz/common/utils';
|
||||
@@ -27,16 +29,15 @@ import {
|
||||
initPassportDataParsing,
|
||||
} from '@selfxyz/common/utils/passports';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import { MockDataEvents } from '@src/consts/analytics';
|
||||
import SelfDevCard from '@src/images/card-dev.svg';
|
||||
import IdIcon from '@src/images/icons/id_icon.svg';
|
||||
import NoteIcon from '@src/images/icons/note.svg';
|
||||
import { storePassportData } from '@src/providers/passportDataProvider';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import { MockDataEvents } from '@/consts/analytics';
|
||||
import SelfDevCard from '@/images/card-dev.svg';
|
||||
import IdIcon from '@/images/icons/id_icon.svg';
|
||||
import NoteIcon from '@/images/icons/note.svg';
|
||||
import { storePassportData } from '@/providers/passportDataProvider';
|
||||
import analytics from '@/utils/analytics';
|
||||
import {
|
||||
black,
|
||||
borderColor,
|
||||
@@ -48,11 +49,10 @@ import {
|
||||
textBlack,
|
||||
white,
|
||||
zinc400,
|
||||
} from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { dinot, plexMono } from '@src/utils/fonts';
|
||||
import { buttonTap, selectionChange } from '@src/utils/haptic';
|
||||
import { ChevronDown, Minus, Plus, X } from '@tamagui/lucide-icons';
|
||||
} from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { dinot, plexMono } from '@/utils/fonts';
|
||||
import { buttonTap, selectionChange } from '@/utils/haptic';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -6,22 +6,22 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { ActivityIndicator, View } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { ScrollView, Text, XStack, YStack } from 'tamagui';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
|
||||
import { countryCodes } from '@selfxyz/common/constants';
|
||||
import type { IdDocInput } from '@selfxyz/common/utils';
|
||||
import { genMockIdDocAndInitDataParsing } from '@selfxyz/common/utils/passports';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { MockDataEvents } from '@src/consts/analytics';
|
||||
import { storePassportData } from '@src/providers/passportDataProvider';
|
||||
import useUserStore from '@src/stores/userStore';
|
||||
import { black, borderColor, white } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { MockDataEvents } from '@/consts/analytics';
|
||||
import { storePassportData } from '@/providers/passportDataProvider';
|
||||
import useUserStore from '@/stores/userStore';
|
||||
import { black, borderColor, white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
|
||||
const MockDataScreenDeepLink: React.FC = () => {
|
||||
const navigation = useNavigation();
|
||||
|
||||
@@ -4,17 +4,17 @@ import LottieView from 'lottie-react-native';
|
||||
import React, { useEffect } from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import warningAnimation from '@src/assets/animations/warning.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import Caution from '@src/components/typography/Caution';
|
||||
import { SubHeader } from '@src/components/typography/SubHeader';
|
||||
import { AppEvents } from '@src/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { confirmTap, notificationWarning } from '@src/utils/haptic';
|
||||
|
||||
import warningAnimation from '@/assets/animations/warning.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import Caution from '@/components/typography/Caution';
|
||||
import { SubHeader } from '@/components/typography/SubHeader';
|
||||
import { AppEvents } from '@/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { confirmTap, notificationWarning } from '@/utils/haptic';
|
||||
|
||||
const DisclaimerScreen: React.FC = () => {
|
||||
const navigation = useNavigation();
|
||||
|
||||
@@ -3,33 +3,27 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Button, styled, YStack } from 'tamagui';
|
||||
|
||||
import {
|
||||
useFocusEffect,
|
||||
useNavigation,
|
||||
usePreventRemove,
|
||||
} from '@react-navigation/native';
|
||||
import { pressedStyle } from '@src/components/buttons/pressedStyle';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import { ProofEvents } from '@src/consts/analytics';
|
||||
import { useAppUpdates } from '@src/hooks/useAppUpdates';
|
||||
import useConnectionModal from '@src/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import SelfCard from '@src/images/card-style-1.svg';
|
||||
import ScanIcon from '@src/images/icons/qr_scan.svg';
|
||||
import WarnIcon from '@src/images/icons/warning.svg';
|
||||
import { usePassport } from '@src/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import {
|
||||
amber500,
|
||||
black,
|
||||
neutral700,
|
||||
slate800,
|
||||
white,
|
||||
} from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
|
||||
import { pressedStyle } from '@/components/buttons/pressedStyle';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import { ProofEvents } from '@/consts/analytics';
|
||||
import { useAppUpdates } from '@/hooks/useAppUpdates';
|
||||
import useConnectionModal from '@/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import SelfCard from '@/images/card-style-1.svg';
|
||||
import ScanIcon from '@/images/icons/qr_scan.svg';
|
||||
import WarnIcon from '@/images/icons/warning.svg';
|
||||
import { usePassport } from '@/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { amber500, black, neutral700, slate800, white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
|
||||
const ScanButton = styled(Button, {
|
||||
borderRadius: 20,
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { Card, Image, Text, XStack, YStack } from 'tamagui';
|
||||
import { CheckSquare2, Info, Wallet } from '@tamagui/lucide-icons';
|
||||
|
||||
import type { ProofHistory } from '@src/stores/proof-types';
|
||||
import { ProofStatus } from '@src/stores/proof-types';
|
||||
import type { ProofHistory } from '@/stores/proof-types';
|
||||
import { ProofStatus } from '@/stores/proof-types';
|
||||
import {
|
||||
black,
|
||||
blue100,
|
||||
@@ -18,9 +19,8 @@ import {
|
||||
white,
|
||||
zinc400,
|
||||
zinc500,
|
||||
} from '@src/utils/colors';
|
||||
import { advercase, dinot, plexMono } from '@src/utils/fonts';
|
||||
import { CheckSquare2, Info, Wallet } from '@tamagui/lucide-icons';
|
||||
} from '@/utils/colors';
|
||||
import { advercase, dinot, plexMono } from '@/utils/fonts';
|
||||
|
||||
type ProofHistoryDetailScreenProps = {
|
||||
route: {
|
||||
|
||||
@@ -9,12 +9,13 @@ import {
|
||||
} from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Card, Image, Text, View, XStack, YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import type { ProofHistory } from '@src/stores/proof-types';
|
||||
import { ProofStatus } from '@src/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@src/stores/proofHistoryStore';
|
||||
import { CheckSquare2, Wallet, XCircle } from '@tamagui/lucide-icons';
|
||||
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import type { ProofHistory } from '@/stores/proof-types';
|
||||
import { ProofStatus } from '@/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@/stores/proofHistoryStore';
|
||||
import {
|
||||
black,
|
||||
blue100,
|
||||
@@ -25,10 +26,9 @@ import {
|
||||
slate300,
|
||||
slate500,
|
||||
white,
|
||||
} from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { CheckSquare2, Wallet, XCircle } from '@tamagui/lucide-icons';
|
||||
} from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
|
||||
type Section = {
|
||||
title: string;
|
||||
|
||||
@@ -6,21 +6,17 @@ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Anchor, Text, YStack } from 'tamagui';
|
||||
|
||||
import AbstractButton from '@src/components/buttons/AbstractButton';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import { AppEvents } from '@src/consts/analytics';
|
||||
import {
|
||||
privacyUrl,
|
||||
supportedBiometricIdsUrl,
|
||||
termsUrl,
|
||||
} from '@src/consts/links';
|
||||
import useConnectionModal from '@src/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import Logo from '@src/images/logo.svg';
|
||||
import { black, slate400, white, zinc800, zinc900 } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { advercase, dinot } from '@src/utils/fonts';
|
||||
import AbstractButton from '@/components/buttons/AbstractButton';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import { AppEvents } from '@/consts/analytics';
|
||||
import { privacyUrl, supportedBiometricIdsUrl, termsUrl } from '@/consts/links';
|
||||
import useConnectionModal from '@/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import Logo from '@/images/logo.svg';
|
||||
import { black, slate400, white, zinc800, zinc900 } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { advercase, dinot } from '@/utils/fonts';
|
||||
|
||||
const LaunchScreen: React.FC = () => {
|
||||
useConnectionModal();
|
||||
|
||||
@@ -5,24 +5,24 @@ import React, { useEffect, useState } from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Text, YStack } from 'tamagui';
|
||||
import type { StaticScreenProps } from '@react-navigation/native';
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
|
||||
import type { PassportData } from '@selfxyz/common/types';
|
||||
|
||||
import type { StaticScreenProps } from '@react-navigation/native';
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
import failAnimation from '@src/assets/animations/loading/fail.json';
|
||||
import proveLoadingAnimation from '@src/assets/animations/loading/prove.json';
|
||||
import successAnimation from '@src/assets/animations/loading/success.json';
|
||||
import CloseWarningIcon from '@src/images/icons/close-warning.svg';
|
||||
import { loadPassportDataAndSecret } from '@src/providers/passportDataProvider';
|
||||
import { black, slate400, white, zinc500, zinc900 } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { advercase, dinot } from '@src/utils/fonts';
|
||||
import { loadingScreenProgress } from '@src/utils/haptic';
|
||||
import { setupNotifications } from '@src/utils/notifications/notificationService';
|
||||
import { getLoadingScreenText } from '@src/utils/proving/loadingScreenStateText';
|
||||
import type { ProvingStateType } from '@src/utils/proving/provingMachine';
|
||||
import { useProvingStore } from '@src/utils/proving/provingMachine';
|
||||
import failAnimation from '@/assets/animations/loading/fail.json';
|
||||
import proveLoadingAnimation from '@/assets/animations/loading/prove.json';
|
||||
import successAnimation from '@/assets/animations/loading/success.json';
|
||||
import CloseWarningIcon from '@/images/icons/close-warning.svg';
|
||||
import { loadPassportDataAndSecret } from '@/providers/passportDataProvider';
|
||||
import { black, slate400, white, zinc500, zinc900 } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { advercase, dinot } from '@/utils/fonts';
|
||||
import { loadingScreenProgress } from '@/utils/haptic';
|
||||
import { setupNotifications } from '@/utils/notifications/notificationService';
|
||||
import { getLoadingScreenText } from '@/utils/proving/loadingScreenStateText';
|
||||
import type { ProvingStateType } from '@/utils/proving/provingMachine';
|
||||
import { useProvingStore } from '@/utils/proving/provingMachine';
|
||||
|
||||
type LoadingScreenProps = StaticScreenProps<{}>;
|
||||
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
import { styled, View, XStack, YStack } from 'tamagui';
|
||||
|
||||
import type { StaticScreenProps } from '@react-navigation/native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import ModalClose from '@src/images/icons/modal_close.svg';
|
||||
import LogoInversed from '@src/images/logo_inversed.svg';
|
||||
import { white } from '@src/utils/colors';
|
||||
import { confirmTap, impactLight } from '@src/utils/haptic';
|
||||
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import ModalClose from '@/images/icons/modal_close.svg';
|
||||
import LogoInversed from '@/images/logo_inversed.svg';
|
||||
import { white } from '@/utils/colors';
|
||||
import { confirmTap, impactLight } from '@/utils/haptic';
|
||||
import {
|
||||
getModalCallbacks,
|
||||
unregisterModalCallbacks,
|
||||
} from '@src/utils/modalCallbackRegistry';
|
||||
} from '@/utils/modalCallbackRegistry';
|
||||
|
||||
const ModalBackDrop = styled(View, {
|
||||
display: 'flex',
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
import LottieView from 'lottie-react-native';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
import splashAnimation from '@src/assets/animations/splash.json';
|
||||
import type { RootStackParamList } from '@src/navigation';
|
||||
import { useAuth } from '@src/providers/authProvider';
|
||||
|
||||
import splashAnimation from '@/assets/animations/splash.json';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useAuth } from '@/providers/authProvider';
|
||||
import {
|
||||
checkAndUpdateRegistrationStates,
|
||||
checkIfAnyDocumentsNeedMigration,
|
||||
hasAnyValidRegisteredDocument,
|
||||
initializeNativeModules,
|
||||
migrateFromLegacyStorage,
|
||||
} from '@src/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import { black } from '@src/utils/colors';
|
||||
import { impactLight } from '@src/utils/haptic';
|
||||
} from '@/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { black } from '@/utils/colors';
|
||||
import { impactLight } from '@/utils/haptic';
|
||||
|
||||
const SplashScreen: React.FC = ({}) => {
|
||||
const navigation =
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Platform, ScrollView } from 'react-native';
|
||||
import { Input, YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import useUserStore from '@src/stores/userStore';
|
||||
import { white } from '@src/utils/colors';
|
||||
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import useUserStore from '@/stores/userStore';
|
||||
import { white } from '@/utils/colors';
|
||||
|
||||
type NFCParams = {
|
||||
skipPACE?: boolean;
|
||||
|
||||
@@ -4,27 +4,27 @@ import LottieView from 'lottie-react-native';
|
||||
import React, { useCallback, useRef } from 'react';
|
||||
import { Platform, StyleSheet } from 'react-native';
|
||||
import { View, XStack, YStack } from 'tamagui';
|
||||
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
||||
|
||||
import { formatDateToYYMMDD } from '@selfxyz/mobile-sdk-alpha';
|
||||
|
||||
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
||||
import passportScanAnimation from '@src/assets/animations/passport_scan.json';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import type { PassportCameraProps } from '@src/components/native/PassportCamera';
|
||||
import { PassportCamera } from '@src/components/native/PassportCamera';
|
||||
import Additional from '@src/components/typography/Additional';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import Scan from '@src/images/icons/passport_camera_scan.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import useUserStore from '@src/stores/userStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, slate400, slate800, white } from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import { checkScannedInfo } from '@src/utils/utils';
|
||||
import passportScanAnimation from '@/assets/animations/passport_scan.json';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import type { PassportCameraProps } from '@/components/native/PassportCamera';
|
||||
import { PassportCamera } from '@/components/native/PassportCamera';
|
||||
import Additional from '@/components/typography/Additional';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import Scan from '@/images/icons/passport_camera_scan.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import useUserStore from '@/stores/userStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, slate400, slate800, white } from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
import { checkScannedInfo } from '@/utils/utils';
|
||||
|
||||
interface PassportNFCScanScreen {}
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import type { TipProps } from '@src/components/Tips';
|
||||
import Tips from '@src/components/Tips';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import Activity from '@src/images/icons/activity.svg';
|
||||
import PassportCameraBulb from '@src/images/icons/passport_camera_bulb.svg';
|
||||
import PassportCameraScan from '@src/images/icons/passport_camera_scan.svg';
|
||||
import QrScan from '@src/images/icons/qr_scan.svg';
|
||||
import Star from '@src/images/icons/star.svg';
|
||||
import SimpleScrolledTitleLayout from '@src/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { slate500 } from '@src/utils/colors';
|
||||
import type { TipProps } from '@/components/Tips';
|
||||
import Tips from '@/components/Tips';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import Activity from '@/images/icons/activity.svg';
|
||||
import PassportCameraBulb from '@/images/icons/passport_camera_bulb.svg';
|
||||
import PassportCameraScan from '@/images/icons/passport_camera_scan.svg';
|
||||
import QrScan from '@/images/icons/qr_scan.svg';
|
||||
import Star from '@/images/icons/star.svg';
|
||||
import SimpleScrolledTitleLayout from '@/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { slate500 } from '@/utils/colors';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -12,43 +12,43 @@ import {
|
||||
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
||||
import NfcManager from 'react-native-nfc-manager';
|
||||
import { Button, Image, XStack } from 'tamagui';
|
||||
|
||||
import type { PassportData } from '@selfxyz/common/types';
|
||||
import { getSKIPEM } from '@selfxyz/common/utils/csca';
|
||||
import { initPassportDataParsing } from '@selfxyz/common/utils/passports';
|
||||
|
||||
import type { RouteProp } from '@react-navigation/native';
|
||||
import {
|
||||
useFocusEffect,
|
||||
useNavigation,
|
||||
useRoute,
|
||||
} from '@react-navigation/native';
|
||||
import passportVerifyAnimation from '@src/assets/animations/passport_verify.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import TextsContainer from '@src/components/TextsContainer';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import NFC_IMAGE from '@src/images/nfc.png';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { storePassportData } from '@src/providers/passportDataProvider';
|
||||
import useUserStore from '@src/stores/userStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, slate100, slate400, slate500, white } from '@src/utils/colors';
|
||||
import { dinot } from '@src/utils/fonts';
|
||||
import { CircleHelp } from '@tamagui/lucide-icons';
|
||||
|
||||
import type { PassportData } from '@selfxyz/common/types';
|
||||
import { getSKIPEM } from '@selfxyz/common/utils/csca';
|
||||
import { initPassportDataParsing } from '@selfxyz/common/utils/passports';
|
||||
|
||||
import passportVerifyAnimation from '@/assets/animations/passport_verify.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import TextsContainer from '@/components/TextsContainer';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import NFC_IMAGE from '@/images/nfc.png';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { storePassportData } from '@/providers/passportDataProvider';
|
||||
import useUserStore from '@/stores/userStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, slate100, slate400, slate500, white } from '@/utils/colors';
|
||||
import { dinot } from '@/utils/fonts';
|
||||
import {
|
||||
buttonTap,
|
||||
feedbackSuccess,
|
||||
feedbackUnsuccessful,
|
||||
impactLight,
|
||||
} from '@src/utils/haptic';
|
||||
import { registerModalCallbacks } from '@src/utils/modalCallbackRegistry';
|
||||
import { parseScanResponse, scan } from '@src/utils/nfcScanner';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import { CircleHelp } from '@tamagui/lucide-icons';
|
||||
} from '@/utils/haptic';
|
||||
import { registerModalCallbacks } from '@/utils/modalCallbackRegistry';
|
||||
import { parseScanResponse, scan } from '@/utils/nfcScanner';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
import React from 'react';
|
||||
import { Image } from 'tamagui';
|
||||
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import TextsContainer from '@src/components/TextsContainer';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import NFC_IMAGE from '@src/images/nfc.png';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@src/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import TextsContainer from '@/components/TextsContainer';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import NFC_IMAGE from '@/images/nfc.png';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
|
||||
interface PassportNFCScanScreenProps {}
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import React, { useEffect } from 'react';
|
||||
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
||||
import { YStack } from 'tamagui';
|
||||
|
||||
import type { TipProps } from '@src/components/Tips';
|
||||
import Tips from '@src/components/Tips';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import SimpleScrolledTitleLayout from '@src/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { slate500 } from '@src/utils/colors';
|
||||
import type { TipProps } from '@/components/Tips';
|
||||
import Tips from '@/components/Tips';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import SimpleScrolledTitleLayout from '@/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { slate500 } from '@/utils/colors';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -4,21 +4,21 @@ import LottieView from 'lottie-react-native';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { SystemBars } from 'react-native-edge-to-edge';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import passportOnboardingAnimation from '@src/assets/animations/passport_onboarding.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import TextsContainer from '@src/components/TextsContainer';
|
||||
import Additional from '@src/components/typography/Additional';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@src/utils/colors';
|
||||
import { impactLight } from '@src/utils/haptic';
|
||||
|
||||
import passportOnboardingAnimation from '@/assets/animations/passport_onboarding.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import TextsContainer from '@/components/TextsContainer';
|
||||
import Additional from '@/components/typography/Additional';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { black, slate100, white } from '@/utils/colors';
|
||||
import { impactLight } from '@/utils/haptic';
|
||||
|
||||
interface PassportOnboardingScreenProps {}
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
import LottieView from 'lottie-react-native';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import warnAnimation from '@src/assets/animations/warning.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@src/screens/prove/ProofRequestStatusScreen';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { notificationError } from '@src/utils/haptic';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import warnAnimation from '@/assets/animations/warning.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@/screens/prove/ProofRequestStatusScreen';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { notificationError } from '@/utils/haptic';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
import LottieView from 'lottie-react-native';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { ActivityIndicator, View } from 'react-native';
|
||||
|
||||
import type { StaticScreenProps } from '@react-navigation/native';
|
||||
import { usePreventRemove } from '@react-navigation/native';
|
||||
import successAnimation from '@src/assets/animations/loading/success.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { PassportEvents, ProofEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@src/screens/prove/ProofRequestStatusScreen';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { notificationSuccess } from '@src/utils/haptic';
|
||||
|
||||
import successAnimation from '@/assets/animations/loading/success.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { PassportEvents, ProofEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@/screens/prove/ProofRequestStatusScreen';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { notificationSuccess } from '@/utils/haptic';
|
||||
import {
|
||||
getFCMToken,
|
||||
requestNotificationPermission,
|
||||
} from '@src/utils/notifications/notificationService';
|
||||
import { useProvingStore } from '@src/utils/proving/provingMachine';
|
||||
} from '@/utils/notifications/notificationService';
|
||||
import { useProvingStore } from '@/utils/proving/provingMachine';
|
||||
|
||||
type ConfirmBelongingScreenProps = StaticScreenProps<{}>;
|
||||
|
||||
|
||||
@@ -5,30 +5,30 @@ import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Linking, StyleSheet, View } from 'react-native';
|
||||
import { SystemBars } from 'react-native-edge-to-edge';
|
||||
import { ScrollView, Spinner } from 'tamagui';
|
||||
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
import loadingAnimation from '@src/assets/animations/loading/misc.json';
|
||||
import failAnimation from '@src/assets/animations/proof_failed.json';
|
||||
import succesAnimation from '@src/assets/animations/proof_success.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { typography } from '@src/components/typography/styles';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { ProofEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { ProofStatus } from '@src/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@src/stores/proofHistoryStore';
|
||||
import { useSelfAppStore } from '@src/stores/selfAppStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
|
||||
import loadingAnimation from '@/assets/animations/loading/misc.json';
|
||||
import failAnimation from '@/assets/animations/proof_failed.json';
|
||||
import succesAnimation from '@/assets/animations/proof_success.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { typography } from '@/components/typography/styles';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { ProofEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { ProofStatus } from '@/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@/stores/proofHistoryStore';
|
||||
import { useSelfAppStore } from '@/stores/selfAppStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import {
|
||||
buttonTap,
|
||||
notificationError,
|
||||
notificationSuccess,
|
||||
} from '@src/utils/haptic';
|
||||
import { useProvingStore } from '@src/utils/proving/provingMachine';
|
||||
} from '@/utils/haptic';
|
||||
import { useProvingStore } from '@/utils/proving/provingMachine';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -15,28 +15,28 @@ import type {
|
||||
} from 'react-native';
|
||||
import { ScrollView, StyleSheet, TouchableOpacity } from 'react-native';
|
||||
import { Image, Text, View, XStack, YStack } from 'tamagui';
|
||||
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
||||
import { Eye, EyeOff } from '@tamagui/lucide-icons';
|
||||
|
||||
import type { SelfAppDisclosureConfig } from '@selfxyz/common/utils/appType';
|
||||
import { formatEndpoint } from '@selfxyz/common/utils/scope';
|
||||
|
||||
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
||||
import miscAnimation from '@src/assets/animations/loading/misc.json';
|
||||
import { HeldPrimaryButtonProveScreen } from '@src/components/buttons/HeldPrimaryButtonProveScreen';
|
||||
import Disclosures from '@src/components/Disclosures';
|
||||
import { BodyText } from '@src/components/typography/BodyText';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import { ProofEvents } from '@src/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { setDefaultDocumentTypeIfNeeded } from '@src/providers/passportDataProvider';
|
||||
import { ProofStatus } from '@src/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@src/stores/proofHistoryStore';
|
||||
import { useSelfAppStore } from '@src/stores/selfAppStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, slate300, white } from '@src/utils/colors';
|
||||
import { formatUserId } from '@src/utils/formatUserId';
|
||||
import { buttonTap } from '@src/utils/haptic';
|
||||
import { useProvingStore } from '@src/utils/proving/provingMachine';
|
||||
import { Eye, EyeOff } from '@tamagui/lucide-icons';
|
||||
import miscAnimation from '@/assets/animations/loading/misc.json';
|
||||
import { HeldPrimaryButtonProveScreen } from '@/components/buttons/HeldPrimaryButtonProveScreen';
|
||||
import Disclosures from '@/components/Disclosures';
|
||||
import { BodyText } from '@/components/typography/BodyText';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import { ProofEvents } from '@/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { setDefaultDocumentTypeIfNeeded } from '@/providers/passportDataProvider';
|
||||
import { ProofStatus } from '@/stores/proof-types';
|
||||
import { useProofHistoryStore } from '@/stores/proofHistoryStore';
|
||||
import { useSelfAppStore } from '@/stores/selfAppStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, slate300, white } from '@/utils/colors';
|
||||
import { formatUserId } from '@/utils/formatUserId';
|
||||
import { buttonTap } from '@/utils/haptic';
|
||||
import { useProvingStore } from '@/utils/proving/provingMachine';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import type { TipProps } from '@src/components/Tips';
|
||||
import Tips from '@src/components/Tips';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import SimpleScrolledTitleLayout from '@src/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { slate500 } from '@src/utils/colors';
|
||||
import type { TipProps } from '@/components/Tips';
|
||||
import Tips from '@/components/Tips';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import SimpleScrolledTitleLayout from '@/layouts/SimpleScrolledTitleLayout';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { slate500 } from '@/utils/colors';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -4,28 +4,28 @@ import LottieView from 'lottie-react-native';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { View, XStack, YStack } from 'tamagui';
|
||||
|
||||
import {
|
||||
useFocusEffect,
|
||||
useIsFocused,
|
||||
useNavigation,
|
||||
} from '@react-navigation/native';
|
||||
import qrScanAnimation from '@src/assets/animations/qr_scan.json';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import type { QRCodeScannerViewProps } from '@src/components/native/QRCodeScanner';
|
||||
import { QRCodeScannerView } from '@src/components/native/QRCodeScanner';
|
||||
import Additional from '@src/components/typography/Additional';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { ProofEvents } from '@src/consts/analytics';
|
||||
import useConnectionModal from '@src/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import QRScan from '@src/images/icons/qr_code.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { useSelfAppStore } from '@src/stores/selfAppStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, slate800, white } from '@src/utils/colors';
|
||||
import { parseAndValidateUrlParams } from '@src/utils/deeplinks';
|
||||
|
||||
import qrScanAnimation from '@/assets/animations/qr_scan.json';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import type { QRCodeScannerViewProps } from '@/components/native/QRCodeScanner';
|
||||
import { QRCodeScannerView } from '@/components/native/QRCodeScanner';
|
||||
import Additional from '@/components/typography/Additional';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { ProofEvents } from '@/consts/analytics';
|
||||
import useConnectionModal from '@/hooks/useConnectionModal';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import QRScan from '@/images/icons/qr_code.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { useSelfAppStore } from '@/stores/selfAppStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, slate800, white } from '@/utils/colors';
|
||||
import { parseAndValidateUrlParams } from '@/utils/deeplinks';
|
||||
|
||||
interface QRCodeViewFinderScreenProps {}
|
||||
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { Separator, View, XStack, YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { BackupEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import Keyboard from '@src/images/icons/keyboard.svg';
|
||||
import RestoreAccountSvg from '@src/images/icons/restore_account.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { useAuth } from '@src/providers/authProvider';
|
||||
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { BackupEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import Keyboard from '@/images/icons/keyboard.svg';
|
||||
import RestoreAccountSvg from '@/images/icons/restore_account.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { useAuth } from '@/providers/authProvider';
|
||||
import {
|
||||
loadPassportDataAndSecret,
|
||||
reStorePassportDataWithRightCSCA,
|
||||
} from '@src/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { STORAGE_NAME, useBackupMnemonic } from '@src/utils/cloudBackup';
|
||||
import { black, slate500, slate600, white } from '@src/utils/colors';
|
||||
import { isUserRegisteredWithAlternativeCSCA } from '@src/utils/proving/validateDocument';
|
||||
} from '@/providers/passportDataProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { STORAGE_NAME, useBackupMnemonic } from '@/utils/cloudBackup';
|
||||
import { black, slate500, slate600, white } from '@/utils/colors';
|
||||
import { isUserRegisteredWithAlternativeCSCA } from '@/utils/proving/validateDocument';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import React from 'react';
|
||||
import { View, YStack } from 'tamagui';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { BackupEvents } from '@src/consts/analytics';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import RestoreAccountSvg from '@src/images/icons/restore_account.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { black, slate600, white } from '@src/utils/colors';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { BackupEvents } from '@/consts/analytics';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import RestoreAccountSvg from '@/images/icons/restore_account.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { black, slate600, white } from '@/utils/colors';
|
||||
|
||||
interface AccountRecoveryScreenProps {}
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
import LottieView from 'lottie-react-native';
|
||||
import React from 'react';
|
||||
import { YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import proofSuccessAnimation from '@src/assets/animations/proof_success.json';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { BackupEvents } from '@src/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@src/screens/prove/ProofRequestStatusScreen';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { buttonTap } from '@src/utils/haptic';
|
||||
|
||||
import proofSuccessAnimation from '@/assets/animations/proof_success.json';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { BackupEvents } from '@/consts/analytics';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { styles } from '@/screens/prove/ProofRequestStatusScreen';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { buttonTap } from '@/utils/haptic';
|
||||
|
||||
const AccountVerifiedSuccessScreen: React.FC = ({}) => {
|
||||
const navigation = useNavigation();
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { black, slate200, white } from '@src/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@src/utils/proving/validateDocument';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { black, slate200, white } from '@/utils/colors';
|
||||
import { hasAnyValidRegisteredDocument } from '@/utils/proving/validateDocument';
|
||||
|
||||
const { flush: flushAnalytics } = analytics();
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@ import { ethers } from 'ethers';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { Keyboard, StyleSheet } from 'react-native';
|
||||
import { Text, TextArea, View, XStack, YStack } from 'tamagui';
|
||||
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { BackupEvents } from '@src/consts/analytics';
|
||||
import Paste from '@src/images/icons/paste.svg';
|
||||
import { useAuth } from '@src/providers/authProvider';
|
||||
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { BackupEvents } from '@/consts/analytics';
|
||||
import Paste from '@/images/icons/paste.svg';
|
||||
import { useAuth } from '@/providers/authProvider';
|
||||
import {
|
||||
loadPassportDataAndSecret,
|
||||
reStorePassportDataWithRightCSCA,
|
||||
} from '@src/providers/passportDataProvider';
|
||||
import analytics from '@src/utils/analytics';
|
||||
} from '@/providers/passportDataProvider';
|
||||
import analytics from '@/utils/analytics';
|
||||
import {
|
||||
black,
|
||||
slate300,
|
||||
@@ -24,8 +24,8 @@ import {
|
||||
slate600,
|
||||
slate700,
|
||||
white,
|
||||
} from '@src/utils/colors';
|
||||
import { isUserRegisteredWithAlternativeCSCA } from '@src/utils/proving/validateDocument';
|
||||
} from '@/utils/colors';
|
||||
import { isUserRegisteredWithAlternativeCSCA } from '@/utils/proving/validateDocument';
|
||||
|
||||
interface RecoverWithPhraseScreenProps {}
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import Mnemonic from '@src/components/Mnemonic';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import useHapticNavigation from '@src/hooks/useHapticNavigation';
|
||||
import useMnemonic from '@src/hooks/useMnemonic';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import { STORAGE_NAME } from '@src/utils/cloudBackup';
|
||||
import { black, slate400, white } from '@src/utils/colors';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import Mnemonic from '@/components/Mnemonic';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import useHapticNavigation from '@/hooks/useHapticNavigation';
|
||||
import useMnemonic from '@/hooks/useMnemonic';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { STORAGE_NAME } from '@/utils/cloudBackup';
|
||||
import { black, slate400, white } from '@/utils/colors';
|
||||
|
||||
interface SaveRecoveryPhraseScreenProps {}
|
||||
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { YStack } from 'tamagui';
|
||||
|
||||
import type { StaticScreenProps } from '@react-navigation/native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import BackupDocumentationLink from '@src/components/BackupDocumentationLink';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import { Caption } from '@src/components/typography/Caption';
|
||||
import Description from '@src/components/typography/Description';
|
||||
import { Title } from '@src/components/typography/Title';
|
||||
import { BackupEvents } from '@src/consts/analytics';
|
||||
import { useModal } from '@src/hooks/useModal';
|
||||
import Cloud from '@src/images/icons/logo_cloud_backup.svg';
|
||||
import { ExpandableBottomLayout } from '@src/layouts/ExpandableBottomLayout';
|
||||
import type { RootStackParamList } from '@src/navigation';
|
||||
import { useAuth } from '@src/providers/authProvider';
|
||||
import { useSettingStore } from '@src/stores/settingStore';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { STORAGE_NAME, useBackupMnemonic } from '@src/utils/cloudBackup';
|
||||
import { black, white } from '@src/utils/colors';
|
||||
import { buttonTap, confirmTap } from '@src/utils/haptic';
|
||||
|
||||
import BackupDocumentationLink from '@/components/BackupDocumentationLink';
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import { Caption } from '@/components/typography/Caption';
|
||||
import Description from '@/components/typography/Description';
|
||||
import { Title } from '@/components/typography/Title';
|
||||
import { BackupEvents } from '@/consts/analytics';
|
||||
import { useModal } from '@/hooks/useModal';
|
||||
import Cloud from '@/images/icons/logo_cloud_backup.svg';
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useAuth } from '@/providers/authProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { STORAGE_NAME, useBackupMnemonic } from '@/utils/cloudBackup';
|
||||
import { black, white } from '@/utils/colors';
|
||||
import { buttonTap, confirmTap } from '@/utils/haptic';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
@@ -4,24 +4,24 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { Alert } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { Button, ScrollView, Spinner, Text, XStack, YStack } from 'tamagui';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
import { PrimaryButton } from '@src/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@src/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@src/components/ButtonsContainer';
|
||||
import { DocumentEvents } from '@src/consts/analytics';
|
||||
import type { RootStackParamList } from '@src/navigation';
|
||||
import { Check, Eraser } from '@tamagui/lucide-icons';
|
||||
|
||||
import { PrimaryButton } from '@/components/buttons/PrimaryButton';
|
||||
import { SecondaryButton } from '@/components/buttons/SecondaryButton';
|
||||
import ButtonsContainer from '@/components/ButtonsContainer';
|
||||
import { DocumentEvents } from '@/consts/analytics';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import {
|
||||
type DocumentCatalog,
|
||||
type DocumentMetadata,
|
||||
usePassport,
|
||||
} from '@src/providers/passportDataProvider';
|
||||
import analytics from '@src/utils/analytics';
|
||||
import { borderColor, textBlack, white } from '@src/utils/colors';
|
||||
import { extraYPadding } from '@src/utils/constants';
|
||||
import { impactLight } from '@src/utils/haptic';
|
||||
import { Check, Eraser } from '@tamagui/lucide-icons';
|
||||
} from '@/providers/passportDataProvider';
|
||||
import analytics from '@/utils/analytics';
|
||||
import { borderColor, textBlack, white } from '@/utils/colors';
|
||||
import { extraYPadding } from '@/utils/constants';
|
||||
import { impactLight } from '@/utils/haptic';
|
||||
|
||||
const { trackEvent } = analytics();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user