|
1 | | -import initLinera, { Faucet, Client, Wallet, Application } from "@linera/client"; |
| 1 | +import { initialize, Faucet, Client, Wallet, Application } from "@linera/client"; |
2 | 2 | import type { Wallet as DynamicWallet } from "@dynamic-labs/sdk-react-core"; |
3 | 3 | import { DynamicSigner } from "./dynamic-signer"; |
4 | 4 |
|
@@ -41,7 +41,7 @@ export class LineraAdapter { |
41 | 41 | console.log("🔗 Connecting with Dynamic wallet:", address); |
42 | 42 |
|
43 | 43 | try { |
44 | | - if (!this.wasmInitPromise) this.wasmInitPromise = initLinera(); |
| 44 | + if (!this.wasmInitPromise) this.wasmInitPromise = initialize(); |
45 | 45 | await this.wasmInitPromise; |
46 | 46 | console.log("✅ Linera WASM modules initialized successfully"); |
47 | 47 | } catch (e) { |
@@ -105,15 +105,15 @@ export class LineraAdapter { |
105 | 105 | async setApplications(appId: string, previousAppIds: string[]) { |
106 | 106 | if (!this.provider) throw new Error("Not connected to Linera"); |
107 | 107 |
|
108 | | - const application = await this.provider.client.frontend().application(appId); |
| 108 | + const application = await this.provider.client.application(appId); |
109 | 109 |
|
110 | 110 | if (!application) throw new Error("Failed to get application"); |
111 | 111 | this.application = application; |
112 | 112 | console.log("✅ Linera application set successfully: ", appId); |
113 | 113 |
|
114 | 114 | const applications = [] |
115 | 115 | for (const appId of previousAppIds) { |
116 | | - const application = await this.provider.client.frontend().application(appId); |
| 116 | + const application = await this.provider.client.application(appId); |
117 | 117 | if (!application) throw new Error("Failed to get previous application"); |
118 | 118 | applications.push(application); |
119 | 119 | } |
|
0 commit comments