// Variant setup for generate creds button from interactive-tutorial.js. // This version generates two sets of creds, one for the issuer and one for // the hot wallet / receiver const EXAMPLE_COLD_ADDR = "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe" const EXAMPLE_COLD_SECRET = "sIss█████████████████████████" function setup_2x_generate_step() { $("#generate-2x-creds-button").click( async (event) => { const block = $(event.target).closest(".interactive-block") block.find(".output-area").html("") block.find(".loader").show() // Get faucet URL (Testnet/Devnet/etc.) const faucet_url = $("#generate-2x-creds-button").data("fauceturl") try { const data = await call_faucet(faucet_url) const data2 = await call_faucet(faucet_url) block.find(".loader").hide() block.find(".output-area").html(`
${tl("Populated this page's examples with these credentials.")}
`) complete_step("Generate") } catch(err) { block.find(".loader").hide() block.find(".output-area").html( `${tl("Error:")} ${tl("There was an error connecting to the Faucet. Please try again.")}
`) return } }) } $(document).ready(() => { setup_2x_generate_step() })