Add unique twitter id on verifier msg

This commit is contained in:
delivan 2022-12-06 00:02:30 +09:00
parent 01b70389f0
commit 2baa15fb5d
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { import {
IcnsVerificationInfoResponse, IcnsVerificationResponse,
TwitterAuthInfoResponse, TwitterAuthInfoResponse,
} from "../../types/api-response"; } from "../../types/api-response";
import { VerifierMsg } from "../../types/msg"; import { VerifierMsg } from "../../types/msg";
@ -24,12 +24,13 @@ export default function VerificationPage() {
setTwitterAuthInfo(newTwitterAuthInfo); setTwitterAuthInfo(newTwitterAuthInfo);
const verifierMsg: VerifierMsg = { const verifierMsg: VerifierMsg = {
unique_twitter_id: newTwitterAuthInfo.id,
name: newTwitterAuthInfo.username, name: newTwitterAuthInfo.username,
claimer: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq", claimer: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq",
contract_address: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq", contract_address: "osmo1y5mm5nj5m8ttddt5ccspek6xgyyavehrkak7gq",
chain_id: "osmosis-1", chain_id: "osmosis-1",
}; };
const icnsVerificationInfo = await request<IcnsVerificationInfoResponse>( const icnsVerification = await request<IcnsVerificationResponse>(
"/api/icns-verification", "/api/icns-verification",
{ {
method: "post", method: "post",
@ -42,7 +43,7 @@ export default function VerificationPage() {
}), }),
}, },
); );
console.log(icnsVerificationInfo); console.log(icnsVerification);
}; };
handleVerification(); handleVerification();

View File

@ -8,7 +8,7 @@ export interface TwitterAuthInfoResponse {
username: string; username: string;
} }
export interface IcnsVerificationInfoResponse { export interface IcnsVerificationResponse {
signature: number[]; signature: number[];
algorithm: string; algorithm: string;
} }

View File

@ -1,4 +1,5 @@
export interface VerifierMsg { export interface VerifierMsg {
unique_twitter_id: string;
name: string; name: string;
claimer: string; claimer: string;
contract_address: string; contract_address: string;