Skip to content

Commit

Permalink
Update sync progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardovivanco committed May 21, 2024
1 parent ef660d3 commit b1d59cc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/tableland/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,11 @@ task('sync-tableland', 'npx hardhat sync-tableland --network <networkName>')

// delete dd
let deleteDeviceDefinitionByManufacturers = [];
deviceDefinitionByManufacturers.forEach(element => {
const dds = tablelandDeviceDefinitionByManufacturers.filter((c) => c.ksuid === element.device_definition_id);
if (dds != undefined && dds.length > 0){
if (dds[0].id !== element.name_slug) {
deleteDeviceDefinitionByManufacturers.push(dds[0]);
}
tablelandDeviceDefinitionByManufacturers.forEach(element => {
const dds = deviceDefinitionByManufacturers.filter((c) => c.name_slug === element.id);
//console.log(element.ksuid, dds[0].device_definition_id);
if (dds == undefined || dds == 0){
deleteDeviceDefinitionByManufacturers.push(element);
}
});

Expand Down

0 comments on commit b1d59cc

Please sign in to comment.