mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-19 05:35:51 +00:00
Merge pull request #11 from QuickMythril/testing-20240925
fix approval threshold dropdown and typo
This commit is contained in:
commit
6f2787a0d4
@ -4,7 +4,7 @@ import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
|||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import { MyContext, getArbitraryEndpointReact, getBaseApiReact, pauseAllQueues } from '../../App';
|
import { MyContext, getArbitraryEndpointReact, getBaseApiReact, pauseAllQueues } from '../../App';
|
||||||
import { getFee } from '../../background';
|
import { getFee } from '../../background';
|
||||||
import { decryptResource, getGroupAdimns, validateSecretKey } from '../Group/Group';
|
import { decryptResource, getGroupAdmins, validateSecretKey } from '../Group/Group';
|
||||||
import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
|
import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
|
||||||
import { uint8ArrayToObject } from '../../backgroundFunctions/encryption';
|
import { uint8ArrayToObject } from '../../backgroundFunctions/encryption';
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, sec
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const {names} = await getGroupAdimns(groupId);
|
const {names} = await getGroupAdmins(groupId);
|
||||||
if(!names.length){
|
if(!names.length){
|
||||||
throw new Error('Network error')
|
throw new Error('Network error')
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleChangeApprovalThreshold = (event: SelectChangeEvent) => {
|
const handleChangeApprovalThreshold = (event: SelectChangeEvent) => {
|
||||||
setGroupType(event.target.value as string);
|
setApprovalThreshold(event.target.value as string);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChangeMinBlock = (event: SelectChangeEvent) => {
|
const handleChangeMinBlock = (event: SelectChangeEvent) => {
|
||||||
|
@ -125,7 +125,7 @@ export const requestQueueAdminMemberNames = new RequestQueueWithPromise(5);
|
|||||||
|
|
||||||
const audio = new Audio(chrome.runtime?.getURL("msg-not1.wav"));
|
const audio = new Audio(chrome.runtime?.getURL("msg-not1.wav"));
|
||||||
|
|
||||||
export const getGroupAdimnsAddress = async (groupNumber: number) => {
|
export const getGroupAdminsAddress = async (groupNumber: number) => {
|
||||||
// const validApi = await findUsableApi();
|
// const validApi = await findUsableApi();
|
||||||
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
@ -271,7 +271,7 @@ export async function getNameInfo(address: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getGroupAdimns = async (groupNumber: number) => {
|
export const getGroupAdmins = async (groupNumber: number) => {
|
||||||
// const validApi = await findUsableApi();
|
// const validApi = await findUsableApi();
|
||||||
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
@ -725,7 +725,7 @@ export const Group = ({
|
|||||||
const prevGroupId = selectedGroupRef.current.groupId;
|
const prevGroupId = selectedGroupRef.current.groupId;
|
||||||
// const validApi = await findUsableApi();
|
// const validApi = await findUsableApi();
|
||||||
const { names, addresses, both } =
|
const { names, addresses, both } =
|
||||||
adminsFromStorage || (await getGroupAdimns(selectedGroup?.groupId));
|
adminsFromStorage || (await getGroupAdmins(selectedGroup?.groupId));
|
||||||
setAdmins(addresses);
|
setAdmins(addresses);
|
||||||
setAdminsWithNames(both);
|
setAdminsWithNames(both);
|
||||||
if (!names.length) {
|
if (!names.length) {
|
||||||
@ -911,7 +911,7 @@ export const Group = ({
|
|||||||
|
|
||||||
const getAdmins = async (groupId) => {
|
const getAdmins = async (groupId) => {
|
||||||
try {
|
try {
|
||||||
const res = await getGroupAdimnsAddress(groupId);
|
const res = await getGroupAdminsAddress(groupId);
|
||||||
setAdmins(res);
|
setAdmins(res);
|
||||||
const adminsWithNames = await getNamesForAdmins(res);
|
const adminsWithNames = await getNamesForAdmins(res);
|
||||||
setAdminsWithNames(adminsWithNames);
|
setAdminsWithNames(adminsWithNames);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user