"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query"),utils_1=require("../../utils"),error_1=require("@b/utils/error");exports.metadata={summary:"Retrieves details of a specific wallet",description:"Fetches detailed information about a specific wallet based on its unique identifier.",operationId:"getWallet",tags:["Finance","Wallets"],requiresAuth:!0,parameters:[{index:0,name:"type",in:"path",required:!0,description:"The type of wallet to retrieve",schema:{type:"string",enum:["FIAT","SPOT","ECO","FUTURES"]}},{index:1,name:"currency",in:"path",required:!0,description:"The currency of the wallet to retrieve",schema:{type:"string"}}],responses:{200:{description:"Wallet details retrieved successfully"},401:query_1.unauthorizedResponse,404:(0,query_1.notFoundMetadataResponse)("Wallet"),500:query_1.serverErrorResponse}};exports.default=async e=>{const{user:t,params:r,ctx:s}=e;if(!t)throw(0,error_1.createError)({statusCode:401,message:"Unauthorized"});const{type:i,currency:a}=r;null==s||s.step(`Fetching ${i} wallet for ${a}`);const u=await(0,utils_1.getWallet)(t.id,i,a);null==s||s.success("Wallet retrieved successfully");return u};