Skip to content

Commit

Permalink
Next
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Nov 22, 2023
1 parent 209cdf9 commit 3113e4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/pages/api/vesting/v1/vesting_accounts.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { PythBalance } from '@pythnetwork/staking/app/pythBalance'
import BN from 'bn.js'

export default async function handlerVestingAccounts(
req: NextApiRequest,
res: NextApiResponse
) {
const { owner } = req.query

const balance = new PythBalance(new BN(1000))

if (owner == undefined || owner instanceof Array) {
res.status(400).json({
error: "Must provide the 'owner' query parameters",
})
} else {
res.status(200).json({ owner: owner })
res.status(200).json({ owner: balance.toString() })
}
}

0 comments on commit 3113e4e

Please sign in to comment.