diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a98e37b140..cc66f39437 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index 9cb5ac80b3..a5bce51478 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 7937ce222f..6f1283687d 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # pin@v2 + uses: actions/checkout@v4 # pin@v2 - name: Run lighthouse run: | diff --git a/.github/workflows/publish-sdk.yml b/.github/workflows/publish-sdk.yml index 259bbb8d8c..4feff5d138 100644 --- a/.github/workflows/publish-sdk.yml +++ b/.github/workflows/publish-sdk.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/sentry.yml b/.github/workflows/sentry.yml index 87a2f06cba..f4eda6a753 100644 --- a/.github/workflows/sentry.yml +++ b/.github/workflows/sentry.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/packages/app/src/utils/futures.ts b/packages/app/src/utils/futures.ts index 57b0e43b90..381f951521 100644 --- a/packages/app/src/utils/futures.ts +++ b/packages/app/src/utils/futures.ts @@ -85,7 +85,7 @@ export const updatePositionUpnl = ( .sub(offChainPrice) .mul(position.side === PositionSide.LONG ? -1 : 1) ) - const pnlPct = pnl.div(position.initialMargin.add(thisPositionHistory.netTransfers)) + const pnlPct = pnl.div(thisPositionHistory.initialMargin.add(thisPositionHistory.netTransfers)) const accruedFunding = position.accruedFunding.add(thisPositionHistory.netFunding) return {