Skip to content

Commit 857d335

Browse files
fix: revert Number() removal - TronWeb TypeScript requires number type
CodeRabbit was incorrect about sendTrx accepting strings. TronWeb's TypeScript definition requires number for amount parameter: sendTrx(to: string, amount?: number, from?: string) While implementation accepts strings internally, the type definition enforces number, causing TS2345 error. Kept the important fix: using args.from instead of vault for sender. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d1f14a2 commit 857d335

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/swapper/src/thorchain-utils/tron/getTronTransactionFees.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const getTronTransactionFees = async (
6767

6868
let tx = await tronWeb.transactionBuilder.sendTrx(
6969
vault,
70-
sellAmountIncludingProtocolFeesCryptoBaseUnit,
70+
Number(sellAmountIncludingProtocolFeesCryptoBaseUnit),
7171
from,
7272
)
7373

0 commit comments

Comments
 (0)