mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
fixes
This commit is contained in:
parent
eb822cbcb4
commit
2e55c16f41
@ -2391,13 +2391,7 @@ export async function buyName({
|
|||||||
privateKey: uint8PrivateKey,
|
privateKey: uint8PrivateKey,
|
||||||
publicKey: uint8PublicKey,
|
publicKey: uint8PublicKey,
|
||||||
};
|
};
|
||||||
console.log('tester', {
|
|
||||||
fee: feeres.fee,
|
|
||||||
name,
|
|
||||||
sellPrice,
|
|
||||||
recipient: sellerAddress,
|
|
||||||
lastReference: lastReference,
|
|
||||||
})
|
|
||||||
const tx = await createTransaction(7, keyPair, {
|
const tx = await createTransaction(7, keyPair, {
|
||||||
fee: feeres.fee,
|
fee: feeres.fee,
|
||||||
name,
|
name,
|
||||||
|
@ -4105,6 +4105,12 @@ export const registerNameRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const fee = await getFee("REGISTER_NAME");
|
const fee = await getFee("REGISTER_NAME");
|
||||||
const resPermission = await getUserPermission(
|
const resPermission = await getUserPermission(
|
||||||
{
|
{
|
||||||
@ -4118,7 +4124,7 @@ export const registerNameRequest = async (data, isFromExtension) => {
|
|||||||
const { accepted } = resPermission;
|
const { accepted } = resPermission;
|
||||||
if (accepted) {
|
if (accepted) {
|
||||||
const name = data.name
|
const name = data.name
|
||||||
const description = data?.description
|
const description = data?.description || ""
|
||||||
const response = await registerName({ name, description });
|
const response = await registerName({ name, description });
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@ -4135,9 +4141,14 @@ export const updateNameRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const oldName = data.oldName
|
const oldName = data.oldName
|
||||||
const newName = data.newName
|
const newName = data.newName
|
||||||
const description = data?.description
|
const description = data?.description || ""
|
||||||
const fee = await getFee("UPDATE_NAME");
|
const fee = await getFee("UPDATE_NAME");
|
||||||
const resPermission = await getUserPermission(
|
const resPermission = await getUserPermission(
|
||||||
{
|
{
|
||||||
@ -4166,6 +4177,11 @@ export const leaveGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
let groupInfo = null;
|
let groupInfo = null;
|
||||||
try {
|
try {
|
||||||
@ -4206,6 +4222,11 @@ export const inviteToGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.inviteeAddress
|
const qortalAddress = data?.inviteeAddress
|
||||||
const inviteTime = data?.inviteTime
|
const inviteTime = data?.inviteTime
|
||||||
@ -4255,6 +4276,11 @@ export const kickFromGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
const reason = data?.reason
|
const reason = data?.reason
|
||||||
@ -4304,6 +4330,11 @@ export const banFromGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
const rBanTime = data?.banTime
|
const rBanTime = data?.banTime
|
||||||
@ -4354,6 +4385,11 @@ export const cancelGroupBanRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
|
|
||||||
@ -4401,6 +4437,11 @@ export const addGroupAdminRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
|
|
||||||
@ -4448,6 +4489,11 @@ export const removeGroupAdminRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
|
|
||||||
@ -4495,6 +4541,11 @@ export const cancelGroupInviteRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = data.groupId
|
const groupId = data.groupId
|
||||||
const qortalAddress = data?.qortalAddress
|
const qortalAddress = data?.qortalAddress
|
||||||
|
|
||||||
@ -4543,6 +4594,11 @@ export const createGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupName = data.groupName
|
const groupName = data.groupName
|
||||||
const description = data?.description || ""
|
const description = data?.description || ""
|
||||||
const type = +data.type
|
const type = +data.type
|
||||||
@ -4585,6 +4641,11 @@ export const updateGroupRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const groupId = +data.groupId
|
const groupId = +data.groupId
|
||||||
const newOwner = data.newOwner
|
const newOwner = data.newOwner
|
||||||
const description = data?.description || ""
|
const description = data?.description || ""
|
||||||
@ -4644,6 +4705,8 @@ export const decryptAESGCMRequest = async (data, isFromExtension) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const encryptedData = data.encryptedData;
|
const encryptedData = data.encryptedData;
|
||||||
const iv = data.iv;
|
const iv = data.iv;
|
||||||
const senderPublicKeyBase58 = data.senderPublicKey;
|
const senderPublicKeyBase58 = data.senderPublicKey;
|
||||||
@ -4700,6 +4763,11 @@ export const sellNameRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const name = data.nameForSale
|
const name = data.nameForSale
|
||||||
const sellPrice = +data.salePrice
|
const sellPrice = +data.salePrice
|
||||||
|
|
||||||
@ -4740,6 +4808,11 @@ export const cancelSellNameRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const name = data.nameForSale
|
const name = data.nameForSale
|
||||||
const validApi = await getBaseApi();
|
const validApi = await getBaseApi();
|
||||||
|
|
||||||
@ -4776,6 +4849,11 @@ export const buyNameRequest = async (data, isFromExtension) => {
|
|||||||
missingFields.push(field);
|
missingFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (missingFields.length > 0) {
|
||||||
|
const missingFieldsString = missingFields.join(", ");
|
||||||
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
|
throw new Error(errorMsg);
|
||||||
|
}
|
||||||
const name = data.nameForSale
|
const name = data.nameForSale
|
||||||
|
|
||||||
const validApi = await getBaseApi();
|
const validApi = await getBaseApi();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user