@streamflow/distributor 13.2.1-alpha.p371.2d28b7a → 13.3.0
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/dist/cjs/index.cjs +3 -5
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/index.cjs +3 -5
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +0 -3
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +0 -3
- package/dist/esm/solana/index.js +3 -5
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -5595,8 +5595,7 @@ function calculateDynamicFeeFromSolParams(params) {
|
|
|
5595
5595
|
return raw;
|
|
5596
5596
|
}
|
|
5597
5597
|
async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
5598
|
-
const { distributorAddress, mintAccount, claimableAmount, cluster, apiUrl, apiKey
|
|
5599
|
-
const maxFeeBigint = claimMaxFeeLamports !== void 0 ? BigInt(claimMaxFeeLamports) : void 0;
|
|
5598
|
+
const { distributorAddress, mintAccount, claimableAmount, cluster, apiUrl, apiKey } = params;
|
|
5600
5599
|
let apiFeesResponse = void 0;
|
|
5601
5600
|
try {
|
|
5602
5601
|
apiFeesResponse = await fetchAirdropFee(distributorAddress, apiUrl, apiKey);
|
|
@@ -5617,7 +5616,7 @@ async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
|
5617
5616
|
}
|
|
5618
5617
|
const claimFeeDynamic = response?.claimFeeDynamic ?? defaultAPIFeesResponse.claimFeeDynamic;
|
|
5619
5618
|
if (!tokenPrice?.value || !solPrice?.value) {
|
|
5620
|
-
return
|
|
5619
|
+
return MINIMUM_FEE_FALLBACK;
|
|
5621
5620
|
}
|
|
5622
5621
|
const baseLamports = calculateClaimableLamportsFromPrices({
|
|
5623
5622
|
claimableAmount,
|
|
@@ -5625,10 +5624,9 @@ async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
|
5625
5624
|
solPriceUsd: solPrice.value,
|
|
5626
5625
|
tokenDecimals: mintAccount.decimals
|
|
5627
5626
|
});
|
|
5628
|
-
const maxPriceOverride = maxFeeBigint !== void 0 ? lamportsToSolString(maxFeeBigint) : claimFeeDynamic.maxPrice;
|
|
5629
5627
|
return calculateDynamicFeeFromSolParams({
|
|
5630
5628
|
minPrice: claimFeeDynamic.minPrice,
|
|
5631
|
-
maxPrice:
|
|
5629
|
+
maxPrice: claimFeeDynamic.maxPrice,
|
|
5632
5630
|
allocationFactor: claimFeeDynamic.allocationFactor,
|
|
5633
5631
|
claimableLamports: baseLamports
|
|
5634
5632
|
});
|