polycopy 0.0.7 → 0.0.9

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/index.js +5 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -548,7 +548,7 @@ class Redeemer {
548
548
  this.funderAddress = funderAddress;
549
549
  this.onRedeemSuccess = onRedeemSuccess || null;
550
550
  this.running = true;
551
- init.logger.info("Redeemer 已启动");
551
+ init.logger.info("自动 redeem 已启动");
552
552
  this.intervalId = setPromiseInterval__default.default(async () => {
553
553
  await this.runOnce();
554
554
  }, BASE_INTERVAL);
@@ -651,7 +651,7 @@ class Redeemer {
651
651
  init.logger.error(`获取仓位失败: ${errorMsg}`);
652
652
  return;
653
653
  }
654
- init.logger.info(`autoRedeem: ${positions.length} 个可 Redeem 仓位`);
654
+ init.logger.info(`自动 redeem: ${positions.length} 个可 Redeem 仓位`);
655
655
  for (const position of positions) {
656
656
  let record = this.records.get(position.conditionId);
657
657
  if (!record) {
@@ -1056,13 +1056,14 @@ async function main() {
1056
1056
  try {
1057
1057
  await trader.init(config);
1058
1058
  if (config.trading?.sellPrice === 1 && !config.polymarket?.builderCreds) {
1059
- init.logger.warning(
1060
- "sellPrice = 1 但未配置 builderCreds,Redeem 功能将无法使用"
1059
+ init.logger.error(
1060
+ "sellPrice = 1 但未配置 builderCreds,Redeem 功能无法使用,程序已退出"
1061
1061
  );
1062
1062
  init.logger.line(
1063
1063
  "",
1064
1064
  "请配置 Builder API 凭证,或将卖价设置为 < 1 使用限价卖出模式"
1065
1065
  );
1066
+ process.exit(1);
1066
1067
  }
1067
1068
  } catch (error) {
1068
1069
  const errorMsg = error instanceof Error ? error.message : String(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polycopy",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "polycopy test",
5
5
  "main": "dist/index.js",
6
6
  "bin": {