@moonbeam-network/xcm-builder 4.4.2 → 4.4.3
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 +1 -0
- package/build/index.mjs +4 -1
- package/build/index.mjs.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
package/build/index.mjs
CHANGED
|
@@ -4741,6 +4741,8 @@ function callSendToken(asset, protocolFee, destination, destinationAddress, requ
|
|
|
4741
4741
|
"Destination must be a Parachain or EvmParachain for sending token with Gateway module"
|
|
4742
4742
|
);
|
|
4743
4743
|
}
|
|
4744
|
+
const isDifferentAsset = !asset.isSame(protocolFee);
|
|
4745
|
+
const value = requiresApproval || isDifferentAsset ? protocolFee.amount : asset.amount + protocolFee.amount;
|
|
4744
4746
|
return new SnowbridgeConfig({
|
|
4745
4747
|
args: {
|
|
4746
4748
|
tokenAddress: asset.address,
|
|
@@ -4748,7 +4750,8 @@ function callSendToken(asset, protocolFee, destination, destinationAddress, requ
|
|
|
4748
4750
|
destinationParaId: destination.parachainId,
|
|
4749
4751
|
amount: asset.amount,
|
|
4750
4752
|
bridgeFeeAmount: protocolFee.amount,
|
|
4751
|
-
requiresApproval
|
|
4753
|
+
requiresApproval,
|
|
4754
|
+
value
|
|
4752
4755
|
},
|
|
4753
4756
|
func: "sendToken"
|
|
4754
4757
|
});
|