Skip to content

Commit 369b78d

Browse files
committed
Adapt to work with latest version of linera-web
1 parent 052b2f3 commit 369b78d

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

examples/hosted-counter/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ <h2>Chain history for <code id="chain-id" class="hex">requesting chain…</code>
6969
async function run() {
7070
await linera.default();
7171
const faucet = await new linera.Faucet('http://127.0.0.1:8080');
72-
const metamask_signer = await new signer.MetaMaskEIP191Signer();
72+
const embedded_signer = await new signer.EmbeddedEIP191Signer("f77a21701522a03b01c111ad2d2cdaf2b8403b47507ee0aec3c2e52b765d7a66");
7373
const wallet = await faucet.createWallet();
74-
const owner = await metamask_signer.getConnectedAddress();
74+
const owner = embedded_signer.address();
7575
document.getElementById('owner').innerText = owner;
7676
document.getElementById('chain-id').innerText = await faucet.claimChain(wallet, owner);
77-
const client = await new linera.Client(wallet, metamask_signer);
77+
const client = await new linera.Client(wallet, embedded_signer);
7878
const counter = await client.frontend().application(COUNTER_APP_ID);
7979
const logs = document.getElementById('logs');
8080
const incrementButton = document.getElementById('increment-btn');

examples/hosted-fungible/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,11 @@ <h2>Chain history for <code id="chain-id" class="hex">requesting a new microchai
219219
});
220220

221221
await linera.default();
222-
throw new Error('INSERT FAUCET URL HERE'); // Replace with your Linera Faucet URL
223-
// const faucet = await new linera.Faucet(FAUCET URL HERE);
222+
const faucet = await new linera.Faucet('http://127.0.0.1:8080');
224223
throw new Error('INSERT PRIVKEY HERE'); // Replace with your private key
225-
// const embedded_signer = await new signer.EmbeddedSigner("INSERT PRIVKEY HERE");
224+
const embedded_signer = await new signer.EmbeddedEIP191Signer("f77a21701522a03b01c111ad2d2cdaf2b8403b47507ee0aec3c2e52b765d7a66");
226225
const wallet = await faucet.createWallet();
227-
const owner = await embedded_signer.address();
226+
const owner = embedded_signer.address();
228227
const chainId = await faucet.claimChain(wallet, owner);
229228
const client = await new linera.Client(wallet, embedded_signer);
230229
document.querySelector('#chain-id').innerText = chainId;

extension/src/wallet/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class Server {
1111
async setWallet(wallet: string) {
1212
this.wallet = wallet;
1313
await linera;
14-
this.client = await new linera.Client({} as linera.Wallet, {} as linera.IJsSigner); // Replace with actual wallet initialization
14+
this.client = await new linera.Client({} as linera.Wallet, {} as linera.Signer); // Replace with actual wallet initialization
1515
this.client.onNotification((notification: any) => {
1616
console.debug('got notification for', this.subscribers.size, 'subscribers:', notification);
1717
for (const subscriber of this.subscribers.values()) {

linera-protocol

Submodule linera-protocol updated 129 files

0 commit comments

Comments
 (0)