From b499fe76e137ec1afebc6203ce6cd168c803ecac Mon Sep 17 00:00:00 2001 From: yangshan Date: Thu, 17 Oct 2024 19:51:32 +0800 Subject: [PATCH 1/2] account authenticate --- .../src/services/IdentityServiceV2.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/huma-shared/src/services/IdentityServiceV2.ts b/packages/huma-shared/src/services/IdentityServiceV2.ts index d374691e..aa2decf7 100644 --- a/packages/huma-shared/src/services/IdentityServiceV2.ts +++ b/packages/huma-shared/src/services/IdentityServiceV2.ts @@ -205,6 +205,26 @@ const approveLender = async ( )}/wallets/${walletAddress}/approve-lender?chainId=${chainId}&contractAddress=${contractAddress}`, ) +/** + * Authenticate wallet account. + * + * @param {string} walletAddress The wallet address. + * @param {number} chainId Chain ID. + * @param {boolean} isDev Is dev environment or not. + * @returns {Promise} Promise that returns void. + */ +const authenticate = async ( + walletAddress: string, + chainId: number, + isDev = false, +): Promise => + requestPost( + `${configUtil.getIdentityAPIUrl( + chainId, + isDev, + )}/wallets/${walletAddress}/authenticate?chainId=${chainId}`, + ) + export const IdentityServiceV2 = { getVerificationStatusV2, accredit, @@ -212,4 +232,5 @@ export const IdentityServiceV2 = { resumeVerification, consentToSubscription, approveLender, + authenticate, } From aac5f8f96715d131a91a8267b438489505ca4028 Mon Sep 17 00:00:00 2001 From: yangshan Date: Thu, 17 Oct 2024 20:06:43 +0800 Subject: [PATCH 2/2] update gitleaks go version --- .github/workflows/gitleaks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index cd80bf50..08197a41 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -3,7 +3,7 @@ name: gitleaks on: pull_request: types: [opened, reopened, edited, synchronize] - branches: ['master', 'develop'] + branches: ["master", "develop"] workflow_dispatch: @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '1.19' + go-version: "1.23" - name: get gitleaks run: | git clone https://github.com/zricethezav/gitleaks.git