Skip to content

Commit

Permalink
chore: fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Dec 5, 2024
1 parent a5d5b00 commit b7c9fbf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/background/service/customTestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export const createTestnetChain = (chain: TestnetChainBase): TestnetChain => {
nativeTokenLogo: '',
scanLink: chain.scanLink || '',
logo: `data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'><circle cx='14' cy='14' r='14' fill='%236A7587'></circle><text x='14' y='15' dominant-baseline='middle' text-anchor='middle' fill='white' font-size='16' font-weight='500'>${encodeURIComponent(
chain.name.trim().substring(0, 1)
chain.name.trim().substring(0, 1).toUpperCase()
)}</text></svg>`,
eip: {
1559: false,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/component/TestnetChainLogo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const TestnetChainLogo = ({
className
)}
>
{name.trim().substring(0, 1)}
{name.trim().substring(0, 1).toUpperCase()}
</div>
);
};
4 changes: 2 additions & 2 deletions src/ui/models/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import type { AccountState } from './account';
import { Chain } from '@debank/common';
import { TestnetChain } from '@/background/service/customTestnet';
import { sleep } from '../utils';

type IState = {
currentConnection: ConnectedSite | null | undefined;
Expand Down Expand Up @@ -73,8 +74,7 @@ export const chains = createModel<RootModel>()({
},
effects: (dispatch) => ({
init(_: void, store) {
store.app.wallet
.getCustomTestnetLogos()
Promise.race([store.app.wallet.getCustomTestnetLogos(), sleep(3000)])
.then(() => store.app.wallet.getCustomTestnetList())
.then((testnetList) => {
updateChainStore({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/Bridge/Component/BridgeToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const BridgeToken = ({
) : (
<span>{useValue}</span>
)}
{isToken && !!value && (
{!valueLoading && isToken && !!value && (
<RcIconInfoCC
onClick={() => openFeePopup(true)}
viewBox="0 0 14 14"
Expand Down

0 comments on commit b7c9fbf

Please sign in to comment.