lushdog@outlook.com 5 дней назад
Родитель
Сommit
201756f3e0
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/closePosition/index.ts

+ 4 - 1
src/closePosition/index.ts

@@ -2,7 +2,6 @@ import { loadConfig } from '../config.js'
 
 
 const LIST_API = 'https://api2.byreal.io/byreal/api/dex/v2/position/list'
 const LIST_API = 'https://api2.byreal.io/byreal/api/dex/v2/position/list'
 const DETAIL_API = 'https://api2.byreal.io/byreal/api/dex/v2/position/detail'
 const DETAIL_API = 'https://api2.byreal.io/byreal/api/dex/v2/position/detail'
-// const COPY_INFO_API = 'https://api2.byreal.io/byreal/api/dex/v2/copy/info'
 
 
 interface BonusInfo {
 interface BonusInfo {
 	fromCreatorPosition?: string
 	fromCreatorPosition?: string
@@ -90,6 +89,10 @@ async function callLpCloseApi(
 ): Promise<LpCloseApiResponse> {
 ): Promise<LpCloseApiResponse> {
 	const res = await fetch(apiUrl, {
 	const res = await fetch(apiUrl, {
 		method: 'POST',
 		method: 'POST',
+		headers: {
+			'Content-Type': 'application/json',
+			'Authorization': auth,
+		},
 		body: JSON.stringify({ nftMintAddress }),
 		body: JSON.stringify({ nftMintAddress }),
 	})
 	})
 	return res.json() as Promise<LpCloseApiResponse>
 	return res.json() as Promise<LpCloseApiResponse>