Skip to content

Commit 2d02cd7

Browse files
committed
Type fixes
1 parent cf85f0c commit 2d02cd7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/api/user/wallet/route.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)