Dodecahedr0x/meta-dao-frontend

[feature] show pending claimable balance somewhere

Opened this issue · 0 comments

Users are placing orders, having fills and then do not know where to look to see their balance (or any indication they have a balance somewhere that needs some action).

So you'd want to go through:

const orders = proposal ? allOrders[proposal.publicKey.toString()] : undefined;

Then search based on wallet account so you have those orders for said account.
Here's the filter function:

const filterCompletedOrders = (): OpenOrdersAccountWithKey[] => {

And then you'd need to check if there's claimable based on:
order.account.position.quoteFreeNative
and
order.account.position.baseFreeNative

As those should show a balance which is claimable (need to divide out the units).