@triadxyz/triad-protocol 0.6.5-beta.devnet → 0.6.6-beta.devnet
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/local-test.js
CHANGED
|
@@ -145,14 +145,9 @@ const updateBoost = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
145
145
|
console.log(updateBoostResponse);
|
|
146
146
|
});
|
|
147
147
|
const getMarkets = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
|
-
// const acc = await connection.getAccountInfo(
|
|
149
|
-
// new PublicKey('2J7uYG9ND5pf4px8ABZBh2QtB5wrhkgRcSZvVDA3NZxk')
|
|
150
|
-
// )
|
|
151
|
-
// console.log(JSON.stringify(acc.data, null, 2))
|
|
152
148
|
const markets = yield triadProtocol.trade.getMarkets();
|
|
153
149
|
console.log(markets);
|
|
154
150
|
});
|
|
155
|
-
getMarkets();
|
|
156
151
|
const initializeAllMarkets = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
157
152
|
for (const market of markets) {
|
|
158
153
|
try {
|
|
@@ -166,6 +161,7 @@ const initializeAllMarkets = () => __awaiter(void 0, void 0, void 0, function* (
|
|
|
166
161
|
}
|
|
167
162
|
}
|
|
168
163
|
});
|
|
164
|
+
initializeAllMarkets();
|
|
169
165
|
const getOrders = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
166
|
const response = (yield triadProtocol.program.account.userTrade.all()).find((userTrade) => userTrade.account.authority.toBase58() === wallet.publicKey.toBase58());
|
|
171
167
|
console.log(response.account.orders.map((order) => order.orderId.toNumber()));
|