@triadxyz/triad-protocol 2.3.9-beta → 2.4.0-beta
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/types/index.d.ts +1 -0
- package/dist/utils/helpers.js +4 -2
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
package/dist/utils/helpers.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOrderStatus = exports.getOrderSide = exports.getOrderType = exports.getOrderSideFromNumber = exports.getOrderDirectionFromNumber = exports.getOrderDirection = exports.getTokenProgram = exports.calculateStakeRewards = exports.formatBookOrder = exports.formatOrder = exports.formatUserTrade = exports.formatMarket = exports.formatPool = exports.formatStake = exports.formatStakeVault = exports.decodeString = exports.encodeString = void 0;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
4
5
|
const spl_token_1 = require("@solana/spl-token");
|
|
5
6
|
const types_1 = require("../types");
|
|
6
7
|
const constants_1 = require("./constants");
|
|
@@ -134,11 +135,12 @@ const formatBookOrder = (order) => {
|
|
|
134
135
|
id: order.id.toString(),
|
|
135
136
|
price: order.price.toString(),
|
|
136
137
|
totalShares: order.totalShares.toString(),
|
|
137
|
-
authority: order.authority.toString(),
|
|
138
|
+
authority: new web3_js_1.PublicKey(order.authority).toString(),
|
|
138
139
|
filledShares: order.filledShares.toString(),
|
|
139
140
|
orderDirection: (0, exports.getOrderDirectionFromNumber)(order.orderDirection),
|
|
140
141
|
orderSide: (0, exports.getOrderSideFromNumber)(order.orderSide),
|
|
141
|
-
userNonce: order.userNonce.toString()
|
|
142
|
+
userNonce: order.userNonce.toString(),
|
|
143
|
+
linkedBookOrderId: order.linkedBookOrderId.toString()
|
|
142
144
|
};
|
|
143
145
|
};
|
|
144
146
|
exports.formatBookOrder = formatBookOrder;
|