feat: merchant specific fees, TRON & BTC support, coin logos, and bug fixes

This commit is contained in:
mstfyldz
2026-03-13 00:34:42 +03:00
parent b0c1055c13
commit 2d435a4ee8
17 changed files with 708 additions and 233 deletions

View File

@@ -23,6 +23,7 @@ export async function GET() {
// Fill defaults if empty
if (!settings.sol_platform_address) settings.sol_platform_address = process.env.SOL_PLATFORM_ADDRESS || '';
if (!settings.evm_platform_address) settings.evm_platform_address = process.env.EVM_PLATFORM_ADDRESS || '';
if (!settings.default_fee_percent) settings.default_fee_percent = '1.0';
return NextResponse.json(settings);
} catch (err: any) {
@@ -33,11 +34,12 @@ export async function GET() {
export async function POST(req: NextRequest) {
try {
const body = await req.json();
const { sol_platform_address, evm_platform_address } = body;
const { sol_platform_address, evm_platform_address, default_fee_percent } = body;
const queries = [
{ key: 'sol_platform_address', value: sol_platform_address },
{ key: 'evm_platform_address', value: evm_platform_address }
{ key: 'evm_platform_address', value: evm_platform_address },
{ key: 'default_fee_percent', value: default_fee_percent || '1.0' }
];
for (const q of queries) {