Skip to content

Commit

Permalink
TxOraichainItem getCurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
marxeille committed Jul 5, 2024
1 parent 94a0c48 commit cfed676
Showing 1 changed file with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,8 @@ import { getTimeMilliSeconds, SCREENS } from "@src/common/constants";
import { RightArrowIcon } from "@src/components/icon";
import { useStore } from "@src/stores";
import { unknownToken } from "@owallet/common";
import { has } from "lodash";

export const TxOraichainItem: FC<{
item: any;
index: number;
data: any;
}> = observer(({ item, index, data, ...props }) => {
const { priceStore, chainStore } = useStore();
const fiat = priceStore.defaultVsCurrency;
if (!item) return;
console.log(item, "item");
const getCurrency = (item, chainStore) => {
let currency = unknownToken;
if (item.denom) {
if (item.denom.startsWith("ibc/")) {
Expand All @@ -45,6 +36,20 @@ export const TxOraichainItem: FC<{
currency = token;
}
}

return currency;
};

export const TxOraichainItem: FC<{
item: any;
index: number;
data: any;
}> = observer(({ item, index, data, ...props }) => {
const { priceStore, chainStore } = useStore();
const fiat = priceStore.defaultVsCurrency;
if (!item) return;

const currency = getCurrency(item, chainStore);
const onTransactionDetail = (item, currency) => {
navigate(SCREENS.STACK.Others, {
screen: SCREENS.HistoryDetail,
Expand Down

0 comments on commit cfed676

Please sign in to comment.