add tokens bundle payments

This commit is contained in:
smanylov
2026-02-19 17:23:52 +07:00
parent 13128d282b
commit 048e1269ad
10 changed files with 316 additions and 47 deletions
+35
View File
@@ -106,6 +106,41 @@ export async function fetchTariffs() {
}
}
export async function fetchTokensBundle() {
try {
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
method: 'POST',
body: JSON.stringify({
version: 1,
msg_id: 30001,
message_body: {
action: 'tariffs_by_type',
type: 'token'
}
}),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
if (response.ok) {
const parsed = await response.json();
if (parsed?.message_code === 0) {
return parsed.message_body?.token_tariffs;
} else {
return null
}
} else {
return null
}
} catch (error) {
return null
}
}
export async function getBuildData() {
try {