Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub struct DispenseInput {
pub struct DispenseResponse {
pub status: String,
pub tokens: u64,
pub tx_id: String,
}

#[derive(Debug)]
Expand Down
1 change: 1 addition & 0 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ pub async fn dispense_tokens(
Ok(DispenseResponse {
status: "Success".to_string(),
tokens: config.dispense_amount,
tx_id: tx_id.to_string(),
})
}

Expand Down
7 changes: 2 additions & 5 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ <h2 class="response-title">Test Ether sent to the wallet</h2>
<div class="provider-url">Node url: {{ public_node_url }}</div>
<script>
const faucetApp = (function () {
let providerUrl = "{{ public_node_url }}";
let blockExplorer = "https://fuellabs.github.io/block-explorer-v2";
let blockExplorer = "https://app.fuel.network";
let query = params = new URLSearchParams(document.location.search);
let address = query.get('address');

Expand Down Expand Up @@ -321,9 +320,7 @@ <h2 class="response-title">Test Ether sent to the wallet</h2>
document.getElementById("response").style.display = "block";
document.getElementById(
"explorer-link"
).href = `${blockExplorer}/address/${address}?providerUrl=${encodeURIComponent(
providerUrl
)}`;
).href = `${blockExplorer}/tx/0x${data.tx_id}`;
} else {
document.getElementById("response-failure").innerText = data.error;
hideWaiting();
Expand Down