Skip to content

Commit

Permalink
fix: properly detect incorrect transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Sep 2, 2020
1 parent 77961f3 commit 9f8866b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/lib/ag-solo/chain-cosmos-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,11 @@ ${chainID} chain does not yet know of address ${myAddr}${adviseProvision(
}
log.debug(`helper said: ${stdout}`);
const out = JSON.parse(stdout);
if (out.height) {
if (Number(out.height) > 0) {
// We submitted the transaction successfully.
return {};
}
throw Error(`Unexpected code: ${out.code}`);
throw Error(`Unexpected output: ${stdout.trimRight()}`);
},
undefined,
{}, // defaultIfCancelled
Expand Down

0 comments on commit 9f8866b

Please sign in to comment.