Skip to content

Commit

Permalink
fix: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Nov 20, 2024
1 parent 4ba3e98 commit 591bfca
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/auth-server/components/session/tokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,25 +213,6 @@ const spendLimitTokens = computed(() => {
const hasUnlimitedSpend = computed(() => spendLimitTokens.value.some((item) => item.amount === "unlimited"));
/* const spendLimitTokens = computed(() => {
if (!props.session || !tokensList.value) return;
let spendLimits: { [tokenAddress: string]: bigint } = {
[BASE_TOKEN_ADDRESS]: props.session.feeLimit?.limit,
};
spendLimits = (props.session.transferPolicies || []).reduce((acc, transferPolicy) => {
return {
...acc,
[BASE_TOKEN_ADDRESS]: (acc[BASE_TOKEN_ADDRESS] || BigInt(0)) + BigInt(transferPolicy.valueLimit.limit),
};
}, spendLimits);
return Object.entries(spendLimits)
.filter(([,amount]) => amount > 0n)
.map(([tokenAddress, amount]) => ({
token: tokensList.value![tokenAddress],
amount,
}));
}); */
const totalUsd = computed(() => (spendLimitTokens.value || []).reduce((acc, item) => {
if (!item.token.price) return acc;
const formattedTokenAmount = formatUnits(BigInt(item.amount), item.token.decimals);
Expand Down

0 comments on commit 591bfca

Please sign in to comment.