Skip to content

Commit

Permalink
move functions to sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
kevtechi committed Oct 29, 2024
1 parent 22e8e19 commit f566a24
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 111 deletions.
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"imports": {
"@/firebase": "./supabase/functions/_firebase",
"@/supabase": "./supabase",
"@citizenwallet/sdk": "jsr:@citizenwallet/sdk@^2.0.8",
"@citizenwallet/sdk": "jsr:@citizenwallet/sdk@^2.0.13",
"@supabase/functions-js": "jsr:@supabase/functions-js@^2.4.3",
"@supabase/supabase-js": "jsr:@supabase/supabase-js@^2.45.6",
"@supabase/supabase-js": "jsr:@supabase/supabase-js@^2.46.0",
"ethers": "npm:ethers@^6.13.4",
"firebase-admin": "npm:firebase-admin@^12.7.0"
}
Expand Down
40 changes: 22 additions & 18 deletions deno.lock

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

This file was deleted.

71 changes: 0 additions & 71 deletions supabase/functions/_citizen-wallet/contracts/profiles/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions supabase/functions/_citizen-wallet/ipfs/index.ts

This file was deleted.

6 changes: 4 additions & 2 deletions supabase/functions/_citizen-wallet/profiles.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { SupabaseClient } from "jsr:@supabase/supabase-js@2";
import type { CommunityConfig } from "jsr:@citizenwallet/sdk";
import {
type CommunityConfig,
getProfileFromAddress,
} from "jsr:@citizenwallet/sdk";
import {
getProfile,
insertAnonymousProfile,
upsertProfile,
} from "../_db/profiles.ts";
import { getProfileFromAddress } from "./contracts/profiles/index.ts";

export const ensureProfileExists = async (
client: SupabaseClient,
Expand Down
2 changes: 1 addition & 1 deletion supabase/functions/download-profile-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
communityConfig,
type MetadataUpdateData,
} from "../_citizen-wallet/index.ts";
import { getProfileFromId } from "../_citizen-wallet/contracts/profiles/index.ts";
import { getServiceRoleClient } from "../_db/index.ts";
import { upsertProfile } from "../_db/profiles.ts";
import { getProfileFromId } from "jsr:@citizenwallet/sdk";

Deno.serve(async (req) => {
const { record } = await req.json();
Expand Down

0 comments on commit f566a24

Please sign in to comment.