Skip to content

Commit

Permalink
Fix regression - passing the data field (MultiversX transactions).
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Aug 28, 2024
1 parent 9c71bcb commit 103a406
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions libs/coin-modules/coin-elrond/src/buildTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { INetworkConfig } from "@elrondnetwork/erdjs/out";
import { Account } from "@ledgerhq/types-live";
import { isAmountSpentFromBalance } from "./logic";
import type { ElrondProtocolTransaction, Transaction } from "./types";
import { getAccountNonce, getNetworkConfig } from "./api";
import { GAS_PRICE, HASH_TRANSACTION } from "./constants";
import { isAmountSpentFromBalance } from "./logic";
import type { ElrondProtocolTransaction, Transaction } from "./types";

/**
*
Expand Down Expand Up @@ -33,14 +33,11 @@ export const buildTransactionToSign = async (
sender: address,
gasPrice: GAS_PRICE,
gasLimit: transaction.gasLimit || networkConfig.MinGasLimit.valueOf(),
...(transaction.data ? { data: transaction.data } : {}),
chainID,
...HASH_TRANSACTION,
};

if (transaction.data) {
unsigned.data = transaction.data;
}

// Will likely be a call to Elrond SDK
return JSON.stringify(unsigned);
};

0 comments on commit 103a406

Please sign in to comment.