mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-08 09:26:59 +00:00
Add transaltions
This commit is contained in:
parent
a89de90ee0
commit
421996b572
@ -11,6 +11,8 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"error": {
|
"error": {
|
||||||
"add_to_list": "failed to add to list",
|
"add_to_list": "failed to add to list",
|
||||||
|
"at_info": "cannot find AT info.",
|
||||||
|
"buy_order": "failed to submit trade order",
|
||||||
"cancel_sell_order": "failed to Cancel Sell Order. Try again!",
|
"cancel_sell_order": "failed to Cancel Sell Order. Try again!",
|
||||||
"copy_clipboard": "failed to copy to clipboard",
|
"copy_clipboard": "failed to copy to clipboard",
|
||||||
"create_sell_order": "failed to Create Sell Order. Try again!",
|
"create_sell_order": "failed to Create Sell Order. Try again!",
|
||||||
@ -20,13 +22,14 @@
|
|||||||
"encrypt": "unable to encrypt",
|
"encrypt": "unable to encrypt",
|
||||||
"encryption_failed": "encryption failed",
|
"encryption_failed": "encryption failed",
|
||||||
"encryption_requires_public_key": "encrypting data requires public keys",
|
"encryption_requires_public_key": "encrypting data requires public keys",
|
||||||
"fetch_balance": "unable to fetch balance",
|
|
||||||
"fetch_balance_token": "failed to fetch {{ token }} Balance. Try again!",
|
"fetch_balance_token": "failed to fetch {{ token }} Balance. Try again!",
|
||||||
|
"fetch_balance": "unable to fetch balance",
|
||||||
"fetch_generic": "unable to fetch",
|
"fetch_generic": "unable to fetch",
|
||||||
"fetch_group": "failed to fetch the group",
|
"fetch_group": "failed to fetch the group",
|
||||||
"fetch_list": "failed to fetch the list",
|
"fetch_list": "failed to fetch the list",
|
||||||
"fetch_poll": "failed to fetch poll",
|
"fetch_poll": "failed to fetch poll",
|
||||||
"fetch_recipient_public_key": "failed to fetch recipient's public key",
|
"fetch_recipient_public_key": "failed to fetch recipient's public key",
|
||||||
|
"get_foreign_fee": "error in get foreign fee",
|
||||||
"insufficient_balance_qort": "your QORT balance is insufficient",
|
"insufficient_balance_qort": "your QORT balance is insufficient",
|
||||||
"insufficient_balance": "your asset balance is insufficient",
|
"insufficient_balance": "your asset balance is insufficient",
|
||||||
"insufficient_funds": "insufficient funds",
|
"insufficient_funds": "insufficient funds",
|
||||||
@ -51,8 +54,8 @@
|
|||||||
"send": "failed to send",
|
"send": "failed to send",
|
||||||
"submit_sell_order": "failed to submit sell order",
|
"submit_sell_order": "failed to submit sell order",
|
||||||
"timeout_request": "request timed out",
|
"timeout_request": "request timed out",
|
||||||
"get_foreign_fee": "error in get foreign fee",
|
|
||||||
"update_foreign_fee": "failed to update foreign fee",
|
"update_foreign_fee": "failed to update foreign fee",
|
||||||
|
"update_tradebot": "unable to update tradebot",
|
||||||
"upload_encryption": "upload failed due to failed encryption",
|
"upload_encryption": "upload failed due to failed encryption",
|
||||||
"user_qortal_name": "user has no Qortal name"
|
"user_qortal_name": "user has no Qortal name"
|
||||||
},
|
},
|
||||||
@ -92,6 +95,8 @@
|
|||||||
"permission_pay_publish": "do you give this application permission to make the following payments and publishes?",
|
"permission_pay_publish": "do you give this application permission to make the following payments and publishes?",
|
||||||
"permission_publish_qdn": "do you give this application permission to publish to QDN?",
|
"permission_publish_qdn": "do you give this application permission to publish to QDN?",
|
||||||
"permission_remove_from_list": "do you give this application permission to remove the following from the list {{ name }}:",
|
"permission_remove_from_list": "do you give this application permission to remove the following from the list {{ name }}:",
|
||||||
|
"permission_sell_order": "do you give this application permission to perform a sell order?",
|
||||||
|
"permission_sell_order_detail": "{{ qort_amount }} QORT for {{ foreign_amount }} {{ ticker }}",
|
||||||
"permission_send_coins": "do you give this application permission to send coins?",
|
"permission_send_coins": "do you give this application permission to send coins?",
|
||||||
"permission_transfer_asset": "do you give this application permission to transfer the following asset?",
|
"permission_transfer_asset": "do you give this application permission to transfer the following asset?",
|
||||||
"poll": "poll: {{ name }}",
|
"poll": "poll: {{ name }}",
|
||||||
|
@ -4335,7 +4335,12 @@ export const createBuyOrder = async (data, isFromExtension) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(error?.message || 'Failed to submit trade order.');
|
throw new Error(
|
||||||
|
error?.message ||
|
||||||
|
i18n.t('question:message.error.buy_order', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4352,7 +4357,14 @@ const cancelTradeOfferTradeBot = async (body, keyPair) => {
|
|||||||
body: bodyToString,
|
body: bodyToString,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!deleteTradeBotResponse.ok) throw new Error('Unable to update tradebot');
|
if (!deleteTradeBotResponse.ok) {
|
||||||
|
throw new Error(
|
||||||
|
i18n.t('question:message.error.update_tradebot', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const unsignedTxn = await deleteTradeBotResponse.text();
|
const unsignedTxn = await deleteTradeBotResponse.text();
|
||||||
const signedTxnBytes = await signTradeBotTransaction(unsignedTxn, keyPair);
|
const signedTxnBytes = await signTradeBotTransaction(unsignedTxn, keyPair);
|
||||||
const signedBytes = Base58.encode(signedTxnBytes);
|
const signedBytes = Base58.encode(signedTxnBytes);
|
||||||
@ -4505,11 +4517,15 @@ export const createSellOrder = async (data, isFromExtension) => {
|
|||||||
try {
|
try {
|
||||||
const resPermission = await getUserPermission(
|
const resPermission = await getUserPermission(
|
||||||
{
|
{
|
||||||
text1:
|
text1: i18n.t('question:permission_sell_order', {
|
||||||
'Do you give this application permission to perform a sell order?',
|
postProcess: 'capitalizeFirstChar',
|
||||||
text2: `${data.qortAmount}${' '}
|
}),
|
||||||
${`QORT`}`,
|
text2: i18n.t('question:permission_sell_order_detail', {
|
||||||
text3: `FOR ${parsedForeignAmount} ${data.foreignBlockchain}`,
|
qort_amount: data.qortAmount,
|
||||||
|
foreign_amount: parsedForeignAmount,
|
||||||
|
ticker: data.foreignBlockchain,
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
fee: '0.02',
|
fee: '0.02',
|
||||||
},
|
},
|
||||||
isFromExtension
|
isFromExtension
|
||||||
@ -4559,6 +4575,7 @@ export const createSellOrder = async (data, isFromExtension) => {
|
|||||||
export const cancelSellOrder = async (data, isFromExtension) => {
|
export const cancelSellOrder = async (data, isFromExtension) => {
|
||||||
const requiredFields = ['atAddress'];
|
const requiredFields = ['atAddress'];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
|
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
if (!data[field]) {
|
if (!data[field]) {
|
||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
@ -4576,7 +4593,14 @@ export const cancelSellOrder = async (data, isFromExtension) => {
|
|||||||
const url = await createEndpoint(`/crosschain/trade/${data.atAddress}`);
|
const url = await createEndpoint(`/crosschain/trade/${data.atAddress}`);
|
||||||
const resAddress = await fetch(url);
|
const resAddress = await fetch(url);
|
||||||
const resData = await resAddress.json();
|
const resData = await resAddress.json();
|
||||||
if (!resData?.qortalAtAddress) throw new Error('Cannot find AT info.');
|
|
||||||
|
if (!resData?.qortalAtAddress)
|
||||||
|
throw new Error(
|
||||||
|
i18n.t('question:message.error.at_info', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const fee = await getFee('MESSAGE');
|
const fee = await getFee('MESSAGE');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user