mirror of
https://github.com/alexgo-io/ballot.git
synced 2026-04-30 22:12:29 +08:00
fix: Post condition is removed for the contract deployment.
This commit is contained in:
@@ -10,15 +10,6 @@ const cancelCallbackFunction = (data) => {
|
||||
export async function deployContract(pollObject, contractName, callbackFunction) {
|
||||
const contract = getContract(pollObject);
|
||||
|
||||
// Add an optional post condition
|
||||
// See below for details on constructing post conditions
|
||||
const postConditionAddress = Constants.STACKS_MAINNET_FLAG ? Constants.MAINNET_DONATION_ADDRESS : Constants.TESTNET_DONATION_ADDRESS;
|
||||
const postConditionCode = FungibleConditionCode.Equal;
|
||||
const postConditionAmount = 5000000n;
|
||||
const postConditions = [
|
||||
makeStandardSTXPostCondition(postConditionAddress, postConditionCode, postConditionAmount),
|
||||
];
|
||||
|
||||
// Transaction options
|
||||
const txOptions = {
|
||||
contractName: contractName,
|
||||
@@ -29,8 +20,6 @@ export async function deployContract(pollObject, contractName, callbackFunction)
|
||||
name: "Ballot",
|
||||
icon: window.location.origin + "/images/logo/ballot.png"
|
||||
},
|
||||
postConditions: postConditions,
|
||||
PostConditionMode: PostConditionMode.Allow,
|
||||
onFinish: callbackFunction,
|
||||
onCancel: cancelCallbackFunction
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user