PageSourceSearch

https://www.tapbit.com/_next_app/price/0.1.227/_next/static/chunks…layer-change-open-order.c77dde3b506e4c31.js

js tapbit.com collected 2026-10-03 21:40:43 UTC 14,674 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="32fe215c-ebcb-435c-9b17-8bc8a95d6b37",e._sentryDebugIdIdentifier="sentry-dbid-32fe215c-ebcb-435c-9b17-8bc8a95d6b37")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1528],{11529:(e,t,n)=>{n.d(t,{P8:()=>h,dw:()=>p,k2:()=>x});var l=n(51025),r=n(86538),s=n(41809),a=n(91474),i=n(13156);let o={pageNum:1,pageSize:10,total:0};function d(e,t){let n=Number(e);return Number.isFinite(n)?n:t}function c(e){return Math.max(1,d(e,1))}function u(e){return Math.max(1,d(e,o.pageSize))}function m(){return{initialized:!1,items:[],loading:!1,pagination:{...o}}}let p=(0,s.v)()((0,a.Zr)((e,t)=>({...m(),hideOther:!1,loadData:async n=>{var r,s,a;if(!(null==(r=l.k.getState().user)?void 0:r.userId))return void t().resetRuntime();let{pagination:o}=t(),m=c(null!=(s=null==n?void 0:n.pageNum)?s:o.pageNum),p=u(null!=(a=null==n?void 0:n.pageSize)?a:o.pageSize);e({loading:!0});try{let t=await (0,i.VG)({params:{...n,pageNum:m,pageSize:p}}),l=null==t?void 0:t.data;e({initialized:!0,items:Array.isArray(null==l?void 0:l.list)?l.list:[],loading:!1,pagination:function(e,t){var n,l;return{pageNum:c(null!=(n=null==e?void 0:e.pageNum)?n:t.pageNum),pageSize:u(null!=(l=null==e?void 0:e.pageSize)?l:t.pageSize),total:d(null==e?void 0:e.total,0),totalPage:d(null==e?void 0:e.pages,0)}}(l,{pageNum:m,pageSize:p})})}catch(t){e({loading:!1}),console.error("[TradingTablesOrderHistoryStore] 加载 Orders History 失败:",t)}},resetRuntime:()=>e(e=>({...m(),hideOther:e.hideOther})),setData:t=>e(e=>({initialized:!0,items:t.items,loading:!1,pagination:t.pagination?{...t.pagination}:e.pagination})),setHideOther:t=>e({hideOther:t}),setLoading:t=>e({loading:t}),setPageNum:t=>e(e=>({pagination:{...e.pagination,pageNum:c(t)}}))}),{name:"futures-trading-tables-order-history-storage",partialize:e=>({hideOther:e.hideOther})}));async function x(e){await p.getState().loadData(e)}let h=(0,r.A)(e=>{p.getState().loadData(e)},3e3,{leading:!0,trailing:!0})},28373:(e,t,n)=>{n.d(t,{B$:()=>g,BJ:()=>b,hT:()=>N,i3:()=>v,nJ:()=>y,o8:()=>f});var l=n(31806),r=n(51025),s=n(90178),a=n(28598),i=n(22354),o=n(11529),d=n(39731),c=n(31150);function u(e){return(0,a.oI)(e)}function m(e){let t=d.hv.getState().hideOther,n=(0,a.Hp)(e);return n&&t?{symbol:n}:void 0}function p(e){var t,n,a;let i=null!=(a=null!=(t=e.userId)?t:null==(n=r.k.getState().user)?void 0:n.userId)?a:null;return i?(0,l.S)().invalidateQueries({queryKey:(0,s.Jg)(e.locale,i)}):Promise.resolve()}function x(e){let t=u(e.symbol);return t?(0,l.S)().invalidateQueries({queryKey:(0,s.sJ)(e.locale,t)}):Promise.resolve()}function h(e){let t=u(e.symbol);return t?(0,l.S)().invalidateQueries({queryKey:(0,s.xc)(e.locale,t)}):Promise.resolve()}async function g(e){await Promise.all([(0,i.NA)(),h(e),x(e),p(e)])}async function f(e){await Promise.all([(0,i.NA)(),p(e)])}async function v(e){let t=u(e.symbol),n=m(e.symbol);await Promise.all([p(e),(0,i.NA)(),(0,o.P8)(),(0,c.wS)(t?{symbol:t}:void 0),(0,d.$t)(n)])}async function b(e){let t=u(e.symbol),n=m(e.symbol);await Promise.all([p(e),(0,i.NA)(),(0,o.P8)(),(0,c.wS)(t?{symbol:t}:void 0),(0,d.$t)(n),x(e),h(e)])}async function y(e){let t=m(e.symbol);await Promise.all([(0,i.NA)(),(0,d.$t)(t),p(e)])}async function N(e){let t=u(e.symbol),n=c.a5.getState().hideOther;await Promise.all([(0,c.wS)(t&&n?{symbol:t}:void 0),h(e),x(e)])}},70030:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var l=n(79237),r=n(61554),s=n(93924),a=n(53951),i=n(24626),o=n(70659),d=n(66960),c=n(749),u=n(41760),m=n(96620),p=n(19490),x=n(3529),h=n(52293),g=n(89719),f=n(94283),v=n(38113),b=n(21219),y=n(32955),N=n(97430),j=n(63215),S=n(39422),w=n(28373),C=n(25749);function P(e,t){if(null==e||""===e)return"";let n=String((null==t?void 0:t.minPriceChange)||"0.5");if(!n.endsWith("5"))return String(e);let l=Number(null==t?void 0:t.precision),r=Number.isFinite(l)?l:function(e){var t;let n=e.split(".")[1];return null!=(t=null==n?void 0:n.length)?t:0}(n);return(0,c.Xt)(e,r,n)}function O(e,t){if(null==e||""===e)return"--";let n=(0,p.iT)(e);return t?"".concat(n," ").concat(t):n}function k(){var e,t;let{$t:n,locale:c}=(0,d.B)(),p=(0,g.QA)(),k=(0,b.T)(),_=(0,C.zR)(),L=_.params,A=null==L?void 0:L.order,I=k||(null==A?void 0:A.symbol)||"",z=(0,u.N1)(function(e){if(e)return m.p.USDT.SIMPLE_TICKER(e.endsWith("-SWAP")?e:"".concat(e,"-SWAP"))}(I))||{},D=(0,h.bZ)(e=>I?e.symbolsConfigBySymbol[I]:void 0),T=(0,y.D)(),{unit:M}
1=(0,N.A)({symbol:I}),[B,$]=(0,v.useState)(()=>P(null==L?void 0:L.orderPrice,D)),[E,W]=(0,v.useState)(!1),[Q,K]=(0,v.useState)(!1),R=p.usdt_user_confirm||"11111111";3===R.length&&(R="".concat(R,"11111")),4===R.length&&(R="".concat(R,"1111")),5===R.length&&(R="".concat(R,"111"));let q=function(e,t){let n=null==e?void 0:e.side;if("long"===n)return t("Long");if("short"===n)return t("Short");let l=null==e?void 0:e.direction;return"openLong"===l?t("Open Long_2"):"openShort"===l?t("Open Short_2"):"closeLong"===l?t("Close Long_2"):"closeShort"===l?t("Close Short_2"):""}(A,n),F="".concat(q).concat(q?" ":"").concat(null!=(e=null==A?void 0:A.leverage)?e:0,"X"),H=I?(0,x.A2)(I,""):"",U=B||z.last||0,J=A&&I?O(T(null!=(t=A.quantity)?t:0,I,U),M):"--",X=()=>{$(""),W(!1),K(!1)},Z=()=>{var e;_.hideLayer(),X(),null==L||null==(e=L.onClose)||e.call(L)};(0,v.useEffect)(()=>{_.visible&&($(P(null==L?void 0:L.orderPrice,D)),W(!1),K(!1))},[_.visible,null==L?void 0:L.orderPrice,D]);let G=async()=>{if(!(null==A?void 0:A.orderId)||0>=Number(B))return void(0,s.toast)({type:"error",title:n("Please enter the correct price")});K(!0);try{let e=await (0,S.mZ)({locale:c,params:{orderId:A.orderId,orderPrice:B}});if((null==e?void 0:e.code)!==200)return;E&&(0,j.L4)(c,R,5),(0,s.toast)({type:"success",title:n("Order place success")}),(0,w.B$)({locale:c,symbol:I}).catch(e=>{console.error("[ChangeOpenOrderLayer] 刷新改单后数据失败:",e)}),_.hideLayer(),X()}finally{K(!1)}};return(0,l.jsx)(a.Dialog,{open:_.visible,onOpenChange:e=>{e||Z()},title:(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("span",{children:n("Modify Order")}),(H||q)&&(0,l.jsxs)("span",{className:"text-mm14 gap-s2 flex items-center",children:[H&&(0,l.jsx)("span",{className:"text-t3",children:H}),H&&q&&(0,l.jsx)("span",{className:"bg-l1 h-3 w-px"}),q&&(0,l.jsx)("span",{className:function(e){let t=(null==e?void 0:e.side)||(null==e?void 0:e.direction);return"short"===t||"openShort"===t||"closeLong"===t?"text-p3":"text-p2"}(A),children:F})]})]}),variant:"drawer",className:"!border-l1 !bg-m1 shadow-3 !rounded-t-r5 md:!rounded-r4 !w-full !max-w-none !overflow-hidden !rounded-b-none !border-t !p-0 md:!w-[420px] md:!max-w-[calc(100vw-32px)] md:!border md:!p-6",headerClassName:"px-4 pt-5 md:p-0",bodyClassName:"px-4 pt-s4 pb-0 md:p-0",footer:(0,l.jsxs)("div",{className:"gap-s3 flex flex-col px-4 pb-5 md:p-0",children:[(0,l.jsx)(i.Checkbox,{checked:E,onCheckedChange:e=>W(!!e),labelClassName:"items-start gap-1",className:"mt-px",children:(0,l.jsx)("span",{className:"text-c12 text-t1 leading-4",children:n('No reminders(Can be reset in "Order Confirmation")')})}),(0,l.jsxs)("div",{className:"gap-s2 grid h-10 grid-cols-2",children:[(0,l.jsx)(o.$,{variant:"secondary",size:"m",className:"h-10",disabled:Q,onClick:Z,children:n("Cancel")}),(0,l.jsx)(o.$,{size:"m",className:"h-10",loading:Q,disabled:Q||!B,onClick:()=>void G(),children:n("Confirm")})]})]}),children:(0,l.jsxs)("div",{className:"gap-s4 flex flex-col",children:[(0,l.jsxs)("div",{className:"bg-bg2 rounded-r2 p-s3 gap-s2 flex flex-col",children:[(0,l.jsxs)("div",{className:"text-c12 gap-s4 flex items-center justify-between",children:[(0,l.jsxs)("span",{className:"text-t3",children:[n("Mark Price_1"),"/",n("Last Price_1")]}),(0,l.jsxs)("span",{className:"text-t1 min-w-[126px] text-right",children:[O(z.markPrice||0),"/",O(z.last||0)]})]}),(0,l.jsxs)("div",{className:"text-c12 gap-s4 flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-t3",children:n("Order Qty")}),(0,l.jsx)("span",{className:"text-t1 min-w-[126px] text-right",children:J})]})]}),(0,l.jsxs)("div",{className:"gap-s2 flex flex-col",children:[(0,l.jsx)("div",{className:"text-c12 text-t1",children:n("Price")}),(0,l.jsx)(f.Ay,{autoFocus:!0,symbol:I,value:B,onChange:$,className:"bg-bg2 rounded-r3 h-10 border-none",inputClassName:"text-bm14 text-right",prefix:(0,l.jsx)("span",{className:"text-bm14 text-t4",children:n("Order Price")}),suffix:(0,l.jsx)("span",{className:"text-bm14 text-t1",children:"USDT"})})]}),(0,l.jsxs)("div",{className:"bg-p4/10 text-p4 text-c12 gap-s2 rounded-r3 px-s4 py-s3 flex items-start overflow-hidden leading-4",children:[(0,l.jsx)(r.M,{className:"size-5 shrink-0"}),(0,l.jsx)("span",{children:n("By modifying an order, you will cancel the original order. Modified orders may be rejected due to restrictions and market changes.")})]})]})})}},74511:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_});var l=n(79237),r=n(61554),s=n(93924),a=n(53951),i=n(24626),o=n(70659),d=n(66960),c=n(749),u=n(41760),m=n(96620),p=n(19490
1),x=n(3529),h=n(95696),g=n(12733),f=n(89719),v=n(94283),b=n(38113),y=n(92413),N=n(97450),j=n(27644),S=n(32837),w=n(97867),C=n(50791),P=n(50965);function O(e,t){if(null==e||""===e)return"";let n=String((null==t?void 0:t.minPriceChange)||"0.5");if(!n.endsWith("5"))return String(e);let l=Number(null==t?void 0:t.precision),r=Number.isFinite(l)?l:function(e){var t;let n=e.split(".")[1];return null!=(t=null==n?void 0:n.length)?t:0}(n);return(0,c.Xt)(e,r,n)}function k(e,t){if(null==e||""===e)return"--";let n=(0,p.iT)(e);return t?"".concat(n," ").concat(t):n}function _(){var e,t;let{$t:n,locale:c}=(0,d.B)(),p=(0,f.QA)(),_=(0,y.T)(),L=(0,C.zR)(),A=L.params,I=null==A?void 0:A.order,z=_||(null==I?void 0:I.symbol)||"",D=(0,u.N1)(function(e){if(e)return m.p.USDT.SIMPLE_TICKER(e.endsWith("-SWAP")?e:"".concat(e,"-SWAP"))}(z))||{},T=(0,g.bZ)(e=>z?e.symbolsConfigBySymbol[z]:void 0),M=(0,N.D)(),{unit:B}=(0,j.A)({symbol:z}),[$,E]=(0,b.useState)(()=>O(null==A?void 0:A.orderPrice,T)),[W,Q]=(0,b.useState)(!1),[K,R]=(0,b.useState)(!1),q=p.usdt_user_confirm||"11111111";3===q.length&&(q="".concat(q,"11111")),4===q.length&&(q="".concat(q,"1111")),5===q.length&&(q="".concat(q,"111"));let F=function(e,t){let n=null==e?void 0:e.side;if("long"===n)return t("Long");if("short"===n)return t("Short");let l=null==e?void 0:e.direction;return"openLong"===l?t("Open Long_2"):"openShort"===l?t("Open Short_2"):"closeLong"===l?t("Close Long_2"):"closeShort"===l?t("Close Short_2"):""}(I,n),H="".concat(F).concat(F?" ":"").concat(null!=(e=null==I?void 0:I.leverage)?e:0,"X"),U=z?(0,x.A2)(z,""):"",J=$||D.last||0,X=I&&z?k(M(null!=(t=I.quantity)?t:0,z,J),B):"--",Z=()=>{E(""),Q(!1),R(!1)},G=()=>{var e;L.hideLayer(),Z(),null==A||null==(e=A.onClose)||e.call(A)};(0,b.useEffect)(()=>{L.visible&&(E(O(null==A?void 0:A.orderPrice,T)),Q(!1),R(!1))},[L.visible,null==A?void 0:A.orderPrice,T]);let V=async()=>{if(!(null==I?void 0:I.orderId)||0>=Number($))return void(0,s.toast)({type:"error",title:n("Please enter the correct price")});R(!0);try{let e=await (0,h.Hw)({locale:c,params:{orderId:I.orderId,orderPrice:$}});if((null==e?void 0:e.code)!==200){(null==e?void 0:e.code)===10307&&(0,C.NK)(P.k.InsufficientBalance);return}W&&(0,S.L4)(c,q,5),(0,s.toast)({type:"success",title:n("Order placed successfully")}),(0,w.B$)({locale:c,symbol:z}).catch(e=>{console.error("[ChangeOpenOrderLayer] 刷新改单后数据失败:",e)}),L.hideLayer(),Z()}catch(e){console.error("Unhandled async action error",e)}finally{R(!1)}};return(0,l.jsx)(a.Dialog,{open:L.visible,onOpenChange:e=>{e||G()},title:(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("span",{children:n("Modify Order")}),(U||F)&&(0,l.jsxs)("span",{className:"text-mm14 gap-s2 flex items-center",children:[U&&(0,l.jsx)("span",{className:"text-t3",children:U}),U&&F&&(0,l.jsx)("span",{className:"bg-l1 h-3 w-px"}),F&&(0,l.jsx)("span",{className:function(e){let t=(null==e?void 0:e.side)||(null==e?void 0:e.direction);return"short"===t||"openShort"===t||"closeLong"===t?"text-p3":"text-p2"}(I),children:H})]})]}),variant:"drawer",className:"!border-l1 !bg-m1 shadow-3 !rounded-t-r5 md:!rounded-r4 !w-full !max-w-none !overflow-hidden !rounded-b-none !border-t !p-0 md:!w-[420px] md:!max-w-[calc(100vw-32px)] md:!border md:!p-6",headerClassName:"px-4 pt-5 md:p-0",bodyClassName:"px-4 pt-s4 pb-0 md:p-0",footer:(0,l.jsxs)("div",{className:"gap-s3 flex flex-col px-4 pb-5 md:p-0",children:[(0,l.jsx)(i.Checkbox,{checked:W,onCheckedChange:e=>Q(!!e),labelClassName:"items-start gap-1",className:"mt-px",children:(0,l.jsx)("span",{className:"text-c12 text-t1 leading-4",children:n('No reminders(Can be reset in "Order Confirmation")')})}),(0,l.jsxs)("div",{className:"gap-s2 grid h-10 grid-cols-2",children:[(0,l.jsx)(o.$,{variant:"secondary",size:"m",className:"h-10",disabled:K,onClick:G,children:n("Cancel")}),(0,l.jsx)(o.$,{size:"m",className:"h-10",loading:K,disabled:K||!$,onClick:()=>void V(),children:n("Confirm")})]})]}),children:(0,l.jsxs)("div",{className:"gap-s4 flex flex-col",children:[(0,l.jsxs)("div",{className:"bg-bg2 rounded-r2 p-s3 gap-s2 flex flex-col",children:[(0,l.jsxs)("div",{className:"text-c12 gap-s4 flex items-center justify-between",children:[(0,l.jsxs)("span",{className:"text-t3",children:[n("Mark Price_1"),"/",n("Last Price_1")]}),(0,l.jsxs)("span",{className:"text-t1 min-w-[126px] text-right",children:[k(D.markPrice||0),"/",k(D.last||0)]})]}),(0,l.jsxs)("div",{className:"text-c12 gap-s4 flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-t3",children:n("Order Qty")}),(0,l.jsx)("span",{className:"text-t1 min-w-[126px] text-right",children:X})]})]}),(0,l.jsxs)("div",{className:"gap-s2 flex flex-col",children:[(0,l.jsx)("div",{className:"text-c12 text-t1",children:n("Price")}),(0,l.jsx)(v.Ay,{autoFocus:!0,symbol:z,value:$,onChange:E,className:"bg-bg2 rounded-r3 h-10 border-none",inputClassName:"text-bm14 text-right",prefix:(0,l.jsx)("span",{className:"text-bm14 text-t4",children:n("Order Price")}),suffix:(0,l.jsx)("span",{className:"text-bm14 text-t1",children:"USDT"})})]}),(0,l.jsxs)("div",{className:"bg-p4/10 text-p4 text-c12 gap-s2 rounded-r3 px-s4 py-s3 flex items-start overflow-hidden leading-4",children:[(0,l.jsx)(r.M,{className:"size-5 shrink-0"}),(0,l.jsx)("span",{children:n("By modifying an order, you will cancel the original order. Modified orders may be rejected due to restrictions and market changes.")})]})]})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.