Skip to content

Commit

Permalink
Fee limit increased to 100 TRX, "Sending TRC20 to a new account won't…
Browse files Browse the repository at this point in the history
… activate it" removed
  • Loading branch information
btclinux committed Dec 7, 2022
1 parent 877ec67 commit 35b9b98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion libs/ledger-live-common/src/api/Tron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const createTronTransaction = async (
if (tokenType === "trc20" && tokenId) {
const txData: SmartContractTransactionData = {
function_selector: "transfer(address,uint256)",
fee_limit: 10000000,
fee_limit: 100000000,
call_value: 0,
contract_address: decode58Check(tokenId),
parameter: abiEncodeTrc20Transfer(decode58Check(t.recipient), t.amount),
Expand Down
24 changes: 0 additions & 24 deletions libs/ledger-live-common/src/families/tron/bridge/js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
TronInvalidFreezeAmount,
TronRewardNotAvailable,
TronNoReward,
TronSendTrc20ToNewAccountForbidden,
TronUnexpectedFees,
TronNotEnoughTronPower,
TronNotEnoughEnergy,
Expand Down Expand Up @@ -121,19 +120,6 @@ const signOperation = ({
? balance
: transaction.amount;

// send trc20 to a new account is forbidden by us (because it will not activate the account)
if (
transaction.recipient &&
transaction.mode === "send" &&
subAccount &&
subAccount.type === "TokenAccount" &&
subAccount.token.tokenType === "trc20" &&
!isContractAddressRecipient && // send trc20 to a smart contract is allowed
(await fetchTronAccount(transaction.recipient)).length === 0
) {
throw new TronSendTrc20ToNewAccountForbidden();
}

const getPreparedTransaction = () => {
switch (transaction.mode) {
case "freeze":
Expand Down Expand Up @@ -637,16 +623,6 @@ const getTransactionStatus = async (
errors.recipient = new InvalidAddress(undefined, {
currencyName: a.currency.name,
});
} else if (
recipient &&
mode === "send" &&
account.type === "TokenAccount" &&
account.token.tokenType === "trc20" &&
!isContractAddressRecipient && // send trc20 to a smart contract is allowed
(await fetchTronAccount(recipient)).length === 0
) {
// send trc20 to a new account is forbidden by us (because it will not activate the account)
errors.recipient = new TronSendTrc20ToNewAccountForbidden();
}
}

Expand Down

0 comments on commit 35b9b98

Please sign in to comment.