From 1b7a621b60c9625228e8466b8462755e28ac6601 Mon Sep 17 00:00:00 2001 From: Jingles Date: Fri, 21 Feb 2025 20:42:03 +0800 Subject: [PATCH] update docs --- apps/playground/src/data/links-aiken.ts | 2 +- .../apis/wallets/meshwallet/load-wallet.tsx | 38 +++++++++++++------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/apps/playground/src/data/links-aiken.ts b/apps/playground/src/data/links-aiken.ts index 93f3ec22..05d3c60b 100644 --- a/apps/playground/src/data/links-aiken.ts +++ b/apps/playground/src/data/links-aiken.ts @@ -31,7 +31,7 @@ export const linksAiken: MenuItem[] = [ metaAikenFirstScript, metaAikenTransactions, metaAikenContractsLib, - metaAikenCourse, + // metaAikenCourse, ]; export const metaAiken: MenuItem = { diff --git a/apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx b/apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx index f659fe43..eab6f25c 100644 --- a/apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx +++ b/apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx @@ -189,6 +189,20 @@ function Left( with the address type:

+ +

Initialize wallet

+

+ After creating the wallet, we need to initialize it. This will + initialize the cryptography library. +

+ + +

+ With the wallet loaded, you can sign transactions, we will + see how to do this in the next section, for now lets get the wallet's + address: +

+ ); } @@ -240,11 +254,11 @@ function Right( words: _mnemonic, }, }); - // await _wallet.init(); + await _wallet.init(); setWallet(_wallet); - const addresses = _wallet.getAddresses(); - setResponseAddress(JSON.stringify(addresses, null, 2)); + const changeAddress = await _wallet.getChangeAddress(); + setResponseAddress(changeAddress); } } catch (error) { setResponseError(`${error}`); @@ -261,11 +275,11 @@ function Right( bech32: privatekey, }, }); - // await _wallet.init(); + await _wallet.init(); setWallet(_wallet); - const addresses = _wallet.getAddresses(); - setResponseAddress(JSON.stringify(addresses, null, 2)); + const changeAddress = await _wallet.getChangeAddress(); + setResponseAddress(changeAddress); } catch (error) { setResponseError(`${error}`); } @@ -283,11 +297,11 @@ function Right( stake, }, }); - // await _wallet.init(); + await _wallet.init(); setWallet(_wallet); - const addresses = _wallet.getAddresses(); - setResponseAddress(JSON.stringify(addresses, null, 2)); + const changeAddress = await _wallet.getChangeAddress(); + setResponseAddress(changeAddress); } catch (error) { setResponseError(`${error}`); } @@ -303,11 +317,11 @@ function Right( address: walletAddress, }, }); - // await _wallet.init(); + await _wallet.init(); setWallet(_wallet); - const addresses = _wallet.getAddresses(); - setResponseAddress(JSON.stringify(addresses, null, 2)); + const changeAddress = await _wallet.getChangeAddress(); + setResponseAddress(changeAddress); } catch (error) { setResponseError(`${error}`); }