Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@profullstack/affiliates": "^0.3.0",
"@profullstack/coinpay-onboard": "0.4.0",
"@profullstack/footer": "latest",
"@profullstack/profile": "0.1.6",
"@profullstack/profile": "0.1.7",
"@profullstack/redeem-credits": "^0.2.0",
"@profullstack/referrals": "^0.1.0",
"@profullstack/stack": "^0.5.0",
Expand Down
6 changes: 6 additions & 0 deletions src/app/api/coinpay/callback/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { NextResponse, type NextRequest } from "next/server";
import { finishSignIn } from "@profullstack/coinpay-onboard/oauth";
import { saveOpenProfileContact } from "@profullstack/profile";
import { profileStore } from "@/lib/profile";
import { createServerSupabaseClient, createServiceClient } from "@/lib/supabase/server";
import { getSiteUrl } from "@/lib/site-url";
import {
Expand Down Expand Up @@ -91,6 +93,10 @@ export async function GET(request: NextRequest) {
claims,
}, store);
if (!resolved.ok) return fail(resolved.code);
if (pending.mode === "connect" && groupcallAction !== "disconnect" && typeof result.userinfo.openprofile_url === "string") {
try { await saveOpenProfileContact(profileStore(), resolved.userId, result.userinfo.openprofile_url); }
catch { console.warn("[coinpay] OpenProfile import skipped"); }
}
if (pending.mode === "connect" && !groupcallAction) return to("/settings?coinpay=connected");

if (groupcallAction) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function ProfileCard() {
<section className="space-y-4">
<h2 className="text-lg font-semibold">Profile</h2>
<form onSubmit={save} className="bg-gray-900 rounded-lg p-4 border border-gray-800 space-y-4">
<ProfileFields idPrefix="settings-" values={values} onChange={setValues} errors={errors} disabled={!loaded} />
<ProfileFields idPrefix="settings-" values={values} onChange={setValues} errors={errors} disabled={!loaded} importOpenProfile/>
<div className="flex items-center gap-3">
<button
type="submit"
Expand Down
Loading