Skip to content

Commit 33be7c4

Browse files
committed
Refactor turnkey files
1 parent 9768323 commit 33be7c4

File tree

5 files changed

+219
-220
lines changed

5 files changed

+219
-220
lines changed

packages/keychain/src/components/connect/create/social/api.ts

Lines changed: 0 additions & 106 deletions
This file was deleted.

packages/keychain/src/components/connect/create/social/auth0.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/keychain/src/components/connect/create/social/turnkey.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

packages/keychain/src/wallets/social/turnkey.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import {
33
getOrCreateTurnkeySuborg,
44
getTurnkeySuborg,
55
} from "@/components/connect/create/social/api";
6-
import { getOidcToken } from "@/components/connect/create/social/auth0";
7-
import {
8-
getOrCreateWallet,
9-
getWallet,
10-
} from "@/components/connect/create/social/turnkey";
116
import { Auth0Client, createAuth0Client } from "@auth0/auth0-spa-js";
127
import {
138
ExternalPlatform,
@@ -19,6 +14,11 @@ import { sha256 } from "@noble/hashes/sha2";
1914
import { bytesToHex } from "@noble/hashes/utils";
2015
import { Turnkey, TurnkeyIframeClient } from "@turnkey/sdk-browser";
2116
import { ethers, getAddress, getBytes, Signature } from "ethers";
17+
import {
18+
getAuth0OidcToken,
19+
getOrCreateWallet,
20+
getWallet,
21+
} from "./turnkey_utils";
2222

2323
const SOCIAL_PROVIDER_NAME = "discord";
2424

@@ -115,7 +115,7 @@ export class TurnkeyWallet {
115115

116116
const iFrameNonce = getNonce(iFramePublicKey);
117117
const tokenClaims = await auth0Client.getIdTokenClaims();
118-
const oidcTokenString = await getOidcToken(tokenClaims, iFrameNonce);
118+
const oidcTokenString = await getAuth0OidcToken(tokenClaims, iFrameNonce);
119119
if (!oidcTokenString) {
120120
throw new Error("No oidcTokenString");
121121
}

0 commit comments

Comments
 (0)