Skip to content

Commit

Permalink
make decimal for deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Aug 8, 2024
1 parent ebe44d8 commit 5d37fe3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/register/lnv2_default.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function register(options) {
const approveTargetChain = BigInt(register.approve) * (10n ** targetTokenDecimal);
const baseFee = tool.floatToBigInt(register.baseFee, sourceTokenDecimal);
const liquidityFeeRate = Number(register.liquidityFeeRate) * (10 ** 3);
const deposit = BigInt(register.deposit) * (10n ** targetTokenDecimal);
const deposit = tool.floatToBigInt(register.deposit, targetTokenDecimal);

const bridgeInfoRecord = await tool.queryBridgeInfoRecord({
definition: options.definition,
Expand Down
2 changes: 1 addition & 1 deletion src/register/lnv2_opposite.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function register(options) {
const approve = BigInt(register.approve) * (10n ** sourceTokenDecimal);
const baseFee = tool.floatToBigInt(register.baseFee, sourceTokenDecimal);
const liquidityFeeRate = Number(register.liquidityFeeRate) * (10 ** 3);
const deposit = BigInt(register.deposit) * (10n ** sourceTokenDecimal);
const deposit = tool.floatToBigInt(register.deposit, sourceTokenDecimal);

const bridgeInfoRecord = await tool.queryBridgeInfoRecord({
definition: options.definition,
Expand Down
2 changes: 1 addition & 1 deletion src/register/lnv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function register(options) {
const liquidityFeeRate = Number(register.liquidityFeeRate) * (10 ** 3);
const transferLimit = tool.floatToBigInt(register.transferLimit, sourceTokenDecimal);
const approve = BigInt(register.approve) * (10n ** sourceTokenDecimal);
const deposit = BigInt(register.deposit) * (10n ** sourceTokenDecimal);
const deposit = tool.floatToBigInt(register.deposit, sourceTokenDecimal);

const encodedParamForPenaltyReserves = lifecycle.sourceToken.address.toLowerCase()
+ (lifecycle.relayerAddress.toLowerCase().replace('0x', ''));
Expand Down

0 comments on commit 5d37fe3

Please sign in to comment.