add memos to tutorials

This commit is contained in:
jonathanlei
2023-01-24 18:03:41 -08:00
parent 61e0902d78
commit eebbfc2d23
3 changed files with 8 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ function TestNetCredentials(url, altnet_name, ws_url) {
destination: test_wallet.address,
memos: [
{
data: xrpl.convertStringToHex("xrpl.org-faucet"),
data: "xrpl.org-faucet",
},
],
}),

View File

@@ -271,10 +271,15 @@ async function call_faucet(faucet_url, destination) {
if (typeof destination != "undefined") {
body["destination"] = destination
}
body["memos"] = [
{
data: "xrpl.org-tutorials",
},
]
const response = await fetch(faucet_url, {
method: 'POST',
headers: {
"Content-Type": "application/json"
"Content-Type": "application/json; charset=utf-8"
},
body: JSON.stringify(body)
})

View File

@@ -16,7 +16,7 @@ labels:
<!-- Source for this specific tutorial's interactive bits: -->
<script type="application/javascript" src="assets/js/tutorials/use-tickets.js"></script>
{% set use_network = "Devnet" %}<!--TODO: change to Testnet eventually. NOTE, Testnet is a few days behind Mainnet in getting the amendment one enabled -->
{% set use_network = "Testnet" %}
This page provides JavaScript examples that use the [xrpl.js](https://js.xrpl.org/) library. See [Get Started Using JavaScript](get-started-using-javascript.html) for setup instructions.