diff --git a/apps/docs_web/docs/v0/lifecycle.md b/apps/docs_web/docs/v0/lifecycle.md index 019edad89..841797f19 100644 --- a/apps/docs_web/docs/v0/lifecycle.md +++ b/apps/docs_web/docs/v0/lifecycle.md @@ -77,9 +77,9 @@ For new users, distributed key shares are created: - Stores encrypted shares in key share nodes 2. Database Updates: - - ewallet_wallets table: new entry with public key + - oko_wallets table: new entry with public key - wallet_ks_nodes table: key share node assignments - - ewallet_users table: user account information + - oko_users table: user account information ``` **User Experience:** diff --git a/backend/admin_api/src/api/wallet/index.ts b/backend/admin_api/src/api/wallet/index.ts index 66fec2a2e..cb8330e10 100644 --- a/backend/admin_api/src/api/wallet/index.ts +++ b/backend/admin_api/src/api/wallet/index.ts @@ -7,7 +7,7 @@ import type { import { getAllWallets, getWalletsCount, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; export async function getWalletList( db: Pool, diff --git a/backend/oko_pg_interface/migrations/20251228234429_rename_ewallet_to_oko.ts b/backend/oko_pg_interface/migrations/20251228234429_rename_ewallet_to_oko.ts new file mode 100644 index 000000000..caf86532a --- /dev/null +++ b/backend/oko_pg_interface/migrations/20251228234429_rename_ewallet_to_oko.ts @@ -0,0 +1,36 @@ +import type { Knex } from "knex"; + +export async function up(knex: Knex): Promise { + await knex.schema.renameTable("ewallet_users", "oko_users"); + await knex.schema.renameTable("ewallet_wallets", "oko_wallets"); + + await knex.raw(` + ALTER TABLE oko_users RENAME CONSTRAINT ewallet_users_pkey TO oko_users_pkey; + ALTER TABLE oko_users RENAME CONSTRAINT ewallet_users_email_auth_type_key TO oko_users_email_auth_type_key; + ALTER TABLE oko_wallets RENAME CONSTRAINT ewallet_wallets_pkey TO oko_wallets_pkey; + ALTER TABLE oko_wallets RENAME CONSTRAINT ewallet_wallets_public_key_key TO oko_wallets_public_key_key; + `); + + await knex.raw(` + ALTER INDEX idx_ewallet_wallets_created_at RENAME TO idx_oko_wallets_created_at; + ALTER INDEX idx_ewallet_wallets_user_id_curve_type_status RENAME TO idx_oko_wallets_user_id_curve_type_status; + `); +} + +export async function down(knex: Knex): Promise { + await knex.raw(` + ALTER INDEX idx_oko_wallets_created_at RENAME TO idx_ewallet_wallets_created_at; + ALTER INDEX idx_oko_wallets_user_id_curve_type_status RENAME TO idx_ewallet_wallets_user_id_curve_type_status; + `); + + await knex.raw(` + ALTER TABLE oko_users RENAME CONSTRAINT oko_users_pkey TO ewallet_users_pkey; + ALTER TABLE oko_users RENAME CONSTRAINT oko_users_email_auth_type_key TO ewallet_users_email_auth_type_key; + ALTER TABLE oko_wallets RENAME CONSTRAINT oko_wallets_pkey TO ewallet_wallets_pkey; + ALTER TABLE oko_wallets RENAME CONSTRAINT oko_wallets_public_key_key TO ewallet_wallets_public_key_key; + `); + + await knex.schema.renameTable("oko_users", "ewallet_users"); + await knex.schema.renameTable("oko_wallets", "ewallet_wallets"); +} + diff --git a/backend/oko_pg_interface/package.json b/backend/oko_pg_interface/package.json index 28b6c7e4d..1e03a06d5 100644 --- a/backend/oko_pg_interface/package.json +++ b/backend/oko_pg_interface/package.json @@ -19,8 +19,8 @@ "./customers": "./src/customers/index.ts", "./email_verifications": "./src/email_verifications/index.ts", "./email_sent_logs": "./src/email_sent_logs/index.ts", - "./ewallet_users": "./src/ewallet_users/index.ts", - "./ewallet_wallets": "./src/ewallet_wallets/index.ts", + "./oko_users": "./src/oko_users/index.ts", + "./oko_wallets": "./src/oko_wallets/index.ts", "./tss": "./src/tss/index.ts", "./tss_activate": "./src/tss_activate/index.ts", "./key_share_node_meta": "./src/key_share_node_meta/index.ts", diff --git a/backend/oko_pg_interface/scripts/seed_backup/data/common.ts b/backend/oko_pg_interface/scripts/seed_backup/data/common.ts index a4b116a9a..4687e546f 100644 --- a/backend/oko_pg_interface/scripts/seed_backup/data/common.ts +++ b/backend/oko_pg_interface/scripts/seed_backup/data/common.ts @@ -6,7 +6,7 @@ import type { CustomerAndCTDUserWithPasswordHash, PasswordHash, } from "@oko-wallet/oko-types/ct_dashboard"; -import type { EWalletAdminUser } from "@oko-wallet/oko-types/admin"; +import type { OkoAdminUser } from "@oko-wallet/oko-types/admin"; import type { KeyShareNodeMeta } from "@oko-wallet/oko-types/key_share_node_meta"; import type { TssActivationSetting } from "@oko-wallet-types/tss_activate"; @@ -30,7 +30,7 @@ export function createKeyShareNodeMeta(): KeyShareNodeMeta { }; } -export async function createAdmin(): Promise { +export async function createAdmin(): Promise { return { user_id: ADMIN_USER_ID, email: ADMIN_EMAIL, diff --git a/backend/oko_pg_interface/scripts/seed_backup/data/index.ts b/backend/oko_pg_interface/scripts/seed_backup/data/index.ts index 048f3a911..617b4d1f0 100644 --- a/backend/oko_pg_interface/scripts/seed_backup/data/index.ts +++ b/backend/oko_pg_interface/scripts/seed_backup/data/index.ts @@ -3,7 +3,7 @@ import type { CustomerDashboardUser, PasswordHash, } from "@oko-wallet/oko-types/ct_dashboard"; -import type { EWalletAdminUser } from "@oko-wallet/oko-types/admin"; +import type { OkoAdminUser } from "@oko-wallet/oko-types/admin"; import { createAdmin, @@ -19,7 +19,7 @@ import type { KeyShareNodeMeta } from "@oko-wallet-types/key_share_node_meta"; import type { TssActivationSetting } from "@oko-wallet-types/tss_activate"; export interface SeedData { - admin: EWalletAdminUser; + admin: OkoAdminUser; customer: Customer; customerDashboardUser: CustomerDashboardUser & PasswordHash; apiKeys: { customer_id: string; hashed_key: string }[]; diff --git a/backend/oko_pg_interface/seeds/data/common.ts b/backend/oko_pg_interface/seeds/data/common.ts index bc5bbb335..df4a90a9b 100644 --- a/backend/oko_pg_interface/seeds/data/common.ts +++ b/backend/oko_pg_interface/seeds/data/common.ts @@ -6,7 +6,7 @@ import type { CustomerAndCTDUserWithPasswordHash, PasswordHash, } from "@oko-wallet/oko-types/ct_dashboard"; -import type { EWalletAdminUser } from "@oko-wallet/oko-types/admin"; +import type { OkoAdminUser } from "@oko-wallet/oko-types/admin"; import type { KeyShareNodeMeta } from "@oko-wallet/oko-types/key_share_node_meta"; import type { TssActivationSetting } from "@oko-wallet-types/tss_activate"; @@ -30,7 +30,7 @@ export function createKeyShareNodeMeta(): KeyShareNodeMeta { }; } -export async function createAdmin(): Promise { +export async function createAdmin(): Promise { return { user_id: ADMIN_USER_ID, email: ADMIN_EMAIL, diff --git a/backend/oko_pg_interface/seeds/initial_seed.ts b/backend/oko_pg_interface/seeds/initial_seed.ts index a920abc13..2c624f1d4 100644 --- a/backend/oko_pg_interface/seeds/initial_seed.ts +++ b/backend/oko_pg_interface/seeds/initial_seed.ts @@ -23,8 +23,8 @@ export async function seed(knex: Knex): Promise { await knex("ks_node_health_checks").del(); await knex("key_share_nodes").del(); await knex("key_share_node_meta").del(); - await knex("ewallet_wallets").del(); - await knex("ewallet_users").del(); + await knex("oko_wallets").del(); + await knex("oko_users").del(); await knex("email_verifications").del(); await knex("customer_dashboard_users").del(); await knex("api_keys").del(); diff --git a/backend/oko_pg_interface/src/admin_users/index.ts b/backend/oko_pg_interface/src/admin_users/index.ts index 295db296a..da53feca8 100644 --- a/backend/oko_pg_interface/src/admin_users/index.ts +++ b/backend/oko_pg_interface/src/admin_users/index.ts @@ -1,10 +1,10 @@ import { Pool, type PoolClient } from "pg"; -import type { EWalletAdminUser } from "@oko-wallet/oko-types/admin"; +import type { OkoAdminUser } from "@oko-wallet/oko-types/admin"; import type { Result } from "@oko-wallet/stdlib-js"; export async function createAdmin( db: Pool | PoolClient, - adminUser: EWalletAdminUser, + adminUser: OkoAdminUser, ): Promise> { const query = ` INSERT INTO admin_users ( @@ -27,7 +27,7 @@ RETURNING user_id ]; try { - const result = await db.query(query, values); + const result = await db.query(query, values); const row = result.rows[0]; if (!row) { @@ -49,7 +49,7 @@ RETURNING user_id export async function getAdminByEmail( db: Pool, email: string, -): Promise> { +): Promise> { const query = ` SELECT * FROM admin_users @@ -58,7 +58,7 @@ LIMIT 1 `; try { - const result = await db.query(query, [email]); + const result = await db.query(query, [email]); return { success: true, data: result.rows.length > 0 ? result.rows[0] : null, @@ -74,7 +74,7 @@ LIMIT 1 export async function getAdminById( db: Pool, adminId: string, -): Promise> { +): Promise> { const query = ` SELECT * FROM admin_users @@ -83,7 +83,7 @@ LIMIT 1 `; try { - const result = await db.query(query, [adminId]); + const result = await db.query(query, [adminId]); return { success: true, data: result.rows.length > 0 ? result.rows[0] : null, diff --git a/backend/oko_pg_interface/src/ewallet_users/index.ts b/backend/oko_pg_interface/src/oko_users/index.ts similarity index 96% rename from backend/oko_pg_interface/src/ewallet_users/index.ts rename to backend/oko_pg_interface/src/oko_users/index.ts index 405fc25da..b21068105 100644 --- a/backend/oko_pg_interface/src/ewallet_users/index.ts +++ b/backend/oko_pg_interface/src/oko_users/index.ts @@ -11,7 +11,7 @@ export async function createUser( ): Promise> { try { const query = ` -INSERT INTO ewallet_users ( +INSERT INTO oko_users ( user_id, email, auth_type ) VALUES ( $1, $2, $3 @@ -50,7 +50,7 @@ export async function getUserByEmailAndAuthType( try { const query = ` SELECT * -FROM ewallet_users +FROM oko_users WHERE email = $1 AND auth_type = $2 LIMIT 1 `; diff --git a/backend/oko_pg_interface/src/ewallet_wallets/index.ts b/backend/oko_pg_interface/src/oko_wallets/index.ts similarity index 94% rename from backend/oko_pg_interface/src/ewallet_wallets/index.ts rename to backend/oko_pg_interface/src/oko_wallets/index.ts index 979370ee3..7762f4d71 100644 --- a/backend/oko_pg_interface/src/ewallet_wallets/index.ts +++ b/backend/oko_pg_interface/src/oko_wallets/index.ts @@ -16,7 +16,7 @@ export async function createWallet( ): Promise> { try { const createWalletQuery = ` -INSERT INTO ewallet_wallets ( +INSERT INTO oko_wallets ( wallet_id, user_id, curve_type, public_key, enc_tss_share, sss_threshold, status ) @@ -66,7 +66,7 @@ export async function getWalletById( try { const query = ` SELECT * -FROM ewallet_wallets +FROM oko_wallets WHERE wallet_id = $1 LIMIT 1 `; @@ -96,8 +96,8 @@ export async function getWalletByIdWithEmail( try { const query = ` SELECT w.*, u.email AS email -FROM ewallet_wallets w -LEFT JOIN ewallet_users u ON w.user_id = u.user_id +FROM oko_wallets w +LEFT JOIN oko_users u ON w.user_id = u.user_id WHERE w.wallet_id = $1 LIMIT 1 `; @@ -128,7 +128,7 @@ export async function getWalletByPublicKey( try { const query = ` SELECT * -FROM ewallet_wallets +FROM oko_wallets WHERE public_key = $1 LIMIT 1 `; @@ -160,7 +160,7 @@ export async function getActiveWalletByUserIdAndCurveType( try { const query = ` SELECT * -FROM ewallet_wallets +FROM oko_wallets WHERE user_id = $1 AND curve_type = $2 AND status = $3 @@ -204,8 +204,8 @@ SELECT JSON_AGG(wk.node_id) FILTER (WHERE wk.wallet_ks_node_id IS NOT NULL), '[]'::json ) as wallet_ks_nodes -FROM ewallet_wallets w -LEFT JOIN ewallet_users u ON w.user_id = u.user_id +FROM oko_wallets w +LEFT JOIN oko_users u ON w.user_id = u.user_id LEFT JOIN wallet_ks_nodes wk ON w.wallet_id = wk.wallet_id GROUP BY w.wallet_id, w.user_id, w.curve_type, w.public_key, w.status, w.enc_tss_share, w.metadata, w.created_at, w.updated_at, u.email ORDER BY w.created_at DESC @@ -232,7 +232,7 @@ export async function getWalletsCount( ): Promise> { try { const query = ` -SELECT COUNT(*) FROM ewallet_wallets +SELECT COUNT(*) FROM oko_wallets `; const result = await db.query(query); @@ -256,7 +256,7 @@ export async function updateWalletStatus( ): Promise> { try { const query = ` -UPDATE ewallet_wallets +UPDATE oko_wallets SET status = $1, updated_at = now() WHERE wallet_id = $2 `; diff --git a/backend/oko_pg_interface/src/tss/index.ts b/backend/oko_pg_interface/src/tss/index.ts index 33439baed..43341607a 100644 --- a/backend/oko_pg_interface/src/tss/index.ts +++ b/backend/oko_pg_interface/src/tss/index.ts @@ -294,8 +294,8 @@ SELECT u.email AS user_email FROM tss_sessions s JOIN customers c ON s.customer_id = c.customer_id -LEFT JOIN ewallet_wallets w ON s.wallet_id = w.wallet_id -LEFT JOIN ewallet_users u ON w.user_id = u.user_id +LEFT JOIN oko_wallets w ON s.wallet_id = w.wallet_id +LEFT JOIN oko_users u ON w.user_id = u.user_id `; const conditions: string[] = []; diff --git a/backend/social_login_api/src/routes/referral.ts b/backend/social_login_api/src/routes/referral.ts index 1a48db58b..d27821c0a 100644 --- a/backend/social_login_api/src/routes/referral.ts +++ b/backend/social_login_api/src/routes/referral.ts @@ -19,7 +19,7 @@ import { } from "@oko-wallet/oko-pg-interface/referrals"; const CIVITIA_ORIGIN = "https://app.civitia.org"; -import { getWalletById } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +import { getWalletById } from "@oko-wallet/oko-pg-interface/oko_wallets"; import { type UserAuthenticatedRequest, diff --git a/backend/tss_api/src/api/keygen/index.test.ts b/backend/tss_api/src/api/keygen/index.test.ts index 0169bef6e..fe5e9bc53 100644 --- a/backend/tss_api/src/api/keygen/index.test.ts +++ b/backend/tss_api/src/api/keygen/index.test.ts @@ -13,11 +13,11 @@ import { } from "@oko-wallet/oko-pg-interface/ks_nodes"; import { decryptData } from "@oko-wallet/crypto-js/node"; import { createPgConn } from "@oko-wallet/postgres-lib"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import { createWallet, getWalletById, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; import { resetPgDatabase } from "@oko-wallet-tss-api/testing/database"; diff --git a/backend/tss_api/src/api/keygen/index.ts b/backend/tss_api/src/api/keygen/index.ts index 370a86434..7144063a9 100644 --- a/backend/tss_api/src/api/keygen/index.ts +++ b/backend/tss_api/src/api/keygen/index.ts @@ -2,7 +2,7 @@ import { Pool } from "pg"; import { createUser, getUserByEmailAndAuthType, -} from "@oko-wallet/oko-pg-interface/ewallet_users"; +} from "@oko-wallet/oko-pg-interface/oko_users"; import type { Result } from "@oko-wallet/stdlib-js"; import { encryptDataAsync } from "@oko-wallet/crypto-js/node"; import { Bytes, type Bytes33 } from "@oko-wallet/bytes"; @@ -14,7 +14,7 @@ import { createWallet, getActiveWalletByUserIdAndCurveType, getWalletByPublicKey, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; import { createWalletKSNodes, getActiveKSNodes, diff --git a/backend/tss_api/src/api/presign/index.test.ts b/backend/tss_api/src/api/presign/index.test.ts index 2e2aea8f9..72e01b9eb 100644 --- a/backend/tss_api/src/api/presign/index.test.ts +++ b/backend/tss_api/src/api/presign/index.test.ts @@ -54,8 +54,8 @@ import { createPgConn } from "@oko-wallet/postgres-lib"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import { insertKSNode } from "@oko-wallet/oko-pg-interface/ks_nodes"; import { insertCustomer } from "@oko-wallet/oko-pg-interface/customers"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; -import { createWallet } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; +import { createWallet } from "@oko-wallet/oko-pg-interface/oko_wallets"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; import { resetPgDatabase } from "@oko-wallet-tss-api/testing/database"; diff --git a/backend/tss_api/src/api/sign/index.test.ts b/backend/tss_api/src/api/sign/index.test.ts index 7b26d8b00..ddac66d3b 100644 --- a/backend/tss_api/src/api/sign/index.test.ts +++ b/backend/tss_api/src/api/sign/index.test.ts @@ -60,8 +60,8 @@ import { createPgConn } from "@oko-wallet/postgres-lib"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import { insertKSNode } from "@oko-wallet/oko-pg-interface/ks_nodes"; import { insertCustomer } from "@oko-wallet/oko-pg-interface/customers"; -import { createWallet } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createWallet } from "@oko-wallet/oko-pg-interface/oko_wallets"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; import { resetPgDatabase } from "@oko-wallet-tss-api/testing/database"; diff --git a/backend/tss_api/src/api/triples/index.test.ts b/backend/tss_api/src/api/triples/index.test.ts index 132bb78a0..b966193c4 100644 --- a/backend/tss_api/src/api/triples/index.test.ts +++ b/backend/tss_api/src/api/triples/index.test.ts @@ -42,8 +42,8 @@ import { } from "@oko-wallet/oko-pg-interface/tss"; import { createPgConn } from "@oko-wallet/postgres-lib"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; -import { createWallet } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createWallet } from "@oko-wallet/oko-pg-interface/oko_wallets"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import { insertCustomer } from "@oko-wallet/oko-pg-interface/customers"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; diff --git a/backend/tss_api/src/api/tss_session/index.test.ts b/backend/tss_api/src/api/tss_session/index.test.ts index 711b5a36b..8210950ad 100644 --- a/backend/tss_api/src/api/tss_session/index.test.ts +++ b/backend/tss_api/src/api/tss_session/index.test.ts @@ -5,8 +5,8 @@ import { createPgConn } from "@oko-wallet/postgres-lib"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import { createTssSession } from "@oko-wallet/oko-pg-interface/tss"; import { insertCustomer } from "@oko-wallet/oko-pg-interface/customers"; -import { createWallet } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createWallet } from "@oko-wallet/oko-pg-interface/oko_wallets"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import { TssStageType, TriplesStageStatus } from "@oko-wallet/oko-types/tss"; import { napiRunTriples2ClientStep1, diff --git a/backend/tss_api/src/api/user/index.test.ts b/backend/tss_api/src/api/user/index.test.ts index f670fca7e..1f13a20e3 100644 --- a/backend/tss_api/src/api/user/index.test.ts +++ b/backend/tss_api/src/api/user/index.test.ts @@ -1,6 +1,6 @@ import { Pool } from "pg"; import { createPgConn } from "@oko-wallet/postgres-lib"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import { type KeyShareNode } from "@oko-wallet/oko-types/tss"; import { @@ -10,7 +10,7 @@ import { import { createWallet, updateWalletStatus, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; import { resetPgDatabase } from "@oko-wallet-tss-api/testing/database"; diff --git a/backend/tss_api/src/api/user/index.ts b/backend/tss_api/src/api/user/index.ts index b11828fc4..6b0ece066 100644 --- a/backend/tss_api/src/api/user/index.ts +++ b/backend/tss_api/src/api/user/index.ts @@ -2,7 +2,7 @@ import { Pool } from "pg"; import { getActiveWalletByUserIdAndCurveType, getWalletByPublicKey, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; import type { CheckEmailResponse, ReshareReason, @@ -11,7 +11,7 @@ import type { } from "@oko-wallet/oko-types/user"; import type { AuthType } from "@oko-wallet/oko-types/auth"; import type { OkoApiResponse } from "@oko-wallet/oko-types/api_response"; -import { getUserByEmailAndAuthType } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { getUserByEmailAndAuthType } from "@oko-wallet/oko-pg-interface/oko_users"; import { getActiveKSNodes, getWalletKSNodesByWalletId, diff --git a/backend/tss_api/src/api/utils.ts b/backend/tss_api/src/api/utils.ts index 73c2d9a30..cde2f960d 100644 --- a/backend/tss_api/src/api/utils.ts +++ b/backend/tss_api/src/api/utils.ts @@ -1,4 +1,4 @@ -import { getWalletByIdWithEmail } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +import { getWalletByIdWithEmail } from "@oko-wallet/oko-pg-interface/oko_wallets"; import { TssSessionState } from "@oko-wallet/oko-types/tss"; import type { Customer } from "@oko-wallet/oko-types/customers"; import type { diff --git a/backend/tss_api/src/routes/tss_session.test.ts b/backend/tss_api/src/routes/tss_session.test.ts index a8820ca62..cfc5dc59e 100644 --- a/backend/tss_api/src/routes/tss_session.test.ts +++ b/backend/tss_api/src/routes/tss_session.test.ts @@ -2,8 +2,8 @@ import { jest } from "@jest/globals"; import request from "supertest"; import type { Pool } from "pg"; import { createPgConn } from "@oko-wallet/postgres-lib"; -import { createWallet } from "@oko-wallet/oko-pg-interface/ewallet_wallets"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createWallet } from "@oko-wallet/oko-pg-interface/oko_wallets"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; diff --git a/backend/tss_api/src/routes/user.test.ts b/backend/tss_api/src/routes/user.test.ts index b47d4c136..46f34f5e9 100644 --- a/backend/tss_api/src/routes/user.test.ts +++ b/backend/tss_api/src/routes/user.test.ts @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; import request from "supertest"; import type { Pool } from "pg"; -import { createUser } from "@oko-wallet/oko-pg-interface/ewallet_users"; +import { createUser } from "@oko-wallet/oko-pg-interface/oko_users"; import { createPgConn } from "@oko-wallet/postgres-lib"; import type { WalletStatus } from "@oko-wallet/oko-types/wallets"; import type { KeyShareNode } from "@oko-wallet/oko-types/tss"; @@ -12,7 +12,7 @@ import { import { createWallet, updateWalletStatus, -} from "@oko-wallet/oko-pg-interface/ewallet_wallets"; +} from "@oko-wallet/oko-pg-interface/oko_wallets"; import { insertKeyShareNodeMeta } from "@oko-wallet/oko-pg-interface/key_share_node_meta"; import { testPgConfig } from "@oko-wallet-tss-api/database/test_config"; diff --git a/backend/user_dashboard_api/src/database/test_config.ts b/backend/user_dashboard_api/src/database/test_config.ts index d14fe4de2..07e357f74 100644 --- a/backend/user_dashboard_api/src/database/test_config.ts +++ b/backend/user_dashboard_api/src/database/test_config.ts @@ -1,7 +1,7 @@ import type { PgDatabaseConfig } from "@oko-wallet/postgres-lib"; export const testPgConfig: PgDatabaseConfig = { - database: "ewallet_dev", + database: "oko_dev", host: "localhost", password: "postgres", user: "postgres", diff --git a/common/oko_types/src/admin/user.ts b/common/oko_types/src/admin/user.ts index 9b54a77dd..c45fe6ecf 100644 --- a/common/oko_types/src/admin/user.ts +++ b/common/oko_types/src/admin/user.ts @@ -1,4 +1,4 @@ -export interface EWalletAdminUser { +export interface OkoAdminUser { user_id: string; email: string; password_hash: string;