@moonbeam-network/mrl 1.0.0-dev.265 → 1.0.0-dev.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +0 -1
- package/build/index.mjs +1 -34
- package/build/index.mjs.map +1 -1
- package/package.json +6 -6
package/build/index.d.ts
CHANGED
package/build/index.mjs
CHANGED
|
@@ -17276,12 +17276,6 @@ async function getSourceData({
|
|
|
17276
17276
|
route,
|
|
17277
17277
|
sourceAddress
|
|
17278
17278
|
});
|
|
17279
|
-
const bridgeChainFeeBalance = await getBridgeChainFeeBalance({
|
|
17280
|
-
balance,
|
|
17281
|
-
feeBalance,
|
|
17282
|
-
route,
|
|
17283
|
-
sourceAddress
|
|
17284
|
-
});
|
|
17285
17279
|
const existentialDeposit = await getExistentialDeposit(source);
|
|
17286
17280
|
const min = await getAssetMin({
|
|
17287
17281
|
asset,
|
|
@@ -17337,7 +17331,7 @@ async function getSourceData({
|
|
|
17337
17331
|
chain: source,
|
|
17338
17332
|
destinationFee,
|
|
17339
17333
|
destinationFeeBalance,
|
|
17340
|
-
bridgeChainFeeBalance,
|
|
17334
|
+
// bridgeChainFeeBalance,
|
|
17341
17335
|
existentialDeposit,
|
|
17342
17336
|
fee,
|
|
17343
17337
|
feeBalance,
|
|
@@ -17442,33 +17436,6 @@ async function getWormholeFee({
|
|
|
17442
17436
|
}
|
|
17443
17437
|
return;
|
|
17444
17438
|
}
|
|
17445
|
-
async function getBridgeChainFeeBalance({
|
|
17446
|
-
balance,
|
|
17447
|
-
feeBalance,
|
|
17448
|
-
route,
|
|
17449
|
-
sourceAddress
|
|
17450
|
-
}) {
|
|
17451
|
-
if (!route.source.bridgeChainFee) {
|
|
17452
|
-
return void 0;
|
|
17453
|
-
}
|
|
17454
|
-
if (route.mrl?.bridgeChain.fee.asset.isEqual(balance)) {
|
|
17455
|
-
return balance;
|
|
17456
|
-
}
|
|
17457
|
-
if (route.mrl?.bridgeChain.fee.asset.isEqual(feeBalance)) {
|
|
17458
|
-
return feeBalance;
|
|
17459
|
-
}
|
|
17460
|
-
if (!route.source.bridgeChainFee.balance) {
|
|
17461
|
-
throw new Error(
|
|
17462
|
-
"BalanceBuilder must be defined for source.bridgeChainFee.balance for MrlAssetRoute"
|
|
17463
|
-
);
|
|
17464
|
-
}
|
|
17465
|
-
return getBalance2({
|
|
17466
|
-
address: sourceAddress,
|
|
17467
|
-
asset: route.source.chain.getChainAsset(route.source.bridgeChainFee.asset),
|
|
17468
|
-
builder: route.source.bridgeChainFee.balance,
|
|
17469
|
-
chain: route.source.chain
|
|
17470
|
-
});
|
|
17471
|
-
}
|
|
17472
17439
|
async function getProtocolFee({
|
|
17473
17440
|
address,
|
|
17474
17441
|
asset,
|