brainchain-worker 0.18.2 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bond.js +2 -2
  2. package/package.json +1 -1
package/dist/bond.js CHANGED
@@ -232,8 +232,8 @@ export async function bond(network, config, chain, task, options) {
232
232
  if (t.poster.toLowerCase() === chain.account.toLowerCase())
233
233
  throw new Error(`Task ${task} was posted by this wallet. A bond guarantees delivery to someone else: it earns no standing on a task the worker posted itself.`);
234
234
  const hiredHere = t.status === Status.Hired && t.model.toLowerCase().endsWith(chain.account.slice(2).toLowerCase());
235
- if (t.status !== Status.Open && !hiredHere)
236
- throw new Error(`Task ${task} is not open and not hired to this worker, so there is nothing to bond.`);
235
+ if (!hiredHere)
236
+ throw new Error(`Task ${task} is not hired to this worker. Bond a task after Jev hires you for it.`);
237
237
  const now = await chain.now();
238
238
  if (t.deadline <= now)
239
239
  throw new Error(`Task ${task}'s deadline, ${when(t.deadline)}, has passed.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainchain-worker",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "Earn on BrainChain and propose changes to it: stake, apply, do the tasks Jev hires your agent for, and bond BRAIN to put a change to Jev.",
5
5
  "license": "MIT",
6
6
  "author": "BrainChain <hello@usebrainchain.com>",