diff --git a/resources/templates/account.html b/resources/templates/account.html
index 5eb40790..5487431f 100644
--- a/resources/templates/account.html
+++ b/resources/templates/account.html
@@ -32,7 +32,8 @@
Fund your Raiden Account with ETH
-
You need to download the Raiden Account
+
+ You need to download the Raiden Account
Fund your Raiden Account with ETH
let gasPrice;
try {
- const gasPrice = await getGasPrice(
+ gasPrice = await getGasPrice(
"{{ reverse_url('gas_price', configuration_file.file_name) }}"
);
} catch {
@@ -183,39 +184,42 @@ Fund your Raiden Account with ETH
}
}
- function sendEthButtonlogic(balance) {
- const has_web3 = checkWeb3Available(balance);
- if (!has_web3) {
- return;
- }
- if (hasEnoughEthToStartSwaps(balance)) {
- let button_send_eth = document.getElementById("btn-web3-eth");
- button_send_eth.disabled = true;
- const action = document.querySelector('.action');
- action.classList.add('tx-received');
- setTimeout(function() {
- window.location.href = "{{ reverse_url('swap', configuration_file.file_name, 'RDN') }}";
- }, 2000);
- } else {
- updateNeededEth(balance);
- }
- }
-
- async function poll() {
- let balance = await getBalances("{{ reverse_url('api-configuration-detail', configuration_file.file_name) }}");
- if (balance.ETH.as_wei) {
- sendEthButtonlogic(balance);
- } else {
- let keystore_button = document.getElementById("keystore");
- keystore_button.onclick = function() {
+ function sendEthButtonlogic(balance) {
+ const has_web3 = checkWeb3Available(balance);
+ if (!has_web3) {
+ return;
+ }
+ if (hasEnoughEthToStartSwaps(balance)) {
+ let button_send_eth = document.getElementById("btn-web3-eth");
+ button_send_eth.disabled = true;
+ const action = document.querySelector(".action");
+ action.classList.add("tx-received");
+ setTimeout(function () {
+ window.location.href =
+ "{{ reverse_url('swap', configuration_file.file_name, 'RDN') }}";
+ }, 2000);
+ } else {
+ updateNeededEth(balance);
+ }
+ }
+
+ async function poll() {
+ let balance = await getBalances(
+ "{{ reverse_url('api-configuration-detail', configuration_file.file_name) }}"
+ );
+ if (balance.ETH.as_wei) {
sendEthButtonlogic(balance);
- }
- }
- }
+ } else {
+ let keystore_button = document.getElementById("keystore");
+ keystore_button.onclick = function () {
+ sendEthButtonlogic(balance);
+ };
+ }
+ }
- function main() {
- poll();
- }
+ function main() {
+ poll();
+ }
window.addEventListener("load", function () {
window.MAIN_VIEW_INTERVAL = 10000;