@thecorporation/corp-tools 26.3.36 → 26.3.37
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.
- package/dist/browser.js +29 -5
- package/dist/browser.js.map +1 -1
- package/dist/index.js +29 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -1276,11 +1276,35 @@ async function issueEquity(client, args) {
|
|
|
1276
1276
|
steps
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1279
|
+
let instrument;
|
|
1280
|
+
try {
|
|
1281
|
+
instrument = resolveInstrumentForGrant(
|
|
1282
|
+
instruments,
|
|
1283
|
+
args.grantType,
|
|
1284
|
+
args.instrumentId
|
|
1285
|
+
);
|
|
1286
|
+
} catch (resolveErr) {
|
|
1287
|
+
const kinds = expectedInstrumentKinds(args.grantType);
|
|
1288
|
+
if (kinds.includes("option_grant") && !args.instrumentId) {
|
|
1289
|
+
const issuerLegalEntityId2 = capTable.issuer_legal_entity_id;
|
|
1290
|
+
if (!issuerLegalEntityId2) throw resolveErr;
|
|
1291
|
+
const created = await client.createInstrument({
|
|
1292
|
+
entity_id: args.entityId,
|
|
1293
|
+
issuer_legal_entity_id: issuerLegalEntityId2,
|
|
1294
|
+
kind: "option_grant",
|
|
1295
|
+
symbol: "OPTION-PLAN",
|
|
1296
|
+
authorized_units: 1e7
|
|
1297
|
+
});
|
|
1298
|
+
instrument = created;
|
|
1299
|
+
steps.push({
|
|
1300
|
+
name: "auto_create_instrument",
|
|
1301
|
+
status: "ok",
|
|
1302
|
+
detail: `Auto-created option_grant instrument OPTION-PLAN`
|
|
1303
|
+
});
|
|
1304
|
+
} else {
|
|
1305
|
+
throw resolveErr;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1284
1308
|
const instrumentId = instrument.instrument_id;
|
|
1285
1309
|
steps.push({
|
|
1286
1310
|
name: "resolve_instrument",
|