You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the function market.findOpenOrdersAccountsForOwner() seems to be unreliable as it some times does not include all the accounts. For example the below code gave the following result:
async function getOpenOrderAccounts() {
let openOrderAccounts = await market.findOpenOrdersAccountsForOwner(
connection,
owner.publicKey,
)
console.log(openOrderAccounts.length)
for (let index = 0; index < openOrderAccounts.length; index++) {
const element = openOrderAccounts[index];
//console.log(element.address.toString())
if (element.address.toString() == openOrdersAccountAddress){
console.log('found our account')
for (let index2 = 0; index2 < element.orders.length; index2++) {
const element2 = element.orders[index2];
if (element2.toString() !== '0') {console.log(element2.toString())}
}
}
}
}
the function market.findOpenOrdersAccountsForOwner() seems to be unreliable as it some times does not include all the accounts. For example the below code gave the following result:
$ node test.js
95
found our account
5755384150997379837575
5755384150997379837573
5755384150997379837572
5755384150997379837571
$ node test.js
94
$ % node test.js
94
$ % node test.js
94
$ % node test.js
94
$ % node test.js
95
found our account
5755384150997379837575
5755384150997379837573
5755384150997379837572
5755384150997379837571
The text was updated successfully, but these errors were encountered: