Skip to content

Commit

Permalink
fix: fix for upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
slient-coder committed Aug 18, 2024
1 parent 80c9d79 commit fdfe590
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/background/controller/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,6 @@ export class WalletController extends BaseController {
const timeId = preferenceService.getAutoLockTimeId();
const timeConfig = AUTO_LOCKTIMES[timeId] || AUTO_LOCKTIMES[DEFAULT_LOCKTIME_ID];
this.timer = setTimeout(() => {
console.log('timeout setLocked!');
this.lockWallet();
}, timeConfig.time);
};
Expand Down
3 changes: 1 addition & 2 deletions src/ui/pages/BRC20/BRC20TokenScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import BigNumber from 'bignumber.js';
import { useEffect, useMemo, useState } from 'react';

import { brc20Utils } from '@/shared/lib/brc20-utils';
import { AddressTokenSummary, Inscription } from '@/shared/types';
import { Button, Column, Content, Header, Icon, Layout, Row, Text } from '@/ui/components';
import { useTools } from '@/ui/components/ActionComponent';
Expand Down Expand Up @@ -84,7 +83,7 @@ export default function BRC20TokenScreen() {

const enableMint = useMemo(() => {
let enable = false;
if (brc20Utils.is5Byte(ticker)) {
if (tokenSummary.tokenBalance.selfMint) {
if (tokenSummary.tokenInfo.holder == account.address) {
if (tokenSummary.tokenInfo.totalMinted != tokenSummary.tokenInfo.totalSupply) {
enable = true;
Expand Down
9 changes: 7 additions & 2 deletions src/ui/pages/Main/WalletTabScreen/OrdinalsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export function OrdinalsTab() {

const chain = useChain();

const tabKey = useOrdinalsAssetTabKey();
let tabKey = useOrdinalsAssetTabKey();
if (chain.isFractal && tabKey === OrdinalsAssetTabKey.BRC20_5BYTE) {
tabKey = OrdinalsAssetTabKey.BRC20;
}

const dispatch = useAppDispatch();

const tabItems = useMemo(() => {
Expand All @@ -43,6 +47,7 @@ export function OrdinalsTab() {
}
return items;
}, [addressSummary, chain]);

return (
<Column>
<Row justifyBetween>
Expand All @@ -57,7 +62,7 @@ export function OrdinalsTab() {
/>
</Row>

{tabItems[tabKey].children}
{tabItems[tabKey] ? tabItems[tabKey].children : null}
</Column>
);
}
8 changes: 3 additions & 5 deletions src/ui/state/settings/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ export function useAddressType() {

export function useNetworkType() {
const accountsState = useSettingsState();
if (
accountsState.chainType === ChainType.BITCOIN_MAINNET ||
accountsState.chainType === ChainType.FRACTAL_BITCOIN_MAINNET
) {
return NetworkType.MAINNET;
const chain = CHAINS_MAP[accountsState.chainType];
if (chain) {
return chain.networkType;
} else {
return NetworkType.TESTNET;
}
Expand Down

0 comments on commit fdfe590

Please sign in to comment.