Skip to content

Commit

Permalink
patch-asset-buyOption: Pass short asset address for closing.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeanBoyCousin committed Nov 3, 2023
1 parent baa1399 commit 7fc627b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ export const closeShort = async (
{
operation: OperationType.RyskAction,
operationQueue: [
buyOption(acceptablePremium, amount, EMPTY_SERIES, userAddress),
buyOption(
acceptablePremium,
amount,
tokenAddress,
EMPTY_SERIES,
userAddress
),
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { BigNumber } from "ethers";

import { OptionExchangeABI } from "src/abis/OptionExchange_ABI";
import { waitForTransactionOrTimer } from "src/components/shared/utils/waitForTransaction";
import { EMPTY_SERIES, GAS_MULTIPLIER } from "src/config/constants";
import {
EMPTY_SERIES,
GAS_MULTIPLIER,
ZERO_ADDRESS,
} from "src/config/constants";
import OperationType from "src/enums/OperationType";
import { Convert } from "src/utils/Convert";
import {
Expand Down Expand Up @@ -60,7 +64,13 @@ export const closeSpread = async (
operation: OperationType.RyskAction,
operationQueue: [
...issue(optionSeries.collateral, exposure, shortSeries),
buyOption(shortAcceptablePremium, amount, shortSeries, userAddress),
buyOption(
shortAcceptablePremium,
amount,
ZERO_ADDRESS,
shortSeries,
userAddress
),
],
},
{
Expand Down

0 comments on commit 7fc627b

Please sign in to comment.