fix types

This commit is contained in:
jejolare 2025-06-22 17:28:41 +08:00
parent 292ffb3841
commit 4cbb1079ac
3 changed files with 7 additions and 4 deletions

View file

@ -205,7 +205,7 @@ const OuterConfirmation = () => {
<h5>Burn Amount</h5>
<p>{burnAmount}</p>
</div>
{nativeAmount ?? (
{typeof nativeAmount === "string" && (
<div className={styles.row}>
<h5>Native Amount</h5>
<p>{nativeAmount}</p>

View file

@ -540,7 +540,7 @@ export const burnAsset = async ({
};
if (nativeAmount) {
params.native_amount = nativeAmount;
params.native_amount = addZeros(nativeAmount, 12).toFixed(0);
}
if (pointTxToAddress) {
@ -551,6 +551,9 @@ export const burnAsset = async ({
params.service_entries = serviceEntries;
}
console.log("BURN PARAMS:", params);
const response = await fetchData("burn_asset", params);
if (!response.ok) {

View file

@ -82,9 +82,9 @@ export interface BurnAssetRequest {
export interface BurnAssetDataType {
assetId: string;
burnAmount: number;
burnAmount: string;
decimalPoint?: number;
nativeAmount?: number;
nativeAmount?: string;
pointTxToAddress?: string;
serviceEntries?: {
service_id: string;