Skip to content

Commit

Permalink
Merge pull request #619 from us3r-network/F-farcasterSignerReq-ttang
Browse files Browse the repository at this point in the history
feat: change to signer req
  • Loading branch information
Tonyce authored Mar 15, 2024
2 parents 8e1fa21 + 5d65765 commit 8b18a78
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/u3/src/hooks/social/farcaster/useFarcasterQR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
setDefaultFarcaster,
} from '@/utils/social/farcaster/farcaster-default';
import useLogin from '@/hooks/shared/useLogin';
import { REACT_APP_API_SOCIAL_URL } from '@/constants';

const stopSign = {
stop: false,
Expand Down Expand Up @@ -104,7 +105,7 @@ export default function useFarcasterQR() {
let signerSuccess = false;
let stopped = false;

while (tries < 60) {
while (tries < 100) {
if (stopSign.stop) {
stopped = true;
break;
Expand Down Expand Up @@ -185,14 +186,17 @@ export default function useFarcasterQR() {

const { signature, appFid, deadline } = resp.data.data;

const { token, deeplinkUrl } = await axios
.post(`${WARPCAST_API}/v2/signed-key-requests`, {
const req = await axios.post(
`${REACT_APP_API_SOCIAL_URL}/3r-farcaster/signer-request`,
{
key: convertedKey,
requestFid: appFid,
signature,
deadline,
})
.then((response) => response.data.result.signedKeyRequest);
}
);
// console.log('signer-request data', req.data.data);
const { token, deeplinkUrl } = req.data.data;

// save-temp
saveTempFarsignPrivateKey(keyPair.privateKey);
Expand Down

0 comments on commit 8b18a78

Please sign in to comment.