From 59f3ac053a86f02db0571c117c237910939fc1e2 Mon Sep 17 00:00:00 2001
From: Paolo D'Amico
Date: Tue, 28 Feb 2023 21:34:42 -0800
Subject: [PATCH] fix: remove a bunch of unused phone code (#83)
---
example-nextjs/pages/index.tsx | 1 -
example-react/src/App.tsx | 1 -
idkit/package.json | 4 ---
.../IDKitWidget/States/AboutState.tsx | 7 +++--
.../IDKitWidget/States/ErrorState.tsx | 2 --
.../IDKitWidget/States/PrivacyState.tsx | 14 +---------
.../Icons/DevicePhoneMobileIcon.tsx | 20 --------------
idkit/src/lib/telemetry.ts | 9 -------
idkit/src/store/idkit.ts | 7 +----
idkit/src/types/index.ts | 27 +++++--------------
yarn.lock | 20 --------------
11 files changed, 11 insertions(+), 101 deletions(-)
delete mode 100644 idkit/src/components/Icons/DevicePhoneMobileIcon.tsx
diff --git a/example-nextjs/pages/index.tsx b/example-nextjs/pages/index.tsx
index 7e3c0383..de93094c 100644
--- a/example-nextjs/pages/index.tsx
+++ b/example-nextjs/pages/index.tsx
@@ -8,7 +8,6 @@ export default function Home() {
return new Promise((resolve) => {
setTimeout(() => resolve(), 3000);
// NOTE: Example of how to decline the verification request and show an error message to the user
- //setTimeout(() => reject({ message: "This phone number has already been used!" }), 3000);
});
}, []);
diff --git a/example-react/src/App.tsx b/example-react/src/App.tsx
index dfe54459..abe89aa6 100644
--- a/example-react/src/App.tsx
+++ b/example-react/src/App.tsx
@@ -5,7 +5,6 @@ function App() {
return new Promise((resolve) => {
setTimeout(() => resolve(), 3000);
// NOTE: Example of how to decline the verification request and show an error message to the user
- //setTimeout(() => reject({ message: "This phone number has already been used!" }), 3000);
});
};
diff --git a/idkit/package.json b/idkit/package.json
index f26226e2..2f906345 100644
--- a/idkit/package.json
+++ b/idkit/package.json
@@ -61,15 +61,12 @@
"@walletconnect/types": "^2.2.0",
"@walletconnect/utils": "^2.2.1",
"copy-to-clipboard": "^3.3.3",
- "country-telephone-data": "^0.6.3",
"framer-motion": "^7.6.7",
"js-sha3": "^0.8.0",
- "phone": "^3.1.30",
"posthog-js-lite": "2.0.0",
"qr-code-styling-new": "^1.6.1",
"qrcode": "^1.5.1",
"react-countdown": "^2.3.4",
- "react-country-flag": "^3.0.2",
"react-frame-component": "^5.2.3",
"react-shadow": "^19.0.3",
"zustand": "^4.3.3"
@@ -78,7 +75,6 @@
"@babel/core": "^7.20.2",
"@babel/plugin-syntax-typescript": "^7.20.0",
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
- "@types/country-telephone-data": "^0.6.1",
"@types/node": "18.11.9",
"@types/qrcode": "^1.5.0",
"@types/react": "18.0.25",
diff --git a/idkit/src/components/IDKitWidget/States/AboutState.tsx b/idkit/src/components/IDKitWidget/States/AboutState.tsx
index b19676c0..2901e47e 100644
--- a/idkit/src/components/IDKitWidget/States/AboutState.tsx
+++ b/idkit/src/components/IDKitWidget/States/AboutState.tsx
@@ -13,12 +13,11 @@ const AboutState = () => {
something once without revealing personal information.
- It currently supports verification through biometrics (using a device called an Orb), and through
- phone numbers. Zero-Knowledge Proofs and other cryptographic mechanisms are used to preserve
- privacy.
+ It currently supports verification through biometrics (using a device called an Orb). Zero-Knowledge
+ Proofs and other cryptographic mechanisms are used to preserve privacy.
-
Apps will never see your phone number or biometrics.
+
Apps will never see your biometrics.
({ retryFlow, error
export const ERROR_TITLES: Record = {
[ErrorCodes.GENERIC_ERROR]: 'Something went wrong',
- [ErrorCodes.INVALID_CODE]: 'Invalid code',
- [ErrorCodes.PHONE_OTP_REQUEST_ERROR]: 'We could not send you a code',
[ErrorCodes.REJECTED_BY_HOST_APP]: 'Verification declined by app',
}
diff --git a/idkit/src/components/IDKitWidget/States/PrivacyState.tsx b/idkit/src/components/IDKitWidget/States/PrivacyState.tsx
index f698da35..58513995 100644
--- a/idkit/src/components/IDKitWidget/States/PrivacyState.tsx
+++ b/idkit/src/components/IDKitWidget/States/PrivacyState.tsx
@@ -9,16 +9,6 @@ const PrivacyState = () => {
IDKit and World ID are fully privacy preserving.
-
- Phone numbers are never kept by anyone. IDKit and its phone carrier only uses your number to deliver
- a one-time code.
-
-
- Apps only receive a hash-like nullifier which can't be reversed. Worldcoin or IDKit
- don't store nullifier hashes.
-
-
-
Orb biometrics analyzed by the Orb are not stored. Orb credential is used with Zero-Knowledge Proofs
which makes it cryptographically impossible to track persons across applications.
@@ -38,9 +28,7 @@ const PrivacyState = () => {
-
- Apps will never see your phone number or biometrics.
-