@deriverse/kit 1.0.16 → 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 +4 -4
- package/dist/types.d.ts +3 -3
- package/package.json +1 -1
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
|
|
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
|
|
2552
|
-
const assetTokenId =
|
|
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
|
}
|
|
@@ -2575,7 +2575,7 @@ class Engine {
|
|
|
2575
2575
|
amount: mapsAccountLamports,
|
|
2576
2576
|
});
|
|
2577
2577
|
const slot = Number((yield this.rpc.getSlot().send())) - 1;
|
|
2578
|
-
const lutAddress = yield getLookupTableAddress(this.
|
|
2578
|
+
const lutAddress = yield getLookupTableAddress(this.drvsAuthority, slot);
|
|
2579
2579
|
let keys = [
|
|
2580
2580
|
{ address: this.signer, role: kit_1.AccountRole.READONLY_SIGNER },
|
|
2581
2581
|
{ address: this.rootAccount, role: kit_1.AccountRole.WRITABLE },
|
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;
|