Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(registry) fix: Registry changes #83

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export const IpfsHashGenerationModal = ({
<span>
{/* TODO: fetch from middleware constant */}
<ul style={{ margin: 0 }}>
<li>{'ipfs://{IPFS_HASH}'}</li>
<li>https://gateway.autonolas.tech/ipfs/*</li>
<li>https://gateway.pinata.cloud/ipfs/*</li>
<li>https://*.arweave.net/</li>
Expand All @@ -236,7 +237,7 @@ export const IpfsHashGenerationModal = ({
</Flex>
}
>
<Input />
<Input placeholder="ipfs://" />
</Form.Item>
</Form>
</CustomModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const FinishedRegistration = ({
className="mt-8"
>
{options.map((multisigAddress) => (
<div className="mb-12" key={`mutisig-${multisigAddress}`}>
<div className="mb-12" key={`multisig-${multisigAddress}`}>
<RadioLabel disabled={btnProps.disabled}>
{multisigAddress === isMultiSig && OPTION_1}
{multisigAddress !== isMultiSig && OPTION_2}
Expand Down Expand Up @@ -377,6 +377,7 @@ export const FinishedRegistration = ({
console.error(error);
} finally {
setIsSubmitting(false);
notifyError('Error occurred while updating multisig. Please try again.');
}
}}
{...getOtherBtnProps(STEP, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { useEffect, useMemo, useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { Space, Table } from 'antd';
import PropTypes from 'prop-types';
import { Table, Space } from 'antd';
import { useEffect, useMemo, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';

import { AddressLink } from '@autonolas/frontend-library';

import { setAgentInstancesAndOperators } from '../../../../store/service';
import { useScreen } from 'common-util/hooks/useScreen';
import { useHelpers } from 'common-util/hooks/useHelpers';
import { SendTransactionButton } from 'common-util/TransactionHelpers/SendTransactionButton';
import { useHelpers } from 'common-util/hooks/useHelpers';
import { useScreen } from 'common-util/hooks/useScreen';

import { setAgentInstancesAndOperators } from '../../../../store/service';
import { useAgentInstanceAndOperator } from '../../hooks/useSvmService';
import { getAgentInstanceAndOperator } from '../utils';

Expand All @@ -24,9 +26,7 @@ export const Deployed = ({
const dispatch = useDispatch();
const { account, chainId, isSvm, chainName } = useHelpers();
const { isMobile } = useScreen();
const data = useSelector(
(state) => state?.service?.agentInstancesAndOperators,
);
const data = useSelector((state) => state?.service?.agentInstancesAndOperators);
const [isTerminating, setIsTerminating] = useState(false);
const { getSvmAgentInstanceAndOperator } = useAgentInstanceAndOperator();

Expand All @@ -47,14 +47,7 @@ export const Deployed = ({
return () => {
isMounted = false;
};
}, [
serviceId,
chainId,
isSvm,
currentStep,
dispatch,
getSvmAgentInstanceAndOperator,
]);
}, [serviceId, chainId, isSvm, currentStep, dispatch, getSvmAgentInstanceAndOperator]);

const onTerminate = async () => {
try {
Expand All @@ -78,7 +71,7 @@ export const Deployed = ({

return (
<div className="step-4-deployed" data-testid="step-deployed">
<Space direction="vertical" size={10}>
<Space direction="vertical" size={10} className="full-width">
{isShowAgentInstanceVisible && (
<Table
dataSource={data}
Expand All @@ -90,23 +83,22 @@ export const Deployed = ({
title: 'Agent Instances',
dataIndex: 'agentInstance',
key: 'agentInstance',
render: (text) => (
<AddressLink text={text} {...addressLinkProps} />
),
render: (text) => <AddressLink text={text} {...addressLinkProps} />,
width: '50%',
},
{
title: 'Operators',
dataIndex: 'operatorAddress',
key: 'operatorAddress',
render: (text) => (
<AddressLink text={text} {...addressLinkProps} />
),
render: (text) => <AddressLink text={text} {...addressLinkProps} />,
width: '50%',
},
]}
/>
)}
<div>
{`${isSvm ? 'Squads' : 'Safe'} contract address: ${multisig}`}
{`${isSvm ? 'Squads' : 'Safe'} contract address:`}
<AddressLink text={multisig} {...addressLinkProps} />
</div>
{getButton(
<SendTransactionButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ jest.mock('wagmi', () => ({
},
}));

jest.mock('libs/common-contract-functions/src', () => ({
useClaimableIncentives: jest.fn().mockReturnValue({
reward: '0.25',
topUp: '111,555.70',
}),
getPendingIncentives: jest.fn().mockResolvedValue({
reward: '0.5',
topUp: '100,800.25',
}),
}));

jest.mock('common-util/List/IpfsHashGenerationModal/helpers', () => ({
getIpfsHashHelper: jest.fn(() => mockV1Hash),
}));
Expand Down
5 changes: 5 additions & 0 deletions apps/tokenomics/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ const nextConfig = {
source: '/manage-solana-liquidity',
destination: 'https://bond.olas.network/manage-solana-liquidity',
permanent: true,
},
{
source: '/my-bonds',
destination: 'https://bond.olas.network/my-bonds',
permanent: true,
}
];
},
Expand Down
Loading