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

Merging staging into main for rc120 full release #302

Merged
merged 45 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1d32bb9
refactor: seperate the funding section component from the main page s…
truemiller Aug 21, 2024
c585d59
feat: add funding section to beta contract section
truemiller Aug 21, 2024
88858e4
Merge remote-tracking branch 'origin/staging' into fix/onchain_update…
jmoreira-valory Aug 22, 2024
da76908
fix: Add subgraph check of agent ID
jmoreira-valory Aug 22, 2024
6ccf856
chore: linters (black)
jmoreira-valory Aug 22, 2024
bcd3a13
fix: linters
jmoreira-valory Aug 22, 2024
5147777
fix: linters
jmoreira-valory Aug 22, 2024
1efa08b
chore: linters
jmoreira-valory Aug 22, 2024
9a9906b
chore: linters
jmoreira-valory Aug 22, 2024
0610fce
chore: linters
jmoreira-valory Aug 22, 2024
092e655
chore: ignore missing import for `eth_utils`
0xArdi Aug 22, 2024
5319963
Merge remote-tracking branch 'origin/HEAD' into fix/onchain_update_flow
jmoreira-valory Aug 27, 2024
6c3cb7c
chore: fix fund before swap transaction
jmoreira-valory Aug 28, 2024
75a9ccf
fix: required staking balance calculations
truemiller Aug 28, 2024
2011417
refactor: update copy as per figma
truemiller Aug 28, 2024
2894478
refactor: ensure not undefined earlier
truemiller Aug 28, 2024
2c58a21
chore: minor fixes
jmoreira-valory Aug 28, 2024
9317ea3
fix: linters
jmoreira-valory Aug 28, 2024
ce45d60
chore: minor fix
jmoreira-valory Aug 28, 2024
31ac520
Merge pull request #297 from valory-xyz/fix/olas-requirement-switch-c…
truemiller Aug 28, 2024
de10e16
Merge branch 'staging' into feat/add-funding-section-to-staking-manage
truemiller Aug 28, 2024
5d75760
Merge remote-tracking branch 'origin/staging' into feat/add-funding-s…
truemiller Aug 28, 2024
e6d7af9
refactor: remove reassignment
truemiller Aug 28, 2024
b3d4356
refactor: remove fragment
truemiller Aug 28, 2024
6286fd0
Merge pull request #287 from valory-xyz/feat/add-funding-section-to-s…
truemiller Aug 28, 2024
33c1551
fix: linters
jmoreira-valory Aug 28, 2024
64afe2e
Merge commit '6286fd024cc4e09e08e90a5a124349a98bde625b' into fix/onch…
jmoreira-valory Aug 28, 2024
64cdcaf
chore: gitleaksignore
jmoreira-valory Aug 28, 2024
c75686b
chore: gitleaks
jmoreira-valory Aug 28, 2024
8b7fa59
chore: gitleaks
jmoreira-valory Aug 28, 2024
8d28ba5
Merge pull request #234 from valory-xyz/fix/onchain_update_flow
truemiller Aug 28, 2024
f6439a5
bump: rc118
truemiller Aug 28, 2024
1aba5f9
fix: rename instead of delete invalid services
jmoreira-valory Aug 28, 2024
a153a4b
fix: linters
jmoreira-valory Aug 28, 2024
8207a61
Merge pull request #298 from valory-xyz/fix/rename_invalid_services
truemiller Aug 28, 2024
d5a2a0e
Merge branch 'staging' into fix/rename_invalid_services
jmoreira-valory Aug 29, 2024
ee45b0f
refactor: remove iteration as it's too volatile, error prone
truemiller Aug 29, 2024
65f98d9
refactor: only show migrate button on beta, or future contracts
truemiller Aug 29, 2024
267bb70
chore: add timestamp to renamed folder
jmoreira-valory Aug 29, 2024
27a552b
chore: remove redundant comments
truemiller Aug 29, 2024
2711e16
Merge pull request #300 from valory-xyz/fix/rename_invalid_services
jmoreira-valory Aug 29, 2024
46bb477
Merge pull request #299 from valory-xyz/fix/remove-alpha-migrate-button
truemiller Aug 29, 2024
6f16c71
bump: rc120
truemiller Aug 29, 2024
fe6cf4a
bump install.js to rc121
truemiller Aug 29, 2024
f04521d
fix: rollback install.js from 120, as it will conflict with Windows r…
truemiller Aug 29, 2024
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
5 changes: 4 additions & 1 deletion .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ d8149e9b5b7bd6a7ed7bc1039900702f1d4f287b:operate/services/manage.py:generic-api-
99c0f139b037da2587708212fcf6d0e20786d0ba:operate/services/manage.py:generic-api-key:455
91ec07457f69e9a29f63693ac8ef887e4b5f49f0:operate/services/manage.py:generic-api-key:454
410bea2bd02ff54da69387fe8f3b58793e09f7b0:operate/services/manage.py:generic-api-key:421
410bea2bd02ff54da69387fe8f3b58793e09f7b0:operate/services/manage.py:generic-api-key:422
410bea2bd02ff54da69387fe8f3b58793e09f7b0:operate/services/manage.py:generic-api-key:422
467e8e64f51fb3659e5af17ba53ab587ec24fc30:operate/services/manage.py:generic-api-key:290
64afe2ea92daafa2515c054f0e09931622d99f31:operate/services/manage.py:generic-api-key:290
64afe2ea92daafa2515c054f0e09931622d99f31:operate/services/manage.py:generic-api-key:289
2 changes: 1 addition & 1 deletion electron/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { paths } = require('./constants');
* - use "" (nothing as a suffix) for latest release candidate, for example "0.1.0rc26"
* - use "alpha" for alpha release, for example "0.1.0rc26-alpha"
*/
const OlasMiddlewareVersion = '0.1.0rc117';
const OlasMiddlewareVersion = '0.1.0rc120';

const path = require('path');
const { app } = require('electron');
Expand Down
59 changes: 30 additions & 29 deletions frontend/components/MainPage/sections/AddFundsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import styled from 'styled-components';
import { UNICODE_SYMBOLS } from '@/constants/symbols';
import { COW_SWAP_GNOSIS_XDAI_OLAS_URL } from '@/constants/urls';
import { useWallet } from '@/hooks/useWallet';
import { Address } from '@/types/Address';
import { copyToClipboard } from '@/utils/copyToClipboard';
import { truncateAddress } from '@/utils/truncate';

Expand All @@ -35,23 +34,6 @@ const CustomizedCardSection = styled(CardSection)<{ border?: boolean }>`

export const AddFundsSection = () => {
const [isAddFundsVisible, setIsAddFundsVisible] = useState(false);
const { masterSafeAddress } = useWallet();

const fundingAddress: Address | undefined = masterSafeAddress;

const truncatedFundingAddress: string | undefined = useMemo(
() => fundingAddress && truncateAddress(fundingAddress),
[fundingAddress],
);

const handleCopyAddress = useCallback(
() =>
fundingAddress &&
copyToClipboard(fundingAddress).then(() =>
message.success('Copied successfully!'),
),
[fundingAddress],
);

return (
<>
Expand All @@ -75,17 +57,36 @@ export const AddFundsSection = () => {
</Popover>
</CustomizedCardSection>

{isAddFundsVisible && (
<>
<AddFundsWarningAlertSection />
<AddFundsAddressSection
truncatedFundingAddress={truncatedFundingAddress}
fundingAddress={fundingAddress}
handleCopy={handleCopyAddress}
/>
<AddFundsGetTokensSection />
</>
)}
{isAddFundsVisible && <OpenAddFundsSection />}
</>
);
};

export const OpenAddFundsSection = () => {
const { masterSafeAddress } = useWallet();

const truncatedFundingAddress: string | undefined = useMemo(
() => masterSafeAddress && truncateAddress(masterSafeAddress),
[masterSafeAddress],
);

const handleCopyAddress = useCallback(
() =>
masterSafeAddress &&
copyToClipboard(masterSafeAddress).then(() =>
message.success('Copied successfully!'),
),
[masterSafeAddress],
);
return (
<>
<AddFundsWarningAlertSection />
<AddFundsAddressSection
truncatedFundingAddress={truncatedFundingAddress}
fundingAddress={masterSafeAddress}
handleCopy={handleCopyAddress}
/>
<AddFundsGetTokensSection />
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,35 @@ import { UNICODE_SYMBOLS } from '@/constants/symbols';
const { Text } = Typography;

export const AlertInsufficientMigrationFunds = ({
totalOlasBalance,
masterSafeOlasBalance,
stakedOlasBalance,
totalOlasRequiredForStaking,
}: {
totalOlasBalance: number;
}) => (
<CustomAlert
type="warning"
showIcon
message={
<Flex vertical gap={4}>
<Text className="font-weight-600">
Insufficient amount of funds to switch
</Text>
masterSafeOlasBalance: number;
stakedOlasBalance: number;
totalOlasRequiredForStaking: number;
}) => {
const requiredOlasDeposit =
totalOlasRequiredForStaking - (stakedOlasBalance + masterSafeOlasBalance);

<Text>Add funds to your account to meet the program requirements.</Text>
<Text>
Your current OLAS balance:{' '}
<span className="font-weight-600">{totalOlasBalance} OLAS</span>
</Text>
</Flex>
}
/>
);
return (
<CustomAlert
type="warning"
showIcon
message={
<Flex vertical gap={4}>
<Text className="font-weight-600">
An additional {requiredOlasDeposit} OLAS is required to switch
</Text>
<Text>
Add <strong>{requiredOlasDeposit} OLAS</strong> to your account to
meet the contract requirements and switch.
</Text>
</Flex>
}
/>
);
};

export const AlertNoSlots = () => (
<CustomAlert
Expand Down
Loading
Loading