File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -222,21 +222,25 @@ export async function POST(request: Request) {
222222 // 3. Create wallet via Para SDK
223223 const { wallet, userShare } = await createParaWallet ( user . email ) ;
224224
225+ // wallet.id and wallet.address are validated in createParaWallet
226+ const walletId = wallet . id as string ;
227+ const walletAddress = wallet . address as string ;
228+
225229 // 4. Store wallet and create integration
226230 await storeWalletAndIntegration ( {
227231 userId : user . id ,
228232 email : user . email ,
229- walletId : wallet . id ,
230- walletAddress : wallet . address ,
233+ walletId,
234+ walletAddress,
231235 userShare,
232236 } ) ;
233237
234238 // 5. Return success
235239 return NextResponse . json ( {
236240 success : true ,
237241 wallet : {
238- address : wallet . address ,
239- walletId : wallet . id ,
242+ address : walletAddress ,
243+ walletId,
240244 email : user . email ,
241245 } ,
242246 } ) ;
You can’t perform that action at this time.
0 commit comments