Skip to content

Commit

Permalink
Use redeem amount, not tunav1 amount
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Aug 26, 2024
1 parent 99842c0 commit fb838c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/routes/hardfork/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
plutus.SimplerforkFork._datum,
);
const currentLockedTuna = lockDatum.currentLockedTuna + $v1TunaAmount;
const currentLockedTuna = lockDatum.currentLockedTuna + amountToRedeemNat;
const outputLockDatum = Data.to(
{
blockHeight: lockDatum.blockHeight,
Expand All @@ -106,17 +106,17 @@
.newTransaction()
.addReferenceInput(refOutputs[0])
.addReferenceInput(refOutputs[1])
.addMint(
AssetId.getPolicyId(tunaV2AssetId),
new Map([[AssetId.getAssetName(tunaV2AssetId), $v1TunaAmount]]),
tunaV2Redeem,
)
.addInput(lockUtxo, lockRedeemer)
.lockAssets(
forkValidatorAddress,
makeValue(0n, [lockStateAssetId, 1n], [tunaV1AssetId, currentLockedTuna]),
outputLockDatum,
)
.addMint(
AssetId.getPolicyId(tunaV2AssetId),
new Map([[AssetId.getAssetName(tunaV2AssetId), amountToRedeemNat]]),
tunaV2Redeem,
)
.addWithdrawal(rewardAccount, 0n, hardforkRedeem)
.complete();
Expand Down

0 comments on commit fb838c4

Please sign in to comment.