Bug fixes and changed master address

This commit is contained in:
sairaj mote 2023-04-09 16:06:15 +05:30
parent 6cc13901e2
commit d56d2fa421
3 changed files with 9 additions and 9 deletions

View File

@ -488,12 +488,12 @@
} }
let floData let floData
if (manageType === 'aggregator') if (manageType === 'aggregator')
floData = `KYC|APPROVE_KYC|${addresses.join(',')}` floData = `KYC|APPROVE_KYC|${addresses.join('+')}`
else { else {
const addressWithLabels = addresses.map((address, index) => { const addressWithLabels = addresses.map((address, index) => {
return `${address}:${addressLabels[index]}` return `${address}:${addressLabels[index]}`
}) })
floData = `KYC|APPROVE_AGGREGATOR|${addressWithLabels.join(',')}` floData = `KYC|APPROVE_AGGREGATOR|${addressWithLabels.join('+')}`
} }
console.log(floData) console.log(floData)
if (floData.length > 1040) { if (floData.length > 1040) {
@ -541,9 +541,9 @@
} }
let floData let floData
if (manageType === 'aggregator') if (manageType === 'aggregator')
floData = `KYC|REVOKE_KYC|${addresses.join(',')}` floData = `KYC|REVOKE_KYC|${addresses.join('+')}`
else else
floData = `KYC|REVOKE_AGGREGATOR|${addresses.join(',')}` floData = `KYC|REVOKE_AGGREGATOR|${addresses.join('+')}`
console.log(floData) console.log(floData)
getConfirmation('Revoke selected addresses?', { getConfirmation('Revoke selected addresses?', {
confirmText: 'Revoke', confirmText: 'Revoke',

View File

@ -172,13 +172,13 @@ function getApprovedAggregators() {
const [service, operationType, operationData, validity] = floData.split('|'); const [service, operationType, operationData, validity] = floData.split('|');
switch (operationType) { switch (operationType) {
case 'APPROVE_AGGREGATOR': case 'APPROVE_AGGREGATOR':
operationData.split(',').forEach(aggregator => { operationData.split('+').forEach(aggregator => {
const [address, label = ''] = aggregator.split(':'); const [address, label = ''] = aggregator.split(':');
floGlobals.approvedKycAggregators[floCrypto.toFloID(address)] = label; floGlobals.approvedKycAggregators[floCrypto.toFloID(address)] = label;
}); });
break; break;
case 'REVOKE_AGGREGATOR': case 'REVOKE_AGGREGATOR':
operationData.split(',').forEach(aggregator => { operationData.split('+').forEach(aggregator => {
const [address, label = ''] = aggregator.split(':'); const [address, label = ''] = aggregator.split(':');
delete floGlobals.approvedKycAggregators[floCrypto.toFloID(address)] delete floGlobals.approvedKycAggregators[floCrypto.toFloID(address)]
}); });
@ -210,7 +210,7 @@ function getApprovedKycs() {
const [service, operationType, operationData, validity] = floData.split('|'); const [service, operationType, operationData, validity] = floData.split('|');
switch (operationType) { switch (operationType) {
case 'APPROVE_KYC': case 'APPROVE_KYC':
operationData.split(',').forEach(address => { operationData.split('+').forEach(address => {
floGlobals.approvedKyc[address] = { floGlobals.approvedKyc[address] = {
validFrom: time * 1000, validFrom: time * 1000,
validTo: validity || Date.now() + 10000000, validTo: validity || Date.now() + 10000000,
@ -219,7 +219,7 @@ function getApprovedKycs() {
}); });
break; break;
case 'REVOKE_KYC': case 'REVOKE_KYC':
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].addr;

View File

@ -2,5 +2,5 @@ const floGlobals = {
blockchain: "FLO", blockchain: "FLO",
adminID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf", adminID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf",
application: "KYC", application: "KYC",
masterAddress: 'FUT2sV3EJiLGgoLmpXW9jAFuhmWy35V5G6' masterAddress: 'FRSUrLuy5nhz6PCyuxMmo7vg9JmTFX5Goi'
} }