Skip to content

Commit

Permalink
fix(LOADING): make flag available to CapTP, but not home
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Oct 31, 2019
1 parent 4c5a146 commit 859e7b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ag-solo/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sendJSON = (ws, obj) => {
if (ws.readyState !== ws.OPEN) {
return;
}
// console.log('sending', obj);
//console.log('sending', obj);
ws.send(JSON.stringify(obj));
};

Expand Down Expand Up @@ -98,9 +98,9 @@ export default async function bundle(insistIsBasedir, args) {
sendJSON(ws, obj),
);
ws.on('message', data => {
// console.log(data);
try {
const obj = JSON.parse(data);
// console.log('receiving', obj);
if (obj.type === 'CTP_ERROR') {
throw obj.error;
}
Expand Down
8 changes: 7 additions & 1 deletion lib/ag-solo/vats/vat-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ function build(E, D) {
},

setPresences(ps, privateObjects) {
exportedToCapTP = { READY: exportedToCapTP.READY, ...ps, ...privateObjects };
exportedToCapTP = {
LOADING: loaded.p,
READY: exportedToCapTP.READY,
...ps,
...privateObjects,
};
Object.assign(homeObjects, ps, privateObjects);
loaded.res('chain bundle loaded');
delete homeObjects.LOADING;
if (ps.canvasStatePublisher) {
const subscriber = harden({
notify(m) {
Expand Down

0 comments on commit 859e7b5

Please sign in to comment.