Feature update
-- added file encryption -- added request filtering
This commit is contained in:
parent
3fa5a2064e
commit
5122164019
22
css/main.css
22
css/main.css
@ -844,3 +844,25 @@ h3 {
|
|||||||
.hidden {
|
.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 0.3rem;
|
||||||
|
border-radius: 2rem;
|
||||||
|
background-color: rgba(var(--text-color), 0.1);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.progress::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: var(--value);
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--accent-color);
|
||||||
|
transition: width 0.3s ease-in-out;
|
||||||
|
}
|
||||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -807,3 +807,25 @@ h3 {
|
|||||||
.hidden {
|
.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 0.3rem;
|
||||||
|
border-radius: 2rem;
|
||||||
|
background-color: rgba(var(--text-color), 0.1);
|
||||||
|
overflow: hidden;
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: var(--value);
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--accent-color);
|
||||||
|
transition: width 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
303
index.html
303
index.html
File diff suppressed because one or more lines are too long
@ -1,9 +1,13 @@
|
|||||||
|
function checkIfSentByMasterAddress(tx) {
|
||||||
|
return tx.vin.some(vin => vin.addresses[0] === floGlobals.masterAddress);
|
||||||
|
}
|
||||||
|
|
||||||
function getApprovedAggregators() {
|
function getApprovedAggregators() {
|
||||||
floGlobals.approvedKycAggregators = {};
|
floGlobals.approvedKycAggregators = {};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
floBlockchainAPI.readAllTxs(floGlobals.masterAddress).then(({ items: transactions }) => {
|
floBlockchainAPI.readAllTxs(floGlobals.masterAddress).then(({ items: transactions }) => {
|
||||||
console.log(transactions);
|
console.log(transactions);
|
||||||
transactions.filter(tx => floCrypto.isSameAddr(tx.vin[0].addr, floGlobals.masterAddress) && tx.floData.startsWith('KYC'))
|
transactions.filter(tx => checkIfSentByMasterAddress(tx) && tx.floData.startsWith('KYC'))
|
||||||
.reverse()
|
.reverse()
|
||||||
.forEach(tx => {
|
.forEach(tx => {
|
||||||
const { floData, time } = tx;
|
const { floData, time } = tx;
|
||||||
@ -43,7 +47,7 @@ function getApprovedKycs() {
|
|||||||
resolve();
|
resolve();
|
||||||
Promise.all(aggregatorTxs).then(aggregatorData => {
|
Promise.all(aggregatorTxs).then(aggregatorData => {
|
||||||
aggregatorData = aggregatorData.flat(1)
|
aggregatorData = aggregatorData.flat(1)
|
||||||
.filter(tx => tx.vin[0].addr in floGlobals.approvedKycAggregators && tx.floData.startsWith('KYC'))
|
.filter(tx => tx.vin[0].addresses[0] in floGlobals.approvedKycAggregators && tx.floData.startsWith('KYC'))
|
||||||
.sort((a, b) => a.time - b.time);
|
.sort((a, b) => a.time - b.time);
|
||||||
for (const tx of aggregatorData) {
|
for (const tx of aggregatorData) {
|
||||||
const { floData, time, vin, vout } = tx;
|
const { floData, time, vin, vout } = tx;
|
||||||
@ -54,7 +58,7 @@ function getApprovedKycs() {
|
|||||||
floGlobals.approvedKyc[address] = {
|
floGlobals.approvedKyc[address] = {
|
||||||
validFrom: time * 1000,
|
validFrom: time * 1000,
|
||||||
validTo: validity || Date.now() + 10000000,
|
validTo: validity || Date.now() + 10000000,
|
||||||
issuedBy: vin[0].addr
|
issuedBy: vin[0].addresses[0]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -62,7 +66,7 @@ function getApprovedKycs() {
|
|||||||
operationData.split('+').forEach(address => {
|
operationData.split('+').forEach(address => {
|
||||||
if (!floGlobals.approvedKyc[address]) return
|
if (!floGlobals.approvedKyc[address]) return
|
||||||
floGlobals.approvedKyc[address].validTo = time * 1000;
|
floGlobals.approvedKyc[address].validTo = time * 1000;
|
||||||
floGlobals.approvedKyc[address].revokedBy = vin[0].addr;
|
floGlobals.approvedKyc[address].revokedBy = vin[0].addresses[0];
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user