Freeze/interactive tutorials: edits per reviews

This commit is contained in:
mDuo13
2021-10-26 14:43:10 -07:00
parent 7c6257c2d8
commit 473f38329d
27 changed files with 57 additions and 56 deletions

View File

@@ -47,10 +47,10 @@ $(document).ready(() => {
<pre><code>${pretty_print(flags)}</code></pre>`)
if (flags.lsfNoFreeze) {
block.find(".output-area").append(`<p><i class="fa fa-check-circle"></i>
No Freeze is enabled.</p>`)
No Freeze flag is enabled.</p>`)
} else {
block.find(".output-area").append(`<p><i class="fa fa-times-circle"></i>
No Freeze Tag is DISABLED.</p>`)
No Freeze flag is DISABLED.</p>`)
}
complete_step("Confirm Settings")

View File

@@ -3,8 +3,8 @@
// The code for these steps is handled by interactive-tutorial.js
$(document).ready(() => {
// 3. Send AccountSet --------------------------------------------------------
// also 6. Send AccountSet to end the freeze.
// 3. Send AccountSet to Start the Freeze ------------------------------------
// also 6. Send AccountSet to End the Freeze.
$(".send-accountset").click( async (event) => {
const block = $(event.target).closest(".interactive-block")
const address = get_address(event)
@@ -17,10 +17,10 @@ $(document).ready(() => {
let step_name
if ($(event.target).data("action") === "start_freeze") {
astx["SetFlag"] = xrpl.AccountSetAsfFlags.asfGlobalFreeze
step_name = "Send AccountSet"
step_name = "Send AccountSet (Start Freeze)"
} else if ($(event.target).data("action") === "end_freeze") {
astx["ClearFlag"] = xrpl.AccountSetAsfFlags.asfGlobalFreeze
step_name = "End Freeze"
step_name = "Send AccountSet (End Freeze)"
} else {
show_error(block, "There was an error with this tutorial: the button clicked must have data-action defined.")
}
@@ -60,10 +60,10 @@ $(document).ready(() => {
<pre><code>${pretty_print(flags)}</code></pre>`)
if (flags.lsfGlobalFreeze) {
block.find(".output-area").append(`<p><i class="fa fa-check-circle"></i>
Global Freeze is enabled.</p>`)
Global Freeze flag is enabled.</p>`)
} else {
block.find(".output-area").append(`<p><i class="fa fa-times-circle"></i>
Global Freeze Tag is DISABLED.</p>`)
Global Freeze flag is DISABLED.</p>`)
}
complete_step("Confirm Settings")
@@ -73,7 +73,7 @@ $(document).ready(() => {
// 7. Wait for Validation: handled by generic full send as before.
// 8. Confirm Account Settings (freeze ended)
// 8. Confirm Account Settings (Freeze Ended)
$("#confirm-settings-end").click( async (event) => {
const block = $(event.target).closest(".interactive-block")
const address = get_address(event)

View File

@@ -89,8 +89,8 @@ $(document).ready(() => {
complete_step("Choose Trust Line")
})
// 4. Send TrustSet to freeze ------------------------------------------------
// also 7. Send TrustSet to end the freeze
// 4. Send TrustSet to Freeze ------------------------------------------------
// also 7. Send TrustSet to End the Freeze
$(".send-trustset").click( async (event) => {
const block = $(event.target).closest(".interactive-block")
const address = get_address(event)
@@ -128,7 +128,8 @@ $(document).ready(() => {
}
})
// 5. Wait for Validation is handled by the snippet
// 5. Wait for Validation: handled by interactive-tutorial.js and by the
// generic full send in the previous step. -----------------------------------
// 6. Check Trust Line Freeze Status
$("#confirm-settings").click( async (event) => {
@@ -171,6 +172,6 @@ $(document).ready(() => {
show_error(block, `Couldn't find a ${CURRENCY_TO_FREEZE} line between ${address} and ${peer.address}`)
})
// 7. Send TrustSet to End the Freeze is covered by the shared handler above
// 7. Send TrustSet to End the Freeze: same handler as step 4
})