Skip to content

Commit d67d71a

Browse files
committed
clean up
1 parent ccc5571 commit d67d71a

File tree

50 files changed

+113
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+113
-95
lines changed

apps/docs/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default async function RootLayout({
2727
params: { package: string };
2828
}) {
2929
// const {currentRoute} = useRouteContext();
30-
// console.log(2, currentRoute)
30+
3131
// let pages = await glob('**/*.mdx', { cwd: 'src/app' })
3232
// let allSectionsEntries = (await Promise.all(
3333
// pages.map(async (filename) => [

apps/docs/src/app/page.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export default function Home() {
6363

6464
// useEffect(() => {
6565
// const searchClasses = getClasses().map((meshClass: any) => {
66-
// console.log(11, meshClass);
6766

6867
// const _object: any = { url: `/classes/${meshClass.name}`, sections: [] };
6968

@@ -75,17 +74,14 @@ export default function Home() {
7574

7675
// _sections.push(_section);
7776

78-
// console.log(11, _section);
7977

8078
// getClassGroups(meshClass.name).map((group: any) => {
8179
// group.children.map((item: any) => {
82-
// console.log(22, item);
8380

8481
// item.signatures?.map((signature: any) => {
8582
// const _sectionComments = getSectionComments(signature);
8683
// const _section = [item.name, item.name, _sectionComments];
8784
// _sections.push(_section);
88-
// console.log(33, _section);
8985
// });
9086
// });
9187
// });
@@ -95,5 +91,4 @@ export default function Home() {
9591
// return _object;
9692
// });
9793

98-
// console.log(99, JSON.stringify(searchClasses))
9994
// }, []);

apps/playground/src/pages/about/support-us/donate-section.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export default function SendPayment() {
3838
);
3939

4040
const signedTx = await wallet.signTx(unsignedTx, true);
41-
const txHash = await wallet.submitTx(signedTx);
42-
console.log({ txHash });
41+
await wallet.submitTx(signedTx);
4342

4443
setLoading(false);
4544
setDone(true);

apps/playground/src/pages/apis/transaction/basics/coin-selection.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,28 @@ function Left() {
107107
then it will try to also pick up another UTxO from the wallet,
108108
containing the largest amount of lovelace.
109109
</p>
110-
<Codeblock data={codeKeepRelevantDesc} isJson={false} />
110+
<Codeblock data={codeKeepRelevantDesc} />
111111
<p>
112112
Here is an example how you can use <code>keepRelevant()</code>:
113113
</p>
114-
<Codeblock data={codeKeepRelevant} isJson={false} />
114+
<Codeblock data={codeKeepRelevant} />
115115

116116
<h3>Largest First</h3>
117117
<p>
118118
To select UTXOs for transaction that only requires lovelace, use{" "}
119119
<code>largestFirst</code>.
120120
</p>
121-
<Codeblock data={code3} isJson={false} />
121+
<Codeblock data={code3} />
122122
<p>For example, selecting the UTXOs for sending 10000000 lovelace:</p>
123-
<Codeblock data={codeSnippet1} isJson={false} />
123+
<Codeblock data={codeSnippet1} />
124124

125125
<h3>Largest First Multi-Asset</h3>
126126
<p>
127127
<code>largestFirstMultiAsset</code> allows you to define which native
128128
assets you require for sending out by defining a <code>Map</code>. The
129129
Map is matches the <code>Unit</code> with the quantity of each asset.
130130
</p>
131-
<Codeblock data={code4} isJson={false} />
131+
<Codeblock data={code4} />
132132
<p>
133133
Note that if lovelace, aside from the "minimum Ada" which in any case
134134
needs to accompany the other assets, this must be explicitly specified.
@@ -137,7 +137,7 @@ function Left() {
137137
all multiasset UTxOs from the selection, which can result in more
138138
efficient selection of the required UTxOs.
139139
</p>
140-
<Codeblock data={codeSnippet2} isJson={false} />
140+
<Codeblock data={codeSnippet2} />
141141
<p>
142142
The third parameter is <code>includeTxFees</code>. If <code>True</code>,
143143
Mesh will calculate the fees required for the transaction, and include

apps/playground/src/pages/apis/transaction/minting/burning-one-signature.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ function Left(userInput: string) {
6363
"minting address". Note that, assets can only be burned by its minting
6464
address.
6565
</p>
66-
<Codeblock data={codeSnippet1} isJson={false} />
66+
<Codeblock data={codeSnippet1} />
6767
<p>
6868
Then, we define <code>Asset</code> and set <code>tx.burnAsset()</code>
6969
</p>
70-
<Codeblock data={codeSnippet2} isJson={false} />
70+
<Codeblock data={codeSnippet2} />
7171
<p>Here is the full code:</p>
72-
<Codeblock data={codeSnippet} isJson={false} />
72+
<Codeblock data={codeSnippet} />
7373
</>
7474
);
7575
}

apps/playground/src/pages/apis/transaction/minting/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { NextPage } from "next";
33
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
44
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
55
import Metatags from "~/components/site/metatags";
6-
import Codeblock from "~/components/text/codeblock";
76
import { metaMinting } from "~/data/links-transactions";
87
import { Intro } from "../common";
98
import BurningOneSignature from "./burning-one-signature";

apps/playground/src/pages/apis/transaction/minting/minting-royalty-token.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function Left() {
7676
</p>
7777

7878
<p>Here is the full code:</p>
79-
<Codeblock data={codeSnippet} isJson={false} />
79+
<Codeblock data={codeSnippet} />
8080
</>
8181
);
8282
}

apps/playground/src/pages/apis/transaction/smart-contract/designing-datum.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,28 +103,28 @@ function Left() {
103103

104104
<h3>A string</h3>
105105
<p>A datum as simple as just a string, preferably a hex string.</p>
106-
<Codeblock data={codeSnippetdatumString} isJson={false} />
106+
<Codeblock data={codeSnippetdatumString} />
107107
<h3>A number</h3>
108108
<p>It can also be a number.</p>
109-
<Codeblock data={codeSnippetdatumNumber} isJson={false} />
109+
<Codeblock data={codeSnippetdatumNumber} />
110110
<h3>An array</h3>
111111
<p>
112112
Or an array, where each item can be either a string, number, a list, or
113113
a map.
114114
</p>
115-
<Codeblock data={codeSnippetdatumList} isJson={false} />
115+
<Codeblock data={codeSnippetdatumList} />
116116
<h3>A Map</h3>
117117
<p>
118118
It can also be a map, where both the keys and its values can be a
119119
string, number, a list, or a map.
120120
</p>
121-
<Codeblock data={codeSnippetdatumMap} isJson={false} />
121+
<Codeblock data={codeSnippetdatumMap} />
122122
<h3>With constructor</h3>
123123
<p>
124124
Or a datum with a constructor, where <code>alternative</code> is a
125125
number, and <code>fields</code> is an array.
126126
</p>
127-
<Codeblock data={codeSnippetdatumConstructor} isJson={false} />
127+
<Codeblock data={codeSnippetdatumConstructor} />
128128
</>
129129
);
130130
}

apps/playground/src/pages/apis/transaction/smart-contract/inline-datum.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Left() {
4848
.
4949
</p>
5050
<p>Here's an example of creating a UTxO with inline datum:</p>
51-
<Codeblock data={codeExample} isJson={false} />
51+
<Codeblock data={codeExample} />
5252
<p>
5353
As you can see, you simply have to define the <code>datum</code> field
5454
in the <code>Recipient</code> input parameter, including a (

apps/playground/src/pages/apis/transaction/smart-contract/reference-script.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Left() {
4343
us to send (for example) multiple scripts within one transaction without
4444
exceeding the maximum transaction size.
4545
</p>
46-
<Codeblock data={codeExample} isJson={false} />
46+
<Codeblock data={codeExample} />
4747
<p>
4848
Simply define the <code>script</code> as the <code>Recipient</code>{" "}
4949
input parameter. This works for every{" "}

apps/playground/src/pages/apis/transaction/smart-contract/unlock-assets.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ function Left() {
9696
any of the providers which are implemented by Mesh can be used (see{" "}
9797
<Link href="/apis/providers">Providers</Link>).
9898
</p>
99-
<Codeblock data={codeSnippetGetAssetUtxo} isJson={false} />
99+
<Codeblock data={codeSnippetGetAssetUtxo} />
100100
<p>
101101
For this demo, we search for the UTxO by using the datum that we have
102102
set in the previous step. In fact, depends on the redeemer logic of the
103103
script, only a transaction with the corrent datum supplied is able to
104104
unlock the assets. We query the script address for the UTxO that
105105
contains the correct data hash:
106106
</p>
107-
<Codeblock data={codeSnippetCallAssetUtxo} isJson={false} />
107+
<Codeblock data={codeSnippetCallAssetUtxo} />
108108
<p>
109109
Then, we create the transaction to unlock the asset. We use the{" "}
110110
<code>redeemValue</code> method. The method takes the asset UTxO, the
@@ -113,12 +113,12 @@ function Left() {
113113
address. The <code>setRequiredSigners</code> method is used to set the
114114
required signers for the transaction.
115115
</p>
116-
<Codeblock data={codeSnippetCreateTx} isJson={false} />
116+
<Codeblock data={codeSnippetCreateTx} />
117117
<p>
118118
Lastly, we build and sign the transaction. Note that here we need to set
119119
the 'partial sign' parameter to <code>true</code>.
120120
</p>
121-
<Codeblock data={codeSnippetSign} isJson={false} />
121+
<Codeblock data={codeSnippetSign} />
122122
</>
123123
);
124124
}

apps/playground/src/pages/apis/transaction/smart-contract/using-redeemer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ function Left() {
7070
<code>StartRedeemer</code>
7171
as defined above with the first <code>Used Address</code> as input:
7272
</p>
73-
<Codeblock data={firstRedeemer} isJson={false} />
73+
<Codeblock data={firstRedeemer} />
7474
<p>
7575
Supplying the <code>SecondRedeemer</code> as defined above:
7676
</p>
77-
<Codeblock data={secondRedeemer} isJson={false} />
77+
<Codeblock data={secondRedeemer} />
7878
<p>
7979
Supplying the <code>EndRedeemer</code> as defined above:
8080
</p>
81-
<Codeblock data={thirdRedeemer} isJson={false} />
81+
<Codeblock data={thirdRedeemer} />
8282
<h3>Transaction construction</h3>
8383
<p>
8484
Within the transaction, we can include the redeemer within{" "}
8585
<code>redeemValue</code>:
8686
</p>
87-
<Codeblock data={txWithRedeemer} isJson={false} />
87+
<Codeblock data={txWithRedeemer} />
8888
</>
8989
);
9090
}

apps/playground/src/pages/apis/transaction/staking/deregister-stake.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Left() {
3030
<b>rewardAddress (string)</b> - the reward address to deregister
3131
</li>
3232
</ul>
33-
<Codeblock data={codeSnippet} isJson={false} />
33+
<Codeblock data={codeSnippet} />
3434
</>
3535
);
3636
}

apps/playground/src/pages/apis/transaction/staking/register-stake.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ function Left() {
5555
. For example this account information, <code>active</code> shows the
5656
address is registered.
5757
</p>
58-
<Codeblock data={code2} isJson={false} />
58+
<Codeblock data={code2} />
5959
<p>
6060
You can chain with <code>delegateStake()</code> to register and delegate
6161
to a stake pool.
6262
</p>
63-
<Codeblock data={codeSnippet} isJson={false} />
63+
<Codeblock data={codeSnippet} />
6464
</>
6565
);
6666
}

apps/playground/src/pages/apis/transaction/staking/withdraw-stake.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function Left() {
3636
<b>lovelace (number)</b> - the amount to withdraw in Lovelace
3737
</li>
3838
</ul>
39-
<Codeblock data={codeSnippet} isJson={false} />
39+
<Codeblock data={codeSnippet} />
4040
</>
4141
);
4242
}

apps/playground/src/pages/apis/txbuilder/minting/burning-one-signature.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ function Left(userInput: string) {
7070
"minting address". Note that, assets can only be burned by its minting
7171
address.
7272
</p>
73-
<Codeblock data={codeSnippet1} isJson={false} />
73+
<Codeblock data={codeSnippet1} />
7474
<p>
7575
Then, we define <code>Asset</code> and set <code>tx.burnAsset()</code>
7676
</p>
77-
<Codeblock data={codeSnippet2} isJson={false} />
77+
<Codeblock data={codeSnippet2} />
7878
<p>Here is the full code:</p>
79-
<Codeblock data={codeSnippet} isJson={false} />
79+
<Codeblock data={codeSnippet} />
8080
</>
8181
);
8282
}

apps/playground/src/pages/apis/txbuilder/minting/minting-royalty-token.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function Left() {
7878
</p>
7979

8080
<p>Here is the full code:</p>
81-
<Codeblock data={codeSnippet} isJson={false} />
81+
<Codeblock data={codeSnippet} />
8282
</>
8383
);
8484
}

apps/playground/src/pages/apis/wallets/browserwallet/get-available-wallets.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ function Left() {
5151
</ul>
5252
<p>Example:</p>
5353
<Codeblock data={example} />
54+
55+
<p>
56+
With NuFi's support, you can specify the network to connect to. By
57+
default, it is set to "preprod". To define the <code>nufiNetwork</code>:
58+
</p>
59+
<Codeblock
60+
data={`await BrowserWallet.getAvailableWallets({ nufiNetwork: "mainnet" })`}
61+
/>
62+
<p>Available networks are:</p>
63+
<ul>
64+
<li>production: https://wallet.nu.fi</li>
65+
<li>mainnet: https://wallet-staging.nu.fi</li>
66+
<li>preprod: https://wallet-testnet-staging.nu.fi</li>
67+
<li>preview: https://wallet-preview-staging.nu.fi</li>
68+
</ul>
69+
<p>You can also specify the network by providing the URL:</p>
70+
<Codeblock
71+
data={`await BrowserWallet.getAvailableWallets({ nufiNetwork: "https://wallet.nu.fi" })`}
72+
/>
5473
</>
5574
);
5675
}

apps/playground/src/pages/apis/wallets/browserwallet/sign-data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function Right() {
116116
// placeholder="Payload"
117117
// label="Payload"
118118
// />
119-
// <Codeblock data={code} />
119+
// <Codeblock data={code} />
120120
// <RunDemoButton
121121
// runDemoFn={runDemo}
122122
// loading={loading}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function Left(
150150
file, and load wallet with Cardano CLI generated skeys. Stake key is
151151
optional, but without it, you cannot sign staking transactions.
152152
</p>
153-
<Codeblock data={code4} isJson={false} />
153+
<Codeblock data={code4} />
154154
</>
155155
);
156156
}

apps/playground/src/pages/guides/aiken.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ const assetUtxo = await _getAssetUtxo({
248248
asset: "lovelace",
249249
datum: datum,
250250
});
251-
console.log("assetUtxo", assetUtxo);
252251
253252
const redeemer = { data: { alternative: 0, fields: ['Hello, World!'] } };
254253

apps/playground/src/pages/guides/standalone.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ const tx = new Transaction({ initiator: wallet }).sendLovelace(
111111
const unsignedTx = await tx.build();
112112
const signedTx = await wallet.signTx(unsignedTx);
113113
const txHash = await wallet.submitTx(signedTx);
114-
console.log(txHash);
115114
```
116115

117116
Explanation:

apps/playground/src/pages/providers/blockfrost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const ReactPage: NextPage = () => {
7373
If you are using a privately hosted Blockfrost instance, you can set
7474
the URL in the parameter:
7575
</p>
76-
<Codeblock data={code2} isJson={false} />
76+
<Codeblock data={code2} />
7777
</TitleIconDescriptionBody>
7878

7979
<ProviderFetchers

apps/playground/src/pages/providers/evaluators/evaluate-tx.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ function Left(userInput: string) {
6969
spend more than you need to execute transactions for this smart
7070
contract.
7171
</p>
72-
<Codeblock data={code1} isJson={false} />
72+
<Codeblock data={code1} />
7373
<p>
7474
Example responses from unlocking assets from the always succeed smart
7575
contract.
7676
</p>
77-
<Codeblock data={demoResults} isJson={false} />
77+
<Codeblock data={demoResults} />
7878
<p>
7979
With the <code>mem</code> and <code>steps</code>, you can refine the
8080
budget for the redeemer. For example:
8181
</p>
82-
<Codeblock data={codeRedeemer} isJson={false} />
82+
<Codeblock data={codeRedeemer} />
8383
</>
8484
);
8585
}

0 commit comments

Comments
 (0)