Merge pull request #15 from avishkarabhishek786/new_ui
Working version with new UI
This commit is contained in:
commit
d970acfe98
@ -12016,7 +12016,6 @@
|
|||||||
// 03F7493F11B8E44B9798CD434D20FBE7FA34B9779D144984889D11A17C56A18742,039B4AA00DBFC0A6631DE6DA83526611A0E6B857D3579DF840BBDEAE8B6898E3B6,
|
// 03F7493F11B8E44B9798CD434D20FBE7FA34B9779D144984889D11A17C56A18742,039B4AA00DBFC0A6631DE6DA83526611A0E6B857D3579DF840BBDEAE8B6898E3B6,
|
||||||
// 03C8E3836C9A77E2AF03D4265D034BA85732738919708EAF6A16382195AE796EDF,0349B08AA1ABDCFFB6D78CD7C949665AD2FF065EA02B3C6C47A5E9592C9A1C6BCB,
|
// 03C8E3836C9A77E2AF03D4265D034BA85732738919708EAF6A16382195AE796EDF,0349B08AA1ABDCFFB6D78CD7C949665AD2FF065EA02B3C6C47A5E9592C9A1C6BCB,
|
||||||
// 026FCC6CFF6EB3A39E54BEB6E13FC2F02C3A93F4767AA80E49E7E876443F95AE5F,
|
// 026FCC6CFF6EB3A39E54BEB6E13FC2F02C3A93F4767AA80E49E7E876443F95AE5F,
|
||||||
// #!#externalFiles={"d3js":"58f54395efa8346e8e94d12609770f66b916897e7f4e05f6c98780cffa5c70a3"}
|
|
||||||
// #!#cashiers={"032871A74D2DDA9D0DE7135F58B5BD2D7F679D2CCA20EA7909466D1A6912DF4022":"johnDoe@upi",
|
// #!#cashiers={"032871A74D2DDA9D0DE7135F58B5BD2D7F679D2CCA20EA7909466D1A6912DF4022":"johnDoe@upi",
|
||||||
// "03DB4A12EB543B293DDBB0CE314C46C36D6761294AFBB7264A6D78F710FFD97CF0":"janeDoe@upi"}
|
// "03DB4A12EB543B293DDBB0CE314C46C36D6761294AFBB7264A6D78F710FFD97CF0":"janeDoe@upi"}
|
||||||
// #!#ShamirsMaxShares=8#!#supernodeSeeds={"ranchimall1":{"ip":"127.0.0.1:9111","kbucketId":"oZxHcbSf1JC8t5GjutopWYXs7C6Fe9p7ps"},
|
// #!#ShamirsMaxShares=8#!#supernodeSeeds={"ranchimall1":{"ip":"127.0.0.1:9111","kbucketId":"oZxHcbSf1JC8t5GjutopWYXs7C6Fe9p7ps"},
|
||||||
@ -12028,16 +12027,17 @@
|
|||||||
|
|
||||||
|
|
||||||
text = `masterFLOPubKey=03EA5E2CAB18DA585400D6EC569438D415FAF200528E05D0E2B9BEAA2B5C3DCA90
|
text = `masterFLOPubKey=03EA5E2CAB18DA585400D6EC569438D415FAF200528E05D0E2B9BEAA2B5C3DCA90
|
||||||
#!#tradableAsset1=BTC,FLO,BTC_TEST,FLO_TEST#!#tradableAsset2=INR,USD,
|
#!#tradableAsset1=BTC,FLO,BTC_TEST,FLO_TEST#!#tradableAsset2=INR,USD,
|
||||||
#!#validTradingAmount=10,50,100,#!#btcTradeMargin=5000
|
#!#validTradingAmount=10,50,100,#!#btcTradeMargin=5000
|
||||||
#!#MaxBackups=1
|
#!#MaxBackups=1
|
||||||
#!#miners_fee={"btc":0.0003, "flo":0.0003}
|
#!#ordersLife={"trade":300000, "cryptoDeposit":900000, "cryptoWithdraw":300000, "cashDeposit":900000, "cashWithdraw":900000}
|
||||||
#!#supernodesPubKeys=026FCC6CFF6EB3A39E54BEB6E13FC2F02C3A93F4767AA80E49E7E876443F95AE5F,
|
#!#miners_fee={"btc":0.0005, "flo":0.001}
|
||||||
#!#cashiers={"032871A74D2DDA9D0DE7135F58B5BD2D7F679D2CCA20EA7909466D1A6912DF4022":"johnDoe@upi",
|
#!#supernodesPubKeys=0315C3A20FE7096CC2E0F81A80D5F1A687B8F9EFA65242A0B0881E1BA3EE7D7D53,
|
||||||
"03DB4A12EB543B293DDBB0CE314C46C36D6761294AFBB7264A6D78F710FFD97CF0":"janeDoe@upi"}
|
026FCC6CFF6EB3A39E54BEB6E13FC2F02C3A93F4767AA80E49E7E876443F95AE5F,
|
||||||
#!#ShamirsMaxShares=8#!#supernodeSeeds={
|
#!#cashiers={"032871A74D2DDA9D0DE7135F58B5BD2D7F679D2CCA20EA7909466D1A6912DF4022":{"upi":"johnDoe@upi", "currencies":["INR"], "is_live":false},
|
||||||
"ranchimall6":{"ip":"127.0.0.1:9116","kbucketId":"oV1wCeWca3VawbBTfUGKA7Vd368PATnKAx"}
|
"03DB4A12EB543B293DDBB0CE314C46C36D6761294AFBB7264A6D78F710FFD97CF0":{"upi":"janeDoe@upi", "currencies":["INR", "USD"], "is_live":false}}
|
||||||
}`;
|
#!#ShamirsMaxShares=8#!#supernodeSeeds={"ranchimall1":{"ip":"127.0.0.1:9111","kbucketId":"oZxHcbSf1JC8t5GjutopWYXs7C6Fe9p7ps"},
|
||||||
|
"ranchimall6":{"ip":"127.0.0.1:9116","kbucketId":"oV1wCeWca3VawbBTfUGKA7Vd368PATnKAx"}}`;
|
||||||
return callback(text);
|
return callback(text);
|
||||||
|
|
||||||
if(ENVR==='LIVE') {
|
if(ENVR==='LIVE') {
|
||||||
@ -13890,6 +13890,7 @@
|
|||||||
Array.from(recv_deposit_btn).forEach(function(element) {
|
Array.from(recv_deposit_btn).forEach(function(element) {
|
||||||
element.addEventListener("click", async function(evt) {
|
element.addEventListener("click", async function(evt) {
|
||||||
let btn = this;
|
let btn = this;
|
||||||
|
btn.disabled = true;
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const deposit_id = this.value;
|
const deposit_id = this.value;
|
||||||
const req_info = document.getElementById(`depositSpan${deposit_id}`);
|
const req_info = document.getElementById(`depositSpan${deposit_id}`);
|
||||||
@ -13900,7 +13901,7 @@
|
|||||||
const depositorInfo = document.getElementById(`tr_${deposit_id}`);
|
const depositorInfo = document.getElementById(`tr_${deposit_id}`);
|
||||||
const depositorInfoVals = depositorInfo.getElementsByTagName('td');
|
const depositorInfoVals = depositorInfo.getElementsByTagName('td');
|
||||||
const token_transfer_statement = `transfer ${depositorInfoVals[2].innerText} rupee# on behalf of ${depositorInfoVals[1].innerText}`;
|
const token_transfer_statement = `transfer ${depositorInfoVals[2].innerText} rupee# on behalf of ${depositorInfoVals[1].innerText}`;
|
||||||
const tx_amount = 0.001;
|
const tx_amount = 0.01;
|
||||||
|
|
||||||
if(typeof websocket_name!=="string" || typeof requesting_supernode!=="string") return;
|
if(typeof websocket_name!=="string" || typeof requesting_supernode!=="string") return;
|
||||||
|
|
||||||
@ -13947,6 +13948,7 @@
|
|||||||
flo_txid = resp_obj.txid.result || resp_obj.txid;
|
flo_txid = resp_obj.txid.result || resp_obj.txid;
|
||||||
}
|
}
|
||||||
if (typeof flo_txid!=="string" || flo_txid.length < 1) return;
|
if (typeof flo_txid!=="string" || flo_txid.length < 1) return;
|
||||||
|
|
||||||
|
|
||||||
let req_body = {
|
let req_body = {
|
||||||
trader_flo_address:
|
trader_flo_address:
|
||||||
@ -14018,9 +14020,10 @@
|
|||||||
|
|
||||||
Array.from(recv_deposit_btn).forEach(function(element) {
|
Array.from(recv_deposit_btn).forEach(function(element) {
|
||||||
|
|
||||||
element.addEventListener("click", function(evt) {
|
element.addEventListener("click", async function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
let btn = this;
|
let btn = this;
|
||||||
|
btn.disabled = true;
|
||||||
const withdraw_id = this.value;
|
const withdraw_id = this.value;
|
||||||
const req_info = document.getElementById(`withdrawSpan${withdraw_id}`);
|
const req_info = document.getElementById(`withdrawSpan${withdraw_id}`);
|
||||||
const req_info_arr = req_info.value.split("_");
|
const req_info_arr = req_info.value.split("_");
|
||||||
@ -14049,7 +14052,7 @@
|
|||||||
|
|
||||||
if(closest_live_su=='') closest_live_su = requesting_supernode;
|
if(closest_live_su=='') closest_live_su = requesting_supernode;
|
||||||
|
|
||||||
const websocket_conn = localbitcoinplusplus.supernode_conns[closestSuList];
|
const websocket_conn = localbitcoinplusplus.supernode_conns[closest_live_su];
|
||||||
if(typeof websocket_conn!=="object") return;
|
if(typeof websocket_conn!=="object") return;
|
||||||
|
|
||||||
RM_RPC.send_rpc
|
RM_RPC.send_rpc
|
||||||
@ -14072,7 +14075,7 @@
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}.bind(btn));
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14183,6 +14186,27 @@
|
|||||||
showMessage(
|
showMessage(
|
||||||
`Connection successfull. Welocome to Local Bitcoin Plus Plus Cash Handling platform.`
|
`Connection successfull. Welocome to Local Bitcoin Plus Plus Cash Handling platform.`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
|
||||||
|
window.addEventListener('beforeunload', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
delete e['returnValue'];
|
||||||
|
const RM_RPC = new localbitcoinplusplus.rpc;
|
||||||
|
|
||||||
|
for(let conns in localbitcoinplusplus.supernode_conns) {
|
||||||
|
let req_body = {
|
||||||
|
trader_flo_address:
|
||||||
|
localbitcoinplusplus.wallets.my_local_flo_address,
|
||||||
|
is_live: false,
|
||||||
|
receiver_flo_address: conns
|
||||||
|
}
|
||||||
|
const server_con = localbitcoinplusplus.supernode_conns[conns];
|
||||||
|
RM_RPC.send_rpc
|
||||||
|
.call(this, 'cashier_left', req_body)
|
||||||
|
.then(resp => doSend(server_con, resp));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMessage(
|
showMessage(
|
||||||
|
|||||||
9768
index.html
9768
index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user