File tree Expand file tree Collapse file tree 1 file changed +5
-20
lines changed
packages/kit/src/views/Swap/hooks Expand file tree Collapse file tree 1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -301,34 +301,19 @@ export function useSwapAddressInfo(type: ESwapDirectionType) {
301301 swapToAnotherAccountAddressAtom . accountInfo . account &&
302302 activeAccount &&
303303 activeAccount . account &&
304- activeAccount . network ?. id === swapToAnotherAccountAddressAtom . networkId
304+ ( activeAccount . network ?. id ===
305+ swapToAnotherAccountAddressAtom . networkId ||
306+ isAllNetwork )
305307 ) {
306308 return {
307309 ...res ,
308- address : isAllNetwork
309- ? accountForAllNet ?. addressDetail ?. address
310- : swapToAnotherAccountAddressAtom . address ,
311- networkId :
312- isAllNetwork && tokenNetworkId
313- ? tokenNetworkId
314- : swapToAnotherAccountAddressAtom . networkId ,
310+ address : swapToAnotherAccountAddressAtom . address ?? '' ,
311+ networkId : swapToAnotherAccountAddressAtom . networkId ?? '' ,
315312 accountInfo : {
316313 ...swapToAnotherAccountAddressAtom . accountInfo ,
317- account : {
318- ...swapToAnotherAccountAddressAtom . accountInfo . account ,
319- id : isAllNetwork
320- ? accountForAllNet ?. id ?? ''
321- : swapToAnotherAccountAddressAtom . accountInfo ?. account ?. id ?? '' ,
322- } ,
323314 } ,
324315 activeAccount : {
325316 ...activeAccount ,
326- account : {
327- ...activeAccount . account ,
328- id : isAllNetwork
329- ? accountForAllNet ?. id ?? ''
330- : activeAccount . account ?. id ?? '' ,
331- } ,
332317 } ,
333318 } ;
334319 }
You can’t perform that action at this time.
0 commit comments