Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBalanceAllowance returns 0 #128

Open
Hiich opened this issue Nov 29, 2024 · 0 comments
Open

getBalanceAllowance returns 0 #128

Hiich opened this issue Nov 29, 2024 · 0 comments

Comments

@Hiich
Copy link

Hiich commented Nov 29, 2024

No matter what I try i am unable to update my balance.
I even set the approval directly on the contracts to allow all 3 exchange contracts, the wallet has both USDC and MATIC.

`
const host = "https://clob.polymarket.com";
const clobClient = new ClobClient(host, chainId, wallet, credentials);

// USDC
await clobClient.updateBalanceAllowance({ asset_type: AssetType.COLLATERAL });

// YES
await clobClient.updateBalanceAllowance({
    asset_type: AssetType.CONDITIONAL,
    token_id: "71321045679252212594626385532706912750332728571942532289631379312455583992563",
});

// NO
await clobClient.updateBalanceAllowance({
    asset_type: AssetType.CONDITIONAL,
    token_id: "52114319501245915516055106046884209969926127482827954674443846427813813222426",
});

const balanceAllowance = await clobClient.getBalanceAllowance({
    asset_type: AssetType.COLLATERAL,
});
console.log("🚀 ~ balanceAllowance:", balanceAllowance)`

I checked on the python repository and this issue seems common but still no fix has been provided. Desperately looking for a fix.

@Polymarket Polymarket deleted a comment Nov 29, 2024
@Polymarket Polymarket deleted a comment Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant