Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
fix(postconditions): fix post conditions
Browse files Browse the repository at this point in the history
NOTE: does not seem to work in testnet (probably stacks issue)
  • Loading branch information
Aman-zishan committed Apr 7, 2024
1 parent 8caafdf commit 13b1625
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apps/frontend/src/utils/hooks/useTaralContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
createAssetInfo,
PostConditionMode,
makeContractFungiblePostCondition,
makeStandardFungiblePostCondition,
} from "micro-stacks/transactions";

import { fetchReadOnlyFunction } from "micro-stacks/api";
Expand Down Expand Up @@ -88,9 +89,8 @@ function useTaralContracts() {
const postConditionCode = FungibleConditionCode.LessEqual;
const postConditionAmount = downPayment;

const contractFungiblePostCondition = makeContractFungiblePostCondition(
contractAddress,
contractName,
const contractFungiblePostCondition = makeStandardFungiblePostCondition(
stxAddress!,
postConditionCode,
postConditionAmount,
fungibleAssetInfo
Expand Down Expand Up @@ -235,9 +235,8 @@ function useTaralContracts() {
const postConditionCode = FungibleConditionCode.LessEqual;
const postConditionAmount = amount;

const contractFungiblePostCondition = makeContractFungiblePostCondition(
contractAddress,
contractName,
const contractFungiblePostCondition = makeStandardFungiblePostCondition(
stxAddress!,
postConditionCode,
postConditionAmount,
fungibleAssetInfo
Expand Down

0 comments on commit 13b1625

Please sign in to comment.