Skip to content

Commit

Permalink
fix: signup url now uses warpcaster instead of farcaster://
Browse files Browse the repository at this point in the history
  • Loading branch information
hiporox committed Jul 3, 2024
1 parent 1157550 commit 4ff2ba0
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
FarcasterRegistrationType,
SignerStatus,
} from ".";
import { isEqual, isUndefined, startsWith } from "lodash";
import { isEqual, isUndefined, replace, startsWith } from "lodash";
import { ed25519 } from "@noble/curves/ed25519";
import { bytesToHex, hexToBytes } from "@noble/ciphers/utils";
import axiosBackend from "@/common/data/api/backend";
Expand Down Expand Up @@ -223,16 +223,20 @@ const initializer: AuthenticatorInitializer<
};
});

const warpcastSignerUrl = data.signerUrl
? replace(data.signerUrl, "farcaster://", "https://warpcast.com/")
: undefined;

return (
<>
{isUndefined(data.status) ||
!isDataInitialized(data) ||
data.status === "revoked" ? (
<Button onClick={createSigner}>Link Warpcast Account</Button>
) : loading && data.signerUrl ? (
) : loading && warpcastSignerUrl ? (
<>
<QRCode value={data.signerUrl} maxWidth={256} />
<Link href={data.signerUrl}>
<QRCode value={warpcastSignerUrl} maxWidth={256} />
<Link href={warpcastSignerUrl}>
<p>On mobile? Click here</p>
</Link>
</>
Expand Down

0 comments on commit 4ff2ba0

Please sign in to comment.