Skip to content

Commit b82bc1e

Browse files
committed
Refactor transactionBuilder to use BN for destination and reward amounts, improving numerical handling.
1 parent c2c9f66 commit b82bc1e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/blockchains/solana/src/transactionBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const userLockTransactionBuilder = async (params: UserLockParams): Promis
3838

3939
const hashlock = Buffer.from(params.hashlock.replace('0x', ''), 'hex')
4040
const bnAmount = toBaseUnits(params.amount, params.decimals)
41-
const bnDstAmount = toBaseUnits(params.destinationAmount, params.decimals)
42-
const bnRewardAmount = toBaseUnits(params.rewardAmount || '0', params.decimals)
41+
const bnDstAmount = new BN(params.destinationAmount)
42+
const bnRewardAmount = new BN(params.rewardAmount || '0')
4343
const bnTimelockDelta = new BN(params.timelockDelta || 0)
4444
const bnRewardTimelockDelta = new BN(params.rewardTimelockDelta || 0)
4545
const bnQuoteExpiry = new BN(params.quoteExpiry)

0 commit comments

Comments
 (0)