UNPKG

rubic-sdk-next

Version:
15 lines 447 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSolanaFee = getSolanaFee; const DEFAULT_FEE_PERCENT = 0.02; function getSolanaFee(from) { if (!from.price) { return DEFAULT_FEE_PERCENT; } const usdTokenAmount = from.tokenAmount.multipliedBy(from.price); if (usdTokenAmount.gt(100)) { return DEFAULT_FEE_PERCENT; } return 0; } //# sourceMappingURL=get-solana-fee.js.map