Skip to content

Commit

Permalink
fix token transfer price (#1288)
Browse files Browse the repository at this point in the history
* remove noce for FungibleTokens

* apply valueUsd and valueEGLD for tokens

* check if nonce !=-="0"

---------

Co-authored-by: tanghel <[email protected]>
  • Loading branch information
cfaur09 and tanghel authored Jul 2, 2024
1 parent 0f8e727 commit d8a90d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/endpoints/tokens/token.transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { IndexerService } from "src/common/indexer/indexer.service";
import { TokenAccount } from "src/common/indexer/entities";
import { DataApiService } from "src/common/data-api/data-api.service";
import BigNumber from "bignumber.js";
import { EsdtType } from "../esdt/entities/esdt.type";

@Injectable()
export class TokenTransferService {
Expand Down Expand Up @@ -326,7 +327,7 @@ export class TokenTransferService {
// we clone it since we alter the resulting object
properties = JSON.parse(JSON.stringify(properties));

if (properties && options.nonce) {
if (properties && properties.type !== EsdtType.FungibleESDT && options.nonce) {
properties.identifier = `${options.identifier}-${options.nonce}`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class TransactionActionService {
const nonce = args[index++];
const value = this.parseValueFromMultiTransferValueArg(args[index++]);

if (nonce) {
if (nonce && nonce !== "00") {
const properties = await this.tokenTransferService.getTokenTransferProperties({ identifier, nonce });
if (properties) {
result.transfers.push({
Expand Down

0 comments on commit d8a90d9

Please sign in to comment.