Skip to content

Commit

Permalink
chore(deploy-contracts): never mind previous design (SQUASHME)
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Apr 24, 2022
1 parent 3e78a3c commit 8126fd8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/run-protocol/scripts/deploy-contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,10 @@ export default async (homeP, endowments) => {
console.log('initially:', initial.payload.keys.length, 'entries');

// ISSUE: getCopyMapEntries of CopyMap<K, V> loses K, V.
/** @type {Map<string, {installation: Installation, boardId: string}>} */
/** @type {Map<string, {installation: Installation, boardId: string, path?: string}>} */
const working = new Map(getCopyMapEntries(initial));

let added = 0;
// upgrade from previous design
if (working.size > 0 && !working.values().next().value.boardId) {
console.log('upgrading', working);
for (const [key, installation] of working.entries()) {
// eslint-disable-next-line no-await-in-loop
const boardId = await E(board).getId(installation);
// @ts-ignore
working.set(key, { boardId, installation });
}
added += 1; // artificial
console.log('upgraded', working);
}

/** @type {EndoZipBase64Bundle[]} */
const bundles = await Promise.all(
Expand Down

0 comments on commit 8126fd8

Please sign in to comment.