mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Merge branch 'master' of https://github.com/JakeatRipple/xrpl-dev-portal into feat-use-cases
# Conflicts: # assets/css/devportal2022-v13.css # styles/light/_light-theme.scss
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
DEFAULT_ADDRESS_1 = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
DEFAULT_ADDRESS_2 = "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX"
|
||||
TST_ISSUER = "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
|
||||
Request("Account Methods")
|
||||
|
||||
@@ -291,20 +292,19 @@ Request('ledger_entry - DepositPreauth', {
|
||||
}
|
||||
})
|
||||
|
||||
// Waiting for TicketBatch amendment on Mainnet
|
||||
// Request('ledger_entry - Ticket', {
|
||||
// description: "Returns a Ticket object in its raw ledger format.",
|
||||
// link: "ledger_entry.html#get-ticket-object",
|
||||
// body: {
|
||||
// "id": "example_get_ticket",
|
||||
// "command": "ledger_entry",
|
||||
// "ticket": {
|
||||
// "owner": DEFAULT_ADDRESS_1,
|
||||
// "ticket_sequence": 0 // TODO: make a real ticket, fill in the seq
|
||||
// },
|
||||
// "ledger_index": "validated"
|
||||
// }
|
||||
// })
|
||||
Request('ledger_entry - Ticket', {
|
||||
description: "Returns a Ticket object in its raw ledger format.",
|
||||
link: "ledger_entry.html#get-ticket-object",
|
||||
body: {
|
||||
"id": "example_get_ticket",
|
||||
"command": "ledger_entry",
|
||||
"ticket": {
|
||||
"account": DEFAULT_ADDRESS_1,
|
||||
"ticket_seq": 389 // This is a real ticket on Mainnet.
|
||||
},
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Request("Transaction Methods")
|
||||
@@ -475,6 +475,22 @@ Request('ripple_path_find', {
|
||||
}
|
||||
})
|
||||
|
||||
Request('amm_info', {
|
||||
description: "Looks up info on an Automated Market Maker instance.",
|
||||
link: "amm_info.html",
|
||||
status: "not_enabled",
|
||||
body: {
|
||||
"command": "amm_info",
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency": "TST",
|
||||
"issuer": TST_ISSUER
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Request("Payment Channel Methods")
|
||||
|
||||
Request('channel_authorize', {
|
||||
|
||||
@@ -27,7 +27,7 @@ async function wait_for_seq(network_url, address) {
|
||||
}
|
||||
|
||||
|
||||
function rippleTestNetCredentials(url, altnet_name) {
|
||||
function TestNetCredentials(url, altnet_name, ws_url) {
|
||||
|
||||
const credentials = $('#your-credentials')
|
||||
const address = $('#address')
|
||||
@@ -72,13 +72,7 @@ function rippleTestNetCredentials(url, altnet_name) {
|
||||
balance.hide().html('<h3>Balance</h3> ' +
|
||||
Number(data.amount).toLocaleString('en') + ' XRP').fadeIn('fast')
|
||||
sequence.html('<h3>Sequence</h3> <img class="throbber" src="assets/img/xrp-loader-96.png"> Waiting...').fadeIn('fast')
|
||||
if (altnet_name=="Testnet") {
|
||||
wait_for_seq("wss://s.altnet.rippletest.net:51233", test_wallet.address)
|
||||
} else if (altnet_name=="NFT-Devnet") {
|
||||
wait_for_seq("wss://xls20-sandbox.rippletest.net:51233", test_wallet.address)
|
||||
} else {
|
||||
wait_for_seq("wss://s.devnet.rippletest.net:51233", test_wallet.address)
|
||||
}
|
||||
wait_for_seq(ws_url, test_wallet.address)
|
||||
|
||||
},
|
||||
error: function() {
|
||||
@@ -89,20 +83,11 @@ function rippleTestNetCredentials(url, altnet_name) {
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
function testnet_click(evt) {
|
||||
rippleTestNetCredentials("https://faucet.altnet.rippletest.net/accounts",
|
||||
"Testnet")
|
||||
}
|
||||
function devnet_click(evt) {
|
||||
rippleTestNetCredentials("https://faucet.devnet.rippletest.net/accounts",
|
||||
"Devnet")
|
||||
}
|
||||
function nftnet_click(evt) {
|
||||
rippleTestNetCredentials("https://faucet-nft.ripple.com/accounts",
|
||||
"NFT-Devnet")
|
||||
}
|
||||
|
||||
$('#testnet-creds-button').click(testnet_click)
|
||||
$('#devnet-creds-button').click(devnet_click)
|
||||
$('#nftnet-creds-button').click(nftnet_click)
|
||||
$('#generate-creds-button').click( (evt) => {
|
||||
const checked_network = $("input[name='faucet-selector']:checked")
|
||||
const url = checked_network.val()
|
||||
const net_name = checked_network.data("shortname")
|
||||
const ws_url = checked_network.data("wsurl")
|
||||
TestNetCredentials(url, net_name, ws_url)
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user