@moonbeam-network/mrl 4.1.3 → 4.1.4
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.mjs +4 -3
- package/build/index.mjs.map +1 -1
- package/package.json +4 -4
package/build/index.mjs
CHANGED
|
@@ -16869,10 +16869,8 @@ var SnowbridgeService = class _SnowbridgeService {
|
|
|
16869
16869
|
destinationAddress,
|
|
16870
16870
|
destinationParaId,
|
|
16871
16871
|
amount,
|
|
16872
|
-
|
|
16873
|
-
requiresApproval
|
|
16872
|
+
value
|
|
16874
16873
|
} = args;
|
|
16875
|
-
const value = requiresApproval ? bridgeFeeAmount : amount + bridgeFeeAmount;
|
|
16876
16874
|
const contractArgs = [
|
|
16877
16875
|
tokenAddress,
|
|
16878
16876
|
destinationParaId,
|
|
@@ -17267,6 +17265,9 @@ async function getBridgeChainGasLimit(params) {
|
|
|
17267
17265
|
return gasEstimation * 110n / 100n;
|
|
17268
17266
|
}
|
|
17269
17267
|
function getAmountForTransferSimulation(balance, protocolFee) {
|
|
17268
|
+
if (!balance.isSame(protocolFee)) {
|
|
17269
|
+
return balance;
|
|
17270
|
+
}
|
|
17270
17271
|
return balance.copyWith({
|
|
17271
17272
|
amount: balance.amount - protocolFee.amount > 0 ? balance.amount - protocolFee.amount : 0n
|
|
17272
17273
|
});
|