Skip to content

Commit

Permalink
Merge pull request #162 from P4-Games/feature/withdraw-all-url
Browse files Browse the repository at this point in the history
merge feature/withdrwa-all-url
  • Loading branch information
dappsar authored Dec 30, 2024
2 parents 9dd9985 + 2a2de19 commit 47dc080
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/api/_data/blk-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ import TokenPriceFeedsAbi from './_abis/TokenPriceFeedsAbi.json'
export async function transferAll(channelUserId: string, walletTo: string): Promise<boolean> {
try {
const data = { channel_user_id: channelUserId, dst_address: walletTo }
await axios.post(`${BACKEND_API_URL}/withdraw_all`, data)
await axios.post(`${BACKEND_API_URL}/withdraw_all`, data, {
headers: {
Authorization: `Bearer ${BACKEND_API_TOKEN}`
}
})
return true
} catch (error) {
console.error('Error transfering all funds:', error)
Expand Down

0 comments on commit 47dc080

Please sign in to comment.