Skip to content

Commit

Permalink
update tkey examples to latest alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushBherwani1998 committed Jun 24, 2024
1 parent 6ee3d44 commit f8d0075
Show file tree
Hide file tree
Showing 20 changed files with 725 additions and 1,729 deletions.
512 changes: 160 additions & 352 deletions tkey-web/quick-starts/tkey-angular-quick-start/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tkey-web/quick-starts/tkey-angular-quick-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"@angular/platform-browser": "~14.2.7",
"@angular/platform-browser-dynamic": "~14.2.7",
"@angular/router": "~14.2.7",
"@tkey/core": "^13.0.0-alpha.4",
"@tkey/service-provider-sfa": "^11.0.0",
"@tkey/share-serialization": "^13.0.0-alpha.4",
"@tkey/storage-layer-torus": "^13.0.0-alpha.4",
"@tkey/web-storage": "^13.0.0-alpha.4",
"@tkey/core": "^13.0.0-alpha.6",
"@tkey/service-provider-sfa": "^13.0.0-alpha.6",
"@tkey/share-serialization": "^13.0.0-alpha.6",
"@tkey/storage-layer-torus": "^13.0.0-alpha.6",
"@tkey/web-storage": "^13.0.0-alpha.6",
"@web3auth/base": "^7.2.1",
"@web3auth/ethereum-provider": "^7.2.1",
"empty-module": "^0.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,6 @@ export class AppComponent {

app = initializeApp(firebaseConfig);

async ngOnInit() {
const init = async () => {
try {
await (tKey.serviceProvider as SfaServiceProvider).init(
ethereumPrivateKeyProvider,
);
} catch (error) {
console.error(error);
}
};

init();
}

signInWithGoogle = async (): Promise<UserCredential> => {
try {
const auth = getAuth(this.app);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const chainConfig = {
const web3AuthOptions: any = {
clientId, // Get your Client ID from Web3Auth Dashboard
chainConfig,
web3AuthNetwork: 'sapphire_mainnet',
network: 'sapphire_mainnet',
};

// Configuration of Service Provider
Expand Down
15 changes: 0 additions & 15 deletions tkey-web/quick-starts/tkey-nextjs-quick-start/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,6 @@ function App() {
// Firebase Initialisation
const app = initializeApp(firebaseConfig);

useEffect(() => {
const init = async () => {
// Initialization of Service Provider
try {
await (tKey.serviceProvider as any).init(
ethereumPrivateKeyProvider,
);
} catch (error) {
console.error(error);
}
};

init();
}, []);

const signInWithGoogle = async (): Promise<UserCredential> => {
try {
const auth = getAuth(app);
Expand Down
2 changes: 1 addition & 1 deletion tkey-web/quick-starts/tkey-nextjs-quick-start/app/tkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const chainConfig = {
const web3AuthOptions: any = {
clientId, // Get your Client ID from Web3Auth Dashboard
chainConfig,
web3AuthNetwork: 'sapphire_mainnet',
network: 'sapphire_mainnet',
};

// Configuration of Service Provider
Expand Down
Loading

0 comments on commit f8d0075

Please sign in to comment.