Skip to content

Commit fc3178c

Browse files
authored
Merge branch 'main' into feature/unbalanced-tx
2 parents 1929dbc + 782bf84 commit fc3178c

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

apps/playground/src/data/links-aiken.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const linksAiken: MenuItem[] = [
3131
metaAikenFirstScript,
3232
metaAikenTransactions,
3333
metaAikenContractsLib,
34-
metaAikenCourse,
34+
// metaAikenCourse,
3535
];
3636

3737
export const metaAiken: MenuItem = {

apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,20 @@ function Left(
189189
with the <code>address</code> type:
190190
</p>
191191
<Codeblock data={code5} />
192+
193+
<h3>Initialize wallet</h3>
194+
<p>
195+
After creating the wallet, we need to initialize it. This will
196+
initialize the cryptography library.
197+
</p>
198+
<Codeblock data={`await wallet.init()`} />
199+
200+
<p>
201+
With the <code>wallet</code> loaded, you can sign transactions, we will
202+
see how to do this in the next section, for now lets get the wallet's
203+
address:
204+
</p>
205+
<Codeblock data={code2} />
192206
</>
193207
);
194208
}
@@ -240,11 +254,11 @@ function Right(
240254
words: _mnemonic,
241255
},
242256
});
243-
// await _wallet.init();
257+
await _wallet.init();
244258
setWallet(_wallet);
245259

246-
const addresses = _wallet.getAddresses();
247-
setResponseAddress(JSON.stringify(addresses, null, 2));
260+
const changeAddress = await _wallet.getChangeAddress();
261+
setResponseAddress(changeAddress);
248262
}
249263
} catch (error) {
250264
setResponseError(`${error}`);
@@ -261,11 +275,11 @@ function Right(
261275
bech32: privatekey,
262276
},
263277
});
264-
// await _wallet.init();
278+
await _wallet.init();
265279
setWallet(_wallet);
266280

267-
const addresses = _wallet.getAddresses();
268-
setResponseAddress(JSON.stringify(addresses, null, 2));
281+
const changeAddress = await _wallet.getChangeAddress();
282+
setResponseAddress(changeAddress);
269283
} catch (error) {
270284
setResponseError(`${error}`);
271285
}
@@ -283,11 +297,11 @@ function Right(
283297
stake,
284298
},
285299
});
286-
// await _wallet.init();
300+
await _wallet.init();
287301
setWallet(_wallet);
288302

289-
const addresses = _wallet.getAddresses();
290-
setResponseAddress(JSON.stringify(addresses, null, 2));
303+
const changeAddress = await _wallet.getChangeAddress();
304+
setResponseAddress(changeAddress);
291305
} catch (error) {
292306
setResponseError(`${error}`);
293307
}
@@ -303,11 +317,11 @@ function Right(
303317
address: walletAddress,
304318
},
305319
});
306-
// await _wallet.init();
320+
await _wallet.init();
307321
setWallet(_wallet);
308322

309-
const addresses = _wallet.getAddresses();
310-
setResponseAddress(JSON.stringify(addresses, null, 2));
323+
const changeAddress = await _wallet.getChangeAddress();
324+
setResponseAddress(changeAddress);
311325
} catch (error) {
312326
setResponseError(`${error}`);
313327
}

0 commit comments

Comments
 (0)