16 lines
692 B
JavaScript
16 lines
692 B
JavaScript
"use strict";
|
|
/**
|
|
* USD approximation for withdrawal limit checks (stablecoins 1:1).
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.rawAmountToUsdApprox = rawAmountToUsdApprox;
|
|
/** Converts raw on-chain units to approximate USD for limit enforcement. */
|
|
function rawAmountToUsdApprox(walletTypeCode, amountRaw, decimals) {
|
|
const human = Number(amountRaw) / 10 ** decimals;
|
|
const code = walletTypeCode.toUpperCase();
|
|
if (code.includes('USDT') || code.includes('USDC'))
|
|
return human;
|
|
// Platform is USDT-first; other assets treated 1:1 at human scale as conservative fallback.
|
|
return human;
|
|
}
|
|
//# sourceMappingURL=withdrawalLimits.js.map
|