zhangchunrui 1 неделя назад
Родитель
Сommit
3479b24eb9
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/copy/index.ts

+ 2 - 2
src/copy/index.ts

@@ -50,8 +50,8 @@ export async function copyPosition(positionDetails: OpenPositionEvent['positionD
 			maxUsdValue,
 		}),
 	}).then(res => res.json()).then((response: unknown) => {
-		const data = response as { ok?: boolean, error?: string }
-		if (!data.ok) {
+		const data = response as { success?: boolean, error?: string }
+		if (!data.success) {
 			throw new Error(data.error ?? 'Failed to copy position')
 		}
 		console.log(`[${Date.now()}] 复制仓位成功`)