|
|
@ -58,4 +58,75 @@ $('#mdl_currency_fee').keyup(function() { |
|
|
|
var total_of_currency_fee = sum_val1 + sum_val2; |
|
|
|
console.log($('#mdl_currency_amount').val()); |
|
|
|
$('#mdl_currency_total_value').text(total_of_currency_fee); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
function ConfirmsendCurrency(confirm_val) { |
|
|
|
var confirm_coinname = $('#mdl_currency_total_coinname').text(); |
|
|
|
var confirm_selected_from_addr = $('select[data-currency="' + confirm_coinname + '"][id="currency-addr"] option:selected').text(); |
|
|
|
|
|
|
|
$('#mdl_confirm_currency_sendto_addr').text($('#mdl_currency_sendto').val()); |
|
|
|
$('#mdl_confirm_currency_send_amount').text($('#mdl_currency_amount').val()); |
|
|
|
$('#mdl_confirm_currency_coinname').text(confirm_coinname); |
|
|
|
//$('#mdl_confirm_currency_send_amount_fiat').text($('') );
|
|
|
|
$('#mdl_confirm_currency_send_fee').text($('#mdl_currency_fee').val()); |
|
|
|
$('#mdl_confirm_currency_coinname_fee').text(confirm_coinname); |
|
|
|
//$('#mdl_confirm_currency_send_fee_fiat').text($('') );
|
|
|
|
$('#mdl_confirm_currency_sendfrom_addr').text(confirm_selected_from_addr); |
|
|
|
$('#mdl_confirm_currency_sendfrom_total_dedcut').text($('#mdl_currency_total_value').text()); |
|
|
|
$('#mdl_confirm_currency_coinname_total').text(confirm_coinname); |
|
|
|
//$('#mdl_confirm_currency_sendfrom_total_deduct_fiat').text($('') );
|
|
|
|
} |
|
|
|
|
|
|
|
function ExecuteSendCurrencyAPI() { |
|
|
|
console.log('==> SendToAddress API Executed <=='); |
|
|
|
|
|
|
|
var confirm_send_amount = $('#mdl_confirm_currency_sendfrom_total_dedcut').text(); |
|
|
|
var confirm_sendto_address = $('#mdl_confirm_currency_sendto_addr').text(); |
|
|
|
|
|
|
|
//Get parameters values from confirm dialog and send currency
|
|
|
|
var sendtoaddrvalues = {"method":"sendtoaddress","params":[confirm_sendto_address,0.001,"EasyDEX","EasyDEXTransaction"]}; |
|
|
|
console.log(sendtoaddrvalues); |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(sendtoaddrvalues), |
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
//dataType: 'text',
|
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var SendToAddrData = JSON.parse(data); |
|
|
|
console.log('== Data OutPut =='); |
|
|
|
console.log(SendToAddrData); |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
|
console.log('failed getting Coin History.'); |
|
|
|
console.log(xhr.statusText); |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//Clear Send Dialog values and set them to blank
|
|
|
|
$('#mdl_currency_coin').text(''); |
|
|
|
$('#mdl_currency_balance').text(''); |
|
|
|
$('#mdl_currency_sendto').attr("placeholder", "Enter " + [COIN] + " address"); |
|
|
|
$('#mdl_currency_amount_label').text(''); |
|
|
|
$('#mdl_currency_total_coinname').text(''); |
|
|
|
|
|
|
|
//Clear Confirm Dialog values and set them to blank
|
|
|
|
$('#mdl_confirm_currency_sendto_addr').text(''); |
|
|
|
$('#mdl_confirm_currency_send_amount').text(''); |
|
|
|
$('#mdl_confirm_currency_coinname').text(''); |
|
|
|
$('#mdl_confirm_currency_send_amount_fiat').text(''); |
|
|
|
$('#mdl_confirm_currency_send_fee').text(''); |
|
|
|
$('#mdl_confirm_currency_coinname_fee').text(''); |
|
|
|
$('#mdl_confirm_currency_send_fee_fiat').text(''); |
|
|
|
$('#mdl_confirm_currency_sendfrom_addr').text(''); |
|
|
|
$('#mdl_confirm_currency_sendfrom_total_dedcut').text(''); |
|
|
|
$('#mdl_confirm_currency_coinname_total').text(''); |
|
|
|
$('#mdl_confirm_currency_sendfrom_total_deduct_fiat').text(''); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|