8 lines
3.4 KiB
JavaScript
8 lines
3.4 KiB
JavaScript
import{a as H}from"./chunk-MI6KBVCY.js";import{d as k}from"./chunk-SN5KMB4Y.js";import{c as W}from"./chunk-RBSWB7WT.js";import{a as G}from"./chunk-Y7SOKHUW.js";import{g as F}from"./chunk-26NG6ZCB.js";import{r as e}from"./chunk-4FLAC4IK.js";import{C as S,jc as $}from"./chunk-QY24TFF7.js";import{d as N}from"./chunk-HN3IBJKK.js";import{c as o}from"./chunk-DS3RNNYF.js";import{Rd as E,Ud as y,Xd as j,ic as u,od as Z}from"./chunk-I5E2ION7.js";import{H as P,y as f}from"./chunk-SQMXULWT.js";import{G as L,e as v,o as D}from"./chunk-GQZAGQSC.js";import{b}from"./chunk-BF2V36QE.js";import{f as C,o as t,q as i}from"./chunk-QTLWQ5AJ.js";t();i();var a=C(b()),q=C($());P();Z();j();t();i();var s=C(b());P();j();t();i();var l={itemWrapper:"_itemWrapper_guwjx_1",chain:"_chain_guwjx_8",content:"_content_guwjx_11",address:"_address_guwjx_14",amount:"_amount_guwjx_17",active:"_active_guwjx_20"};var O=({data:d,active:p,onClick:x})=>{let{addressType:n,userAddress:_,coinAmount:m,currencyAmount:A,localType:h,displayPrecision:g,stableCoin:I}=d;return s.default.createElement(o.FlexBox,{align:o.ALIGN.center,className:`${l.itemWrapper} ${p&&l.active}`,onClick:x},s.default.createElement(o.Box,{className:l.chain},s.default.createElement(v,{alt:"token",width:32,height:32,src:d?.image||N,errorImg:N})),s.default.createElement(o.FlexBox,{align:o.ALIGN.center,justify:"space-between",className:l.content},s.default.createElement(o.FlexBox,{direction:o.DIRECTION.vertical},s.default.createElement(e.Text,{strong:500,className:l.address},f(E[y?.[h]?.[n]])),s.default.createElement(e.Text,{type:e.TYPE.secondary,size:e.SIZE.xs},S(_))),s.default.createElement(o.FlexBox,{direction:o.DIRECTION.vertical,align:o.ALIGN.unset},s.default.createElement(e.DisplayAmount,{strong:!0,noStyle:!1,amount:m,mode:e.CRYPTO,ellipsis:!0,align:e.ALIGN.right,className:l.amount,displayPrecision:g,stableCoin:I}),s.default.createElement(e.DisplayAmount,{mode:e.LEGAL,size:e.SIZE.xs,type:e.TYPE.secondary,align:e.ALIGN.right,useApproximate:!1,ellipsis:!0},A))))};t();i();var T={main:"_main_dhmjq_1",title:"_title_dhmjq_4",subTitle:"_subTitle_dhmjq_9",dialogContainer:"_dialogContainer_dhmjq_13"};var M=({visible:d,onClose:p,coinId:x,walletId:n,children:_,onChange:m})=>{let A=(0,q.useDispatch)(),h=k(x),g=W(u,n),I=H(h,n),Y=g?.map(r=>I.find(c=>y?.[c?.localType]?.[c?.addressType]===r.addressType)).filter(Boolean),B=G(u,n),z=r=>{B!==r.userAddress&&(p(),A(F(n,{[u]:y[u][r?.addressType]})).then(()=>{L.success({title:f("wallet_extension_toast_address_format_changed"),desc:r.userAddress,duration:1.5,placement:L.DIRECTION.top,containerClassName:"address-copy-notification"}),m&&m([null,{walletInfo:g,walletId:n,btcAddress:r.userAddress}])}).catch(c=>{m&&m([c,null])}))};return a.default.createElement(D.Action,{visible:d,onClose:p,maskClosable:!0,noTopRadius:!1,windowStyle:{overflow:"hidden"},containerClassName:T.dialogContainer,noContentPadding:!1},a.default.createElement(o.Box,{className:T.main},_,Y?.map((r,c)=>a.default.createElement(O,{key:r?.addressType||c,data:r,active:B===r?.userAddress,onClick:()=>z(r)}))))},U=({title:d,subTitle:p})=>a.default.createElement(a.default.Fragment,null,a.default.createElement(e.Text,{strong:700,className:T.title},d),a.default.createElement(e.Text,{className:T.subTitle,size:e.SIZE.sm,type:e.TYPE.secondary},p));M.Header=U;export{M as a};
|
|
|
|
window.inOKXExtension = true;
|
|
window.inMiniApp = false;
|
|
window.ASSETS_BUILD_TYPE = "publish";
|
|
|
|
//# sourceMappingURL=chunk-XZPMCQSZ.js.map
|