@deriverse/kit 1.0.17 → 1.0.18

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/index.js CHANGED
@@ -1050,7 +1050,7 @@ class Engine {
1050
1050
  return __awaiter(this, void 0, void 0, function* () {
1051
1051
  const tokenAddress = yield this.getTokenAccount(mint);
1052
1052
  let info = yield this.rpc.getAccountInfo(tokenAddress, { commitment: this.commitment, encoding: 'base64', dataSlice: { offset: structure_models_1.TokenStateModel.OFFSET_ID, length: 4 } }).send();
1053
- if (info == null) {
1053
+ if (!info.value) {
1054
1054
  return null;
1055
1055
  }
1056
1056
  else {
@@ -2548,8 +2548,8 @@ class Engine {
2548
2548
  const tokenProgramId = assetInfo.value.owner == TOKEN_2022_PROGRAM_ID ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID;
2549
2549
  const crncyTokenId = yield this.getTokenId(args.crncyMint);
2550
2550
  const id = yield this.getTokenId(args.assetMint);
2551
- const newAssetTokenId = id != null;
2552
- const assetTokenId = id !== null && id !== void 0 ? id : this.rootAccount.tokensCount;
2551
+ const newAssetTokenId = id == null;
2552
+ const assetTokenId = newAssetTokenId ? this.rootStateModel.tokensCount : id;
2553
2553
  if (!crncyTokenId) {
2554
2554
  throw new Error("Currency mint not found");
2555
2555
  }
package/dist/types.d.ts CHANGED
@@ -553,9 +553,9 @@ export interface NewPerpOrderArgs {
553
553
  side: number;
554
554
  }
555
555
  export interface NewInstrumentArgs {
556
- assetMint: Address;
557
- crncyMint: Address;
558
- newProgramAccountAddress?: Address;
556
+ assetMint: Address<any>;
557
+ crncyMint: Address<any>;
558
+ newProgramAccountAddress?: Address<any>;
559
559
  initialPrice: number;
560
560
  }
561
561
  export type LogMessage = DepositReportModel | WithdrawReportModel | PerpDepositReportModel | PerpWithdrawReportModel | FeesDepositReportModel | FeesWithdrawReportModel | SpotlpTradeReportModel | EarningsReportModel | DrvsAirdropReportModel | SpotPlaceOrderReportModel | SpotFillOrderReportModel | SpotNewOrderReportModel | SpotOrderCancelReportModel | SpotOrderRevokeReportModel | SpotFeesReportModel | SpotPlaceMassCancelReportModel | SpotMassCancelReportModel | PerpPlaceOrderReportModel | PerpFillOrderReportModel | PerpNewOrderReportModel | PerpOrderCancelReportModel | PerpOrderRevokeReportModel | PerpFeesReportModel | PerpPlaceMassCancelReportModel | PerpMassCancelReportModel | PerpFundingReportModel | PerpSocLossReportModel | PerpChangeLeverageReportModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deriverse/kit",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",