@@ -8,6 +8,7 @@ import type {
88 ISignedTxPro ,
99} from '@onekeyhq/engine/src/vaults/types' ;
1010import debugLogger from '@onekeyhq/shared/src/logger/debugLogger' ;
11+ import platformEnv from '@onekeyhq/shared/src/platformEnv' ;
1112
1213import backgroundApiProxy from '../../../background/instance/backgroundApiProxy' ;
1314import useAppNavigation from '../../../hooks/useAppNavigation' ;
@@ -106,30 +107,33 @@ export function useSwapSend() {
106107 onFail ?.( e as Error ) ;
107108 }
108109 } else {
109- navigation . navigate ( RootRoutes . Modal , {
110- screen : ModalRoutes . Send ,
111- params : {
112- screen : SendModalRoutes . SendConfirm ,
110+ const delay = platformEnv . isNative ? 10 : 100 ;
111+ setTimeout ( ( ) => {
112+ navigation . navigate ( RootRoutes . Modal , {
113+ screen : ModalRoutes . Send ,
113114 params : {
114- accountId,
115- networkId,
116- payloadInfo,
117- feeInfoEditable : true ,
118- feeInfoUseFeeInTx : false ,
119- encodedTx,
120- prepaidFee,
121- hideSendFeedbackReceipt : ! showSendFeedbackReceipt ,
122- onDetail,
123- onFail,
124- onSuccess : ( result , data ) => {
125- onSuccess ?.( {
126- result,
127- decodedTx : data ?. decodedTx ?? undefined ,
128- } ) ;
115+ screen : SendModalRoutes . SendConfirm ,
116+ params : {
117+ accountId,
118+ networkId,
119+ payloadInfo,
120+ feeInfoEditable : true ,
121+ feeInfoUseFeeInTx : false ,
122+ encodedTx,
123+ prepaidFee,
124+ hideSendFeedbackReceipt : ! showSendFeedbackReceipt ,
125+ onDetail,
126+ onFail,
127+ onSuccess : ( result , data ) => {
128+ onSuccess ?.( {
129+ result,
130+ decodedTx : data ?. decodedTx ?? undefined ,
131+ } ) ;
132+ } ,
129133 } ,
130134 } ,
131- } ,
132- } ) ;
135+ } ) ;
136+ } , delay ) ;
133137 }
134138 } ,
135139 [ validationSetting , navigation ] ,
0 commit comments