From 02fe3901770ca62997eb954e1848cf4c88b7c3c5 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 30 Jul 2024 12:17:46 +0000 Subject: [PATCH] Rename token from photon to alnt (#7) Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: Shreerang Kale Co-authored-by: Adw8 Reviewed-on: https://git.vdb.to/cerc-io/testnet-onboarding-app/pulls/7 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- .env.example | 2 +- package.json | 2 +- src/pages/UserVerification.tsx | 7 +++++-- yarn.lock | 10 ++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 0557672..22cb233 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ REACT_APP_ETHEREUM_MAINNET_CHAIN_ID=1 REACT_APP_LACONICD_CHAIN_ID=laconic_9000-1 REACT_APP_REGISTRY_GQL_ENDPOINT=http://localhost:9473/api REACT_APP_LACONICD_RPC_ENDPOINT=http://localhost:26657 -REACT_APP_LACONICD_DENOM=photon +REACT_APP_LACONICD_DENOM=alnt REACT_APP_FAUCET_ENDPOINT=http://localhost:4000 REACT_APP_WALLET_META_URL=http://localhost:3000 REACT_APP_SUMSUB_API_ENDPOINT= diff --git a/package.json b/package.json index 2354ac0..ea02bca 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@cerc-io/registry-sdk": "^0.2.4", + "@cerc-io/registry-sdk": "^0.2.5", "@cosmjs/stargate": "^0.32.4", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", diff --git a/src/pages/UserVerification.tsx b/src/pages/UserVerification.tsx index fb62e1b..7ee7d71 100644 --- a/src/pages/UserVerification.tsx +++ b/src/pages/UserVerification.tsx @@ -55,7 +55,7 @@ const UserVerification = () => { }, [applicationSubmitted, kycId, navigate, cosmosAddress, message, receivedEthSig]); const messageHandler: MessageHandler = (event, payload) => { - console.log('sumsubEvent:', event); + console.log('sumsubEvent:', event, payload); if (event === 'idCheck.onApplicantLoaded') { setKycId((payload as EventPayload<'idCheck.onApplicantLoaded'>).applicantId); @@ -66,9 +66,12 @@ const UserVerification = () => { } if (event === 'idCheck.onApplicantStatusChanged') { - if ((payload as EventPayload<'idCheck.onApplicantStatusChanged'>).reviewStatus === 'pending') { + const applicantStatus = (payload as EventPayload<'idCheck.onApplicantStatusChanged'>).reviewStatus; + + if (applicantStatus === 'pending' || applicantStatus === 'completed') { setApplicationSubmitted(true); } + if ((payload as any).reviewResult.reviewAnswer === 'GREEN') { setApplicationSubmitted(true); } diff --git a/yarn.lock b/yarn.lock index f77e06e..75b75a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1183,10 +1183,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cerc-io/registry-sdk@^0.2.4": - version "0.2.4" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.4/registry-sdk-0.2.4.tgz#60e4e75b1e6a957cf2b97490af4fda4af07b105f" - integrity sha512-hRZJP+s+uBvfrqtmQ38pmf74SyfFDC65AVwvWigJGxc6uKJG4jyuMyhsoD1P4XkjwAQSnFO89TuDC5JGkdXyrA== +"@cerc-io/registry-sdk@^0.2.5": + version "0.2.5" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.5/registry-sdk-0.2.5.tgz#9ca19fecb2923520dd6a19946c309ecb2ec780a2" + integrity sha512-/KXAYf9gStaX/rRBMCEeDCexEIpTOFHeHzMK9B3xfCT+SyYZE9WC9GpX299LzBYJKKPsb0/JvnDfip9S1igJtA== dependencies: "@cosmjs/amino" "^0.28.1" "@cosmjs/crypto" "^0.28.1" @@ -12209,6 +12209,8 @@ tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== + dependencies: + punycode "^2.1.0" tr46@^2.1.0: version "2.1.0"