diff options
Diffstat (limited to '')
-rw-r--r-- | nodejs/lib/contracts.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nodejs/lib/contracts.ts b/nodejs/lib/contracts.ts index 833d434..0582cc7 100644 --- a/nodejs/lib/contracts.ts +++ b/nodejs/lib/contracts.ts @@ -61,6 +61,10 @@ export async function deliver(contract: Contract, ship: Ship): Promise<Contract> }}); if (response.error) { switch(response.error.code) { + case 4503: // contract has expired + // TODO sell cargo? the next trading loop should take care of it by itself + contract.fulfilled = true; + return contract; case 4509: // contract delivery terms have been met return await fulfill(contract); default: // yet unhandled error |