Skip to content

Commit

Permalink
fix: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 29, 2025
2 parents b1139a2 + 38f39c7 commit 571fdef
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 261 deletions.
4 changes: 2 additions & 2 deletions api/get-account-meme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getAssetsMEMEDetailed } from "../store";
import { getAssetsMEMEDetail } from "../store";

import getBalance from "./get-balance";
import getPortfolioMEME from "./get-portfolio-meme";
Expand All @@ -9,7 +9,7 @@ const getAccountMEME = async () => {
const account = await getAccountWallet();
const { accountId } = account;
if (accountId) {
const assets = await getAssetsMEMEDetailed();
const assets = await getAssetsMEMEDetail();
const tokenIds = assets.map((asset) => asset.token_id);
const shadowRecords = await getShadowRecords();
let accountBalance = "0";
Expand Down
4 changes: 2 additions & 2 deletions api/get-account.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getAssetsDetailed } from "../store";
import { getAssetsDetail } from "../store";

import getBalance from "./get-balance";
import getPortfolio from "./get-portfolio";
Expand All @@ -9,7 +9,7 @@ const getAccount = async () => {
const account = await getAccountWallet();
const { accountId } = account;
if (accountId) {
const assets = await getAssetsDetailed();
const assets = await getAssetsDetail();
const tokenIds = assets.map((asset) => asset.token_id);
const shadowRecords = await getShadowRecords();
let accountBalance = "0";
Expand Down
4 changes: 2 additions & 2 deletions api/get-assets-meme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Decimal from "decimal.js";
import { getAllMetadata, getAssetsMEMEDetailed, getPrices, getUnitLptAssets } from "../store";
import { getAllMetadata, getAssetsMEMEDetail, getPrices, getUnitLptAssets } from "../store";
import { shrinkToken } from "../store/helper";
import { lpTokenPrefix } from "../utils/config";
import { IToken, IUnitLptAssetDetail, IMetadata } from "../interfaces/asset";
Expand Down Expand Up @@ -40,7 +40,7 @@ const getLptMetadata = (lp_token_details: IUnitLptAssetDetail, priceMap, metadat
};

const getAssetsMEME = async () => {
const assets = await getAssetsMEMEDetailed();
const assets = await getAssetsMEMEDetail();
const token_ids_from_regular = assets
.filter((asset) => asset.token_id.indexOf(lpTokenPrefix) === -1)
.map((asset) => asset.token_id);
Expand Down
7 changes: 3 additions & 4 deletions api/get-assets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Decimal from "decimal.js";
import { getAllMetadata, getAssetsDetailed, getPrices, getUnitLptAssets } from "../store";
import { getAllMetadata, getAssetsDetail, getPrices, getUnitLptAssets } from "../store";
import { shrinkToken } from "../store/helper";
import { lpTokenPrefix, blackAssets } from "../utils/config";
import { IToken, IUnitLptAssetDetail, IMetadata } from "../interfaces/asset";
Expand Down Expand Up @@ -40,9 +40,8 @@ const getLptMetadata = (lp_token_details: IUnitLptAssetDetail, priceMap, metadat
};

const getAssets = async () => {
const assetsPendng = await getAssetsDetailed();
// TODO for satoshi
const assets = assetsPendng.filter((asset) => asset.token_id.indexOf(lpTokenPrefix) === -1);
const assets_pending = await getAssetsDetail();
const assets = assets_pending.filter((asset) => !blackAssets.includes(asset.token_id));
const token_ids_from_regular = assets
.filter((asset) => asset.token_id.indexOf(lpTokenPrefix) === -1)
.map((asset) => asset.token_id);
Expand Down
140 changes: 0 additions & 140 deletions components/Header/Menu.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions components/Header/MenuMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { MenuButton, CloseIcon, ArrowRightIcon, ArrowTopRightIcon, ArrowDownIcon
import { WrapperMenuMobile } from "./style";
import { bridgeList } from "./Bridge";
import { mainMenuList, helpMenu, Imenu } from "./menuData";
import { toggleShowDust } from "../../redux/appSlice";
import { getShowDust } from "../../redux/appSelectors";
import { toggleShowDust } from "../../redux/marginTrading";
import { getShowDust } from "../../redux/categorySelectors";
import { useAppSelector, useAppDispatch } from "../../redux/hooks";
import { DiscordIcon, MediumIcon, TwitterIcon } from "../Footer/svg";

Expand Down
4 changes: 2 additions & 2 deletions components/Header/Set.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useState } from "react";
import { twMerge } from "tailwind-merge";
import { SetIcon } from "./svg";
import { toggleShowDust } from "../../redux/appSlice";
import { getShowDust } from "../../redux/appSelectors";
import { toggleShowDust } from "../../redux/marginTrading";
import { getShowDust } from "../../redux/categorySelectors";
import { useAppSelector, useAppDispatch } from "../../redux/hooks";

const Set = () => {
Expand Down
3 changes: 2 additions & 1 deletion components/Table/common/cells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Box, Tooltip, Skeleton } from "@mui/material";
import { USD_FORMAT, TOKEN_FORMAT, APY_FORMAT, DUST_FORMAT, NUMBER_FORMAT } from "../../../store";
import type { IReward, UIAsset } from "../../../interfaces";
import { useAppSelector } from "../../../redux/hooks";
import { getDisplayAsTokenValue, getShowDust } from "../../../redux/appSelectors";
import { getDisplayAsTokenValue } from "../../../redux/appSelectors";
import { getShowDust } from "../../../redux/categorySelectors";
import { Rewards } from "../../index";
import { useFullDigits } from "../../../hooks/useFullDigits";

Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
trailingSlash: true,
reactStrictMode: false,
trailingSlash: false,
eslint: {
ignoreDuringBuilds: true,
},
Expand Down
5 changes: 0 additions & 5 deletions redux/appSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ export const getAppState = (memeCategory?) => {
);
};

export const getShowDust = createSelector(
(state: RootState) => state.app,
(app) => app.showDust,
);

export const getShowTicker = createSelector(
(state: RootState) => state.app,
(app) => app.showTicker,
Expand Down
6 changes: 0 additions & 6 deletions redux/appSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export interface AppState {
protocolStats: boolean;
displayAsTokenValue: boolean;
showTicker: boolean;
showDust: boolean;
slimStats: boolean;
showDailyReturns: boolean;
fullDigits: {
Expand Down Expand Up @@ -80,7 +79,6 @@ export const initialState: AppState = {
showInfo: true,
protocolStats: true,
displayAsTokenValue: true,
showDust: false,
showTicker: false,
slimStats: false,
showDailyReturns: false,
Expand Down Expand Up @@ -174,9 +172,6 @@ export const appSlice = createSlice({
toggleDisplayValues(state) {
state.displayAsTokenValue = !state.displayAsTokenValue;
},
toggleShowDust(state) {
state.showDust = !state.showDust;
},
toggleSlimStats(state) {
state.slimStats = !state.slimStats;
},
Expand Down Expand Up @@ -245,7 +240,6 @@ export const {
updateAmount,
toggleUseAsCollateral,
toggleDisplayValues,
toggleShowDust,
toggleSlimStats,
setFullDigits,
toggleShowTicker,
Expand Down
6 changes: 0 additions & 6 deletions redux/appSliceMEME.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export interface AppState {
protocolStats: boolean;
displayAsTokenValue: boolean;
showTicker: boolean;
showDust: boolean;
slimStats: boolean;
showDailyReturns: boolean;
fullDigits: {
Expand Down Expand Up @@ -80,7 +79,6 @@ export const initialState: AppState = {
showInfo: true,
protocolStats: true,
displayAsTokenValue: true,
showDust: false,
showTicker: false,
slimStats: false,
showDailyReturns: false,
Expand Down Expand Up @@ -174,9 +172,6 @@ export const appSliceMEME = createSlice({
toggleDisplayValues(state) {
state.displayAsTokenValue = !state.displayAsTokenValue;
},
toggleShowDust(state) {
state.showDust = !state.showDust;
},
toggleSlimStats(state) {
state.slimStats = !state.slimStats;
},
Expand Down Expand Up @@ -245,7 +240,6 @@ export const {
updateAmount,
toggleUseAsCollateral,
toggleDisplayValues,
toggleShowDust,
toggleSlimStats,
setFullDigits,
toggleShowTicker,
Expand Down
4 changes: 4 additions & 0 deletions redux/categorySelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ export const getActiveCategory = createSelector(
return category.activeCategory;
},
);
export const getShowDust = createSelector(
(state: RootState) => state.category,
(app) => app.showDust,
);
7 changes: 7 additions & 0 deletions redux/marginTrading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface commonAssets {
ReduxTotalPLN: any;
ReduxRangeMount: any;
ReduxActiveTab: string;
showDust: boolean;
}

const initialState: commonAssets = {
Expand All @@ -22,6 +23,7 @@ const initialState: commonAssets = {
ReduxTotalPLN: 0,
ReduxRangeMount: 1,
ReduxActiveTab: "long",
showDust: false,
};

const marginCategory = createSlice({
Expand Down Expand Up @@ -55,6 +57,9 @@ const marginCategory = createSlice({
setReduxActiveTab(state, action) {
state.ReduxActiveTab = action.payload;
},
toggleShowDust(state) {
state.showDust = !state.showDust;
},
},
});

Expand All @@ -68,6 +73,7 @@ const {
setReduxTotalPLN,
setReduxRangeMount,
setReduxActiveTab,
toggleShowDust,
} = marginCategory.actions;
const marginCategoryReducer = marginCategory.reducer;
export {
Expand All @@ -80,5 +86,6 @@ export {
setReduxTotalPLN,
setReduxRangeMount,
setReduxActiveTab,
toggleShowDust,
};
export default marginCategoryReducer;
Loading

0 comments on commit 571fdef

Please sign in to comment.