update stdop

This commit is contained in:
sairajzero 2022-08-16 17:31:35 +05:30
parent 85daa0135c
commit 5564b73299
4 changed files with 13 additions and 8860 deletions

8849
default.js

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,7 @@
}
</script>
<script src="https://unpkg.com/uhtml@3.0.1/es.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="scripts/lib.js"></script>
<script src="scripts/floCrypto.js"></script>
<script src="scripts/btcOperator.js"></script>
@ -2404,7 +2405,8 @@
}
} else {
if (floID) {
messenger.addChat(floID)
if(!(floID in messenger.chats))
messenger.addChat(floID)
getRef('chats_list').prepend(html.node`${render.contactCard(floID, { type: 'chat', prepend: true, markUnread: true, ref: getRef('chats_list') })}`)
} else if (groupID) {
getRef('chats_list').prepend(html.node`${render.contactCard(groupID, { type: 'group', prepend: true, markUnread: true, ref: getRef('chats_list') })}`)

View File

@ -1,4 +1,4 @@
(function(EXPORTS) { //floBlockchainAPI v2.3.3a
(function(EXPORTS) { //floBlockchainAPI v2.3.3b
/* FLO Blockchain Operator to send/receive data from blockchain using API calls*/
'use strict';
const floBlockchainAPI = EXPORTS;
@ -6,7 +6,7 @@
const DEFAULT = {
blockchain: floGlobals.blockchain,
apiURL: {
FLO: ['https://livenet.flocha.in/', 'https://flosight.duckdns.org/'],
FLO: ['https://flosight.duckdns.org/'],
FLO_TEST: ['https://testnet-flosight.duckdns.org', 'https://testnet.flocha.in/']
},
sendAmt: 0.001,
@ -49,7 +49,7 @@
const allServerList = new Set(floGlobals.apiURL && floGlobals.apiURL[DEFAULT.blockchain] ? floGlobals.apiURL[DEFAULT.blockchain] : DEFAULT.apiURL[DEFAULT.blockchain]);
var serverList = Array.from(allServerList);
var curPos = floCrypto.randInt(0, serverList - 1);
var curPos = floCrypto.randInt(0, serverList.length - 1);
function fetch_retry(apicall, rm_flosight) {
return new Promise((resolve, reject) => {
@ -371,18 +371,18 @@
})
//Calculate totalSentAmount and check if totalBalance is sufficient
let totalSendAmt = totalFee;
for (floID in receivers)
for (let floID in receivers)
totalSendAmt += receivers[floID];
if (totalBalance < totalSendAmt)
return reject("Insufficient total Balance");
//Get the UTXOs of the senders
let promises = [];
for (floID in senders)
for (let floID in senders)
promises.push(promisedAPI(`api/addr/${floID}/utxo`));
Promise.all(promises).then(results => {
let wifSeq = [];
var trx = bitjs.transaction();
for (floID in senders) {
for (let floID in senders) {
let utxos = results.shift();
let sendAmt;
if (preserveRatio) {
@ -406,7 +406,7 @@
if (change > 0)
trx.addoutput(floID, change);
}
for (floID in receivers)
for (let floID in receivers)
trx.addoutput(floID, receivers[floID]);
trx.addflodata(floData.replace(/\n/g, ' '));
for (let i = 0; i < wifSeq.length; i++)

View File

@ -1,4 +1,4 @@
(function(GLOBAL) { //lib v1.3.0c
(function(GLOBAL) { //lib v1.3.0d
'use strict';
/* Utility Libraries required for Standard operations
* All credits for these codes belong to their respective creators, moderators and owners.
@ -4782,8 +4782,8 @@
} else if (floDataCount < 253) {
floDataCountString = floDataCount.toString(16);
} else if (floDataCount <= 1040) {
floDataCountAdjusted = (floDataCount - 253) + parseInt("0xfd00fd");
floDataCountStringAdjusted = floDataCountAdjusted.toString(16);
let floDataCountAdjusted = (floDataCount - 253) + parseInt("0xfd00fd");
let floDataCountStringAdjusted = floDataCountAdjusted.toString(16);
floDataCountString = floDataCountStringAdjusted.substr(0, 2) + floDataCountStringAdjusted.substr(4, 2) + floDataCountStringAdjusted.substr(2, 2);
} else {
floDataCountString = "Character Limit Exceeded";