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 {
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<IcnsVerificationInfoResponse>(
const icnsVerification = await request<IcnsVerificationResponse>(
"/api/icns-verification",
{
method: "post",
@ -42,7 +43,7 @@ export default function VerificationPage() {
}),
},
);
console.log(icnsVerificationInfo);
console.log(icnsVerification);
};
handleVerification();

View File

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

View File

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