diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 59576f65..00000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -.idea/ -*.swp -/coverage -/tmp -*/**/*un~ -*un~ -.DS_Store -*/**/.DS_Store -ethereum/ethereum -ethereal/ethereal -example/js -node_modules -bower_components -npm-debug.log -/bower -.npm/ -packages/ diff --git a/2fa.html b/2fa.html new file mode 100644 index 00000000..2592eef2 --- /dev/null +++ b/2fa.html @@ -0,0 +1,129 @@ + + +
+ + + +| Contact Name | Wallet Address | -
|---|

-
-
-
-
- | Date | Description | Amount | Fees | Balance | -
|---|

-
-
-
-
-
-
- 
| Wallet Name | Wallet Address | -
|---|
| To | Amount | Gas Price | Max Gas | -
|---|
- - By using this software, you agree to everything below. -
--
-
-
-
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -
-
"+ contacts[i]['name'];
- cell1.innerHTML = contacts[i]['address'];
-
- contact_name_to_address_lookup[contacts[i]['name']] = contacts[i]['address'];
- contact_address_to_name_lookup[contacts[i]['address']] = contacts[i]['name'];
- var autocomplete_entry = contacts[i]['name'] + " <" + contacts[i]['address'] + ">";
- contact_autocomplete_list.push(autocomplete_entry);
- contact_autocomplete_list_to_address_lookup[autocomplete_entry] = contacts[i]['address'];
- }
- autocomplete(document.getElementById("input_to"), contact_autocomplete_list);
- return true;
- }
- });
-
-}
-
-function getAddressFromAutocompleteStringIfExist(autocomplete_string){
- if(!web3.utils.isAddress(autocomplete_string)){
- if(autocomplete_string in contact_autocomplete_list_to_address_lookup){
- return contact_autocomplete_list_to_address_lookup[autocomplete_string];
- }
- }
- return autocomplete_string;
-}
-
-function getAutocompleteStringFromAddressIfExist(address){
- if(address in contact_address_to_name_lookup){
- return contact_address_to_name_lookup[address] + " <" + address + ">";
- }else{
- return address
- }
-}
diff --git a/app/scripts/static/custom_select.js b/app/scripts/static/custom_select.js
deleted file mode 100644
index 8ffa4687..00000000
--- a/app/scripts/static/custom_select.js
+++ /dev/null
@@ -1,76 +0,0 @@
-$( document ).ready(function() {
- var x, i, j, selElmnt, a, b, c;
- /* Look for any elements with the class "custom-select": */
- x = document.getElementsByClassName("custom-select");
- for (i = 0; i < x.length; i++) {
- selElmnt = x[i].getElementsByTagName("select")[0];
- /* For each element, create a new DIV that will act as the selected item: */
- a = document.createElement("DIV");
- a.setAttribute("class", "select-selected");
- a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
- x[i].appendChild(a);
- /* For each element, create a new DIV that will contain the option list: */
- b = document.createElement("DIV");
- b.setAttribute("class", "select-items select-hide");
- for (j = 0; j < selElmnt.length; j++) {
- /* For each option in the original select element,
- create a new DIV that will act as an option item: */
- c = document.createElement("DIV");
- c.innerHTML = selElmnt.options[j].innerHTML;
- c.addEventListener("click", function (e) {
- /* When an item is clicked, update the original select box,
- and the selected item: */
- var y, i, k, s, h;
- s = this.parentNode.parentNode.getElementsByTagName("select")[0];
- h = this.parentNode.previousSibling;
- for (i = 0; i < s.length; i++) {
- if (s.options[i].innerHTML == this.innerHTML) {
- s.selectedIndex = i;
- h.innerHTML = this.innerHTML;
- y = this.parentNode.getElementsByClassName("same-as-selected");
- for (k = 0; k < y.length; k++) {
- y[k].removeAttribute("class");
- }
- this.setAttribute("class", "same-as-selected");
- break;
- }
- }
- h.click();
- });
- b.appendChild(c);
- }
- x[i].appendChild(b);
- a.addEventListener("click", function (e) {
- /* When the select box is clicked, close any other select boxes,
- and open/close the current select box: */
- e.stopPropagation();
- closeAllSelect(this);
- this.nextSibling.classList.toggle("select-hide");
- this.classList.toggle("select-arrow-active");
- });
- }
-
- function closeAllSelect(elmnt) {
- /* A function that will close all select boxes in the document,
- except the current select box: */
- var x, y, i, arrNo = [];
- x = document.getElementsByClassName("select-items");
- y = document.getElementsByClassName("select-selected");
- for (i = 0; i < y.length; i++) {
- if (elmnt == y[i]) {
- arrNo.push(i)
- } else {
- y[i].classList.remove("select-arrow-active");
- }
- }
- for (i = 0; i < x.length; i++) {
- if (arrNo.indexOf(i)) {
- x[i].classList.add("select-hide");
- }
- }
- }
-
- /* If the user clicks anywhere outside the select box,
- then close all select boxes: */
- document.addEventListener("click", closeAllSelect);
-});
\ No newline at end of file
diff --git a/app/scripts/static/frontpage.js b/app/scripts/static/frontpage.js
deleted file mode 100644
index b959efd2..00000000
--- a/app/scripts/static/frontpage.js
+++ /dev/null
@@ -1,101 +0,0 @@
-$( document ).ready(function() {
-
- $('body').on('click', '#frontpage_sign_in_submit', function(e) {
- e.preventDefault();
- var username = $('#input_sign_in_username').val();
- var password = $('#input_sign_in_password').val();
- var tfa_code = $('#input_sign_in_two_factor_authentication').val();
- if(!(validateInputs(username, 'username') === true)){
- popup(validateInputs(username, 'username'));
- return;
- }
- if(!(validateInputs(tfa_code, 'two_factor_code') === true)){
- popup(validateInputs(tfa_code, 'two_factor_code'));
- return;
- }
-
- loaderPopup();
- server.signIn(username, password, tfa_code)
- .then(function(response){
- if(response !== false && "success" in response) {
- //success
- set_username_status(username);
- var online_keystores = response['keystores'];
- populateOnlineKeystores(online_keystores, password);
- close_popup();
- switchToPage('main_page');
- var tfa_enabled = (response['2fa_enabled'] === 'true');
- set_two_factor_authentication_status(tfa_enabled);
- afterLoginInit();
- }else{
- //fail
- var popup_content = "Oops, something went wrong:
"+to_shortened;
- }else{
- cell1.innerHTML = to_shortened;
- }
-
- cell2.innerHTML = amount_shortened;
- cell3.innerHTML = web3.utils.fromWei(transaction.gasPrice, 'gwei'); //show in gwei
- cell4.innerHTML =transaction.gas; //show in wei
- }
-}
-
-function getSumPendingTransactionsCost(){
- var total_amount = web3.utils.toBN(0);
- pending_send_transactions.forEach(function(tx){
- var gas_cost = web3.utils.toBN(tx.gas).mul(web3.utils.toBN(tx.gasPrice))
- total_amount = total_amount.add(web3.utils.toBN(tx.value)).add(web3.utils.toBN(gas_cost))
- });
- return total_amount;
-}
-
-function checkPendingTransactionsGasPrice(){
- pending_send_transactions.forEach(function(tx){
- if(tx.gasPrice < current_min_gas_price){
- return false;
- }
- });
- return true;
-}
-
-function checkBlockGasLimit(){
- var gas_used = 0;
- pending_send_transactions.forEach(function(tx){
- gas_used += parseFloat(tx.gas);
- });
-
- return gas_used < numerical.block_gas_limit;
-}
-
-function checkIntrinsicGas(){
- pending_send_transactions.forEach(function(tx){
- if(tx.gas < 21000){
- return false;
- }
- });
-
- return true;
-}
\ No newline at end of file
diff --git a/app/scripts/static/transaction_history_block.js b/app/scripts/static/transaction_history_block.js
deleted file mode 100644
index 0ebde4d7..00000000
--- a/app/scripts/static/transaction_history_block.js
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// Contains all website functionality for the transaction history block on the dashboard.
-//
-
-//
-// Jquery router
-//
-
-$( document ).ready(function() {
- $('#transaction_history_date_selector').submit(function (e) {
- e.preventDefault();
-
- if(sending_account == null){
- popup('Need to load a wallet first');
- return
- }
-
- refresh_transactions(0);
- });
-
- $('body').on('click', '.tx_history_row', function () {
- console.log('test');
- $(this).next().toggle();
- });
-
- $('body').on('click', '.tx_hist_nav', function () {
- var start_index = $(this).data('start');
- refresh_transactions(start_index);
- });
-
- populateSelectYears();
- selectDefaultYears();
-});
-
-function populateSelectYears(){
- $('select.to_year').html("");
- var max_year = (new Date()).getFullYear()+1;
- for(var i = 2018;i<=max_year;i++){
- $('select.to_year').append("")
- }
-}
-
-function selectDefaultYears(){
- console.log("selecting default years");
- var from_timestamp = new Date().getTime()/1000-(60*60*24*60)
- var from_date = new Date(0);
- from_date.setUTCSeconds(from_timestamp.toFixed(0));
- var from_year = from_date.getFullYear();
- var from_month = from_date.getMonth();
-
- var to_timestamp = new Date().getTime()/1000+(60*60*24*60)
- var to_date = new Date(0);
- to_date.setUTCSeconds(to_timestamp.toFixed(0));
- var to_year = to_date.getFullYear();
- var to_month = to_date.getMonth();
-
- $('select.from_year').children("option[value='"+from_year+"']").prop('selected', true)
- $('select.from_month').children("option[value='"+from_month+"']").prop('selected', true)
- $('select.to_year').children("option[value='"+to_year+"']").prop('selected', true)
- $('select.to_month').children("option[value='"+to_month+"']").prop('selected', true)
-}
-
-async function refresh_transactions(start_index){
- if(sending_account == null){
- return
- }
-
- if(start_index === undefined){
- start_index = 0
- }
-
- var from_month = $('select.from_month').children("option:selected").val();
- var from_year = $('select.from_year').children("option:selected").val();
- var to_month = $('select.to_month').children("option:selected").val();
- var to_year = $('select.to_year').children("option:selected").val();
-
- var start_timestamp = new Date(from_year, from_month, '01').getTime() / 1000
- var end_timestamp = new Date(to_year, to_month, '01').getTime() / 1000
-
- var txs = await accountHelpers.get_all_transactions_from_account(sending_account, start_timestamp, end_timestamp, start_index);
-
- var tableRef = document.getElementById('transaction_history_list').getElementsByTagName('tbody')[0];
-
- //clear all rows
- tableRef.innerHTML = "";
-
- if(!txs){
- popup("No transactions found for this date range.")
- } else {
-
- if (txs.length > 0) {
- prev_block_number = null
- for (i = 0; i < txs.length; i++) {
-
-
- var row = tableRef.insertRow(tableRef.rows.length);
- row.className = 'tx_history_row';
- var cell0 = row.insertCell(0);
- var cell1 = row.insertCell(1);
- var cell2 = row.insertCell(2);
- var cell3 = row.insertCell(3);
- var cell4 = row.insertCell(4);
-
-
-
- var tx = txs[i];
- var d = new Date(0); // The 0 there is the key, which sets the date to the epoch
- d.setUTCSeconds(tx.timestamp);
- var options = { day: 'numeric', year: 'numeric', month: 'short'};
-
- cell0.innerHTML = d.toLocaleString('en-US',options);
- cell1.innerHTML = tx.description;
- cell2.innerHTML = numerical.roundD(parseFloat(web3.utils.fromWei(web3.utils.toBN(tx.value))),6);
- cell3.innerHTML = numerical.roundD(parseFloat(web3.utils.fromWei(web3.utils.toBN(tx.gas_cost))),6);
-
- if (prev_block_number == null || prev_block_number != tx.block_number) {
- cell4.innerHTML = numerical.roundD(parseFloat(web3.utils.fromWei(web3.utils.toBN(tx.balance))),6);
- }else{
- cell4.innerHTML = "";
- }
-
-
- //now lets add the details:
- var detail_row = tableRef.insertRow(tableRef.rows.length);
- detail_row.className = 'tx_history_detail_row';
- var detail_cell0 = detail_row.insertCell(0);
- detail_cell0.className = 'tx_history_cell_full_width';
- detail_cell0.colSpan = 5;
- options = { day: 'numeric', year: 'numeric', month: 'long', hour: 'numeric', minute: 'numeric', second: 'numeric', timeZoneName:'short'};
- var details_content = "Contact Name
+Wallet Address
+Action
+
+
+ If you are expecting to receive a transaction, click this button to check and process it.
+ +
HeliosIf you are expecting to receive a transaction, click this button to check and process it.
+ +
+
+ If you are expecting to receive a transaction, click this button to check and process it.
+ +
HeliosIf you are expecting to receive a transaction, click this button to check and process it.
+ +' + t + "
'+t+"