Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MEX-437] no exit amount #1281

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/config/default.json
Original file line number Diff line number Diff line change
@@ -216,8 +216,8 @@
},
"v2": {
"enterFarm": {
"default": 15000000,
"withTokenMerge": 16500000
"default": 16500000,
"withTokenMerge": 18000000
},
"unlockedRewards": {
"exitFarm": {
7 changes: 6 additions & 1 deletion src/modules/farm/models/farm.args.ts
Original file line number Diff line number Diff line change
@@ -58,7 +58,12 @@ export class SftFarmInteractionArgs {
export class ExitFarmArgs extends SftFarmInteractionArgs {
@Field(() => Boolean, { nullable: true })
withPenalty = false;
@Field({ nullable: true })
@Field({
nullable: true,
deprecationReason:
'Exit farm no longer require this value;' +
'field is deprecated and will be removed on next release;',
})
exitAmount?: string;
}

4 changes: 2 additions & 2 deletions src/modules/farm/v2/services/farm.v2.transaction.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, BigUIntValue, TokenTransfer } from '@multiversx/sdk-core';
import { Address, TokenTransfer } from '@multiversx/sdk-core';
import { Injectable } from '@nestjs/common';
import BigNumber from 'bignumber.js';
import { mxConfig, gasConfig } from 'src/config';
@@ -86,7 +86,7 @@ export class FarmTransactionServiceV2 extends TransactionsFarmService {
);

return contract.methodsExplicit
.exitFarm([new BigUIntValue(new BigNumber(args.exitAmount))])
.exitFarm()
.withSingleESDTNFTTransfer(
TokenTransfer.metaEsdtFromBigInteger(
args.farmTokenID,