Skip to content

Commit

Permalink
remove step for updating grace period on-chain in fork test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Octavian authored and Dan Octavian committed Mar 16, 2023
1 parent 75ed15d commit 3c08e0b
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions test/fork/migrated-claims.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,38 +190,6 @@ describe('Migrated claims', function () {
);
});

it('Fix grace period days -> seconds for product types', async function () {
const V2OnChainProductTypeDataProductsPath = path.join(
__dirname,
'../../scripts/v2-migration/input/product-type-data.csv',
);
const productTypeData = csvParse(fs.readFileSync(V2OnChainProductTypeDataProductsPath, 'utf8'), {
columns: true,
skip_empty_lines: true,
});

const productTypeIpfsHashes = require(path.join(
__dirname,
'../../scripts/v2-migration/output/product-type-ipfs-hashes.json',
));

let expectedProductTypeId = 0;
const productTypeEntries = productTypeData.map(data => {
const nextProductTypeId = expectedProductTypeId++;
return {
productTypeName: data.Name,
productTypeId: nextProductTypeId,
ipfsMetadata: productTypeIpfsHashes[data.Id],
productType: {
claimMethod: data['Claim Method'],
gracePeriod: data['Grace Period (days)'] * 3600 * 24, // convert to secunds
},
};
});

await this.cover.connect(this.abMembers[0]).setProductTypes(productTypeEntries);
});

const setTime = async timestamp => {
await setNextBlockTime(timestamp);
await mineNextBlock();
Expand Down

0 comments on commit 3c08e0b

Please sign in to comment.