Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Jun 14, 2024
1 parent 945534e commit d7e351f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/modules/telegram/TapPage/PointsClicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const PointsClicker = ({ className }: PointsClickerProps) => {
ref.current.appendChild(word)

if (myAddress && !isEmptyEnergy) {
const balance = increasePointsBalance({
increasePointsBalance({
client,
address: myAddress,
pointsByClick: 1,
Expand Down
Empty file.
6 changes: 0 additions & 6 deletions src/services/datahub/leaderboard/points-balance/optimistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,11 @@ export const increasePointsBalance = ({
address,
pointsByClick,
}: OptimisticPointsBalanceParams) => {
let data
getBalanceQuery.setQueryData(client, address, (oldData) => {
data = oldData

if (!oldData) return oldData

data = oldData + pointsByClick
return oldData + pointsByClick
})

return data
}

type OptimisticEnergyParams = {
Expand Down

0 comments on commit d7e351f

Please sign in to comment.