Skip to content

Commit

Permalink
Merge pull request #635 from Agoric/606-reenable-upload
Browse files Browse the repository at this point in the history
Use the same HandledPromise for upload-contract
  • Loading branch information
michaelfig committed Feb 29, 2020
2 parents 32b94d3 + e668d3c commit 43ff0c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/cosmic-swingset/lib/ag-solo/bundle.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-await-in-loop */
import parseArgs from 'minimist';
import WebSocket from 'ws';
import { E } from '@agoric/eventual-send';
import { E, HandledPromise } from '@agoric/eventual-send';
import { evaluateProgram } from '@agoric/evaluate';
import { makeCapTP } from '@agoric/captp';
import { makeCapTP } from '@agoric/captp/lib/captp';
import fs from 'fs';
import path from 'path';

Expand Down Expand Up @@ -135,7 +135,10 @@ export default async function bundle(insistIsBasedir, args) {
for (const bundled of bundles) {
const actualSources = `(${bundled.main.source}\n)\n${bundled.main.sourceMap}`;
// console.log(actualSources);
const mainNS = evaluateProgram(actualSources, { require })();
const mainNS = evaluateProgram(actualSources, {
require,
HandledPromise,
})();
const main = mainNS.default;
if (typeof main !== 'function') {
console.error(`Bundle main does not have an export default function`);
Expand Down

0 comments on commit 43ff0c1

Please sign in to comment.