From 2baa15fb5da9ddc8b2334221d910c245f789a7b9 Mon Sep 17 00:00:00 2001 From: delivan Date: Tue, 6 Dec 2022 00:02:30 +0900 Subject: [PATCH] Add unique twitter id on verifier msg --- pages/verification/index.tsx | 7 ++++--- types/api-response.ts | 2 +- types/msg.ts | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/verification/index.tsx b/pages/verification/index.tsx index cdd3068..52a204b 100644 --- a/pages/verification/index.tsx +++ b/pages/verification/index.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { - IcnsVerificationInfoResponse, + IcnsVerificationResponse, TwitterAuthInfoResponse, } from "../../types/api-response"; import { VerifierMsg } from "../../types/msg"; @@ -24,12 +24,13 @@ export default function VerificationPage() { setTwitterAuthInfo(newTwitterAuthInfo); const verifierMsg: VerifierMsg = { + unique_twitter_id: newTwitterAuthInfo.id, name: newTwitterAuthInfo.username, claimer: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq", contract_address: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq", chain_id: "osmosis-1", }; - const icnsVerificationInfo = await request( + const icnsVerification = await request( "/api/icns-verification", { method: "post", @@ -42,7 +43,7 @@ export default function VerificationPage() { }), }, ); - console.log(icnsVerificationInfo); + console.log(icnsVerification); }; handleVerification(); diff --git a/types/api-response.ts b/types/api-response.ts index d0b4bd1..9992681 100644 --- a/types/api-response.ts +++ b/types/api-response.ts @@ -8,7 +8,7 @@ export interface TwitterAuthInfoResponse { username: string; } -export interface IcnsVerificationInfoResponse { +export interface IcnsVerificationResponse { signature: number[]; algorithm: string; } diff --git a/types/msg.ts b/types/msg.ts index ff58829..9a3da09 100644 --- a/types/msg.ts +++ b/types/msg.ts @@ -1,4 +1,5 @@ export interface VerifierMsg { + unique_twitter_id: string; name: string; claimer: string; contract_address: string;