Closed thekeviv closed 1 year ago
Which SDK version are you using?
I'm using 0.23.0
I'm unable to reproduce this, can you paste your code here? And margin account pubkey if possible
My code:
let accs = await Exchange.program.account.marginAccount.all();
for (var acc of accs) {
let accDecoded = acc.account as unknown as programTypes.MarginAccount;
console.log(accDecoded.asset, assets.fromProgramAsset(accDecoded.asset));
}
shows me { apt: {} } APT
for some margin accounts and no undefined
s. I'm also on SDK 0.23.0.
Thank you! My SDK was up to date and it was the IDL which wasn't. Updating to the newest IDL from your repo fixed the issue. Thank you for all your help:pray:
When depositing funds into an APT account, after looking at the asset field corresponding to the margin account, it shows up as
undefined
and notAPT
. Is this a bug or is this expected? If not a bug, can you explain the significance of undefined please.