Skip to content

Commit

Permalink
Update tradeHook.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
huhuanming committed Dec 26, 2024
1 parent f651aeb commit d494b68
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/kit/src/views/Market/components/tradeHook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useCallback, useMemo, useRef, useState } from 'react';
import { useIntl } from 'react-intl';

import type { IPageNavigationProp } from '@onekeyhq/components';
import { Button, Dialog, SizableText } from '@onekeyhq/components';
import { Button, Dialog, SizableText, Toast } from '@onekeyhq/components';
import { useAccountSelectorTrigger } from '@onekeyhq/kit/src/components/AccountSelector/hooks/useAccountSelectorTrigger';
import { ETranslations } from '@onekeyhq/shared/src/locale';
import { defaultLogger } from '@onekeyhq/shared/src/logger/logger';
Expand Down Expand Up @@ -261,9 +261,14 @@ export const useMarketTradeActions = (token: IMarketTokenDetail | null) => {
},
renderContent: (
<CreateAddressDialogContent
onCreate={() => {
onCreate={async () => {
resolve();
void dialog.close({ flag: 'created' });
await dialog.close({ flag: 'created' });
Toast.success({
title: intl.formatMessage({
id: ETranslations.swap_page_toast_address_generated,
}),
});
}}
networkId={networkId}
indexedAccountId={activeAccount.account?.indexedAccountId}
Expand Down

0 comments on commit d494b68

Please sign in to comment.