Skip to content

Commit

Permalink
Fixed holdings display
Browse files Browse the repository at this point in the history
  • Loading branch information
glottologist committed Nov 14, 2023
1 parent 0e7397b commit 8f78c0d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion batcher-ui/src/pages/holdings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Holdings = () => {
const tokens = useSelector(tokensSelector);
const { open, cleared } = useSelector(getHoldings);
const userAddress = useSelector(userAddressSelector);
console.info("TOKENS", tokens);
const dispatch = useDispatch();

const hasClearedHoldings = useCallback(
Expand Down
7 changes: 0 additions & 7 deletions batcher-ui/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,10 @@ const convertHoldingToPayout = (

const findTokensForBatch = (batch: BatchBigmap, tokens: any) => {
const pair = batch.pair;
console.info("tokens",tokens);
const toks = Object.values(tokens)[0];
const buyToken = toks.get(pair.string_0);
const sellToken = toks.get(pair.string_1);
const tkns = {
// buy_token_name: pair.name_0,
// sell_token_name: pair.name_1,
to: { name: buyToken.name, decimals: parseInt(buyToken.decimals, 10) },
from: { name: sellToken.name, decimals: parseInt(sellToken.decimals, 10) },
};
Expand Down Expand Up @@ -518,8 +515,6 @@ const computeHoldingsByBatchAndDeposit = (
) => {
const side = getSideFromDeposit(deposit);
const tokens = findTokensForBatch(batch, tokenMap);
console.info('side', side);
console.info('tokens', tokens);

if (batchIsCleared(batch.status)) {
const clearing = batch.status['cleared'].clearing;
Expand Down Expand Up @@ -686,8 +681,6 @@ export const computeAllHoldings = async (
) => {
return Promise.all(
Object.entries(orderbook).map(async ([batchNumber, deposits]) => {
console.info('batch number', batchNumber);
console.info('deposits', deposits);
const batch = await getBigMapByIdAndBatchNumber(
parseInt(batchNumber, 10)
);
Expand Down

0 comments on commit 8f78c0d

Please sign in to comment.