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

Feature: Arbitrary Transactions (partial, behind a FF) #3943

Merged
merged 54 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
9156fbf
feat: create simple Arbitrary Txs motion
Nortsova Nov 4, 2024
b3fdbb0
feat: add transactions table and modal
Nortsova Nov 4, 2024
b08f946
fix: create basic form validation
Nortsova Nov 5, 2024
9521024
feat: implement transaction validation and throw data to the saga
Nortsova Nov 5, 2024
09a04f9
fix: align select and textarea to the design
Nortsova Nov 5, 2024
0876656
feat: update styles for Modal and transaction table
Nortsova Nov 5, 2024
eecc273
fix: refactor some small ui issues in textarea
Nortsova Nov 5, 2024
60b0ac7
feat: mobile alignment
Nortsova Nov 5, 2024
13db8d8
fix: refactor function naming and fixing minor issues
Nortsova Nov 6, 2024
f658a47
fix: textarea height issue
Nortsova Nov 7, 2024
ba84663
fix: revert AvatarWithAddress component
Nortsova Nov 14, 2024
bcde0b9
feat: get contract info, contract field validation
Nortsova Nov 11, 2024
647879f
feat: update server side validation
Nortsova Nov 11, 2024
b233ea7
feat: update server side validation
Nortsova Nov 11, 2024
719c15d
feat: validate json abi field
Nortsova Nov 12, 2024
a9d1468
feat: implement dynamic inputs
Nortsova Nov 12, 2024
eb37bde
fix: hotfix types for FormInput
Nortsova Nov 12, 2024
8e6d823
feat: add dynamic fields validation, add description to the table
Nortsova Nov 13, 2024
10fa938
feat: update errors translation and small refactoring
Nortsova Nov 13, 2024
c06292d
fix: refactor, adding comments
Nortsova Nov 13, 2024
0234ab9
fix: fixing bugs and translations
Nortsova Nov 13, 2024
a0d8059
feat: add external URL for learn more in arbitrary transaction modal
Nortsova Nov 14, 2024
35d7726
fix: add 'confirmation' modal on close Transaction modal, update erro…
Nortsova Nov 18, 2024
80b5892
fix: update unformat text according to the design
Nortsova Nov 18, 2024
cb239d2
fix: fix default loading state for ArbitraryTransactionModal
Nortsova Nov 19, 2024
12b2b19
feat: refactor dynamic fields to be able to add defaultValues in #3736
Nortsova Nov 20, 2024
50453ab
fix: make arbitrary txs table red on validation, do small fixes
Nortsova Nov 26, 2024
bf2f38f
fix: do some fixes and refactoring
Nortsova Nov 27, 2024
3bbee03
fix: use arbiscan API key for all fetch contract ABI requests
Nortsova Nov 28, 2024
0dc7a84
feat: add meatball menu and duplicate and delete functionality
Nortsova Nov 19, 2024
5c93824
feat: refactor dynamic components and add 'edit row' functionality
Nortsova Nov 20, 2024
d3f4f28
fix: fix merging errors
Nortsova Nov 27, 2024
1389998
feat: add feature flag to arbitrary transactions
Nortsova Nov 27, 2024
b2ad6ec
fix: update transactions table error style
Nortsova Dec 4, 2024
29b2ed4
Feat: Add custom transactions action card
iamsamgibbs Dec 4, 2024
2fa29f6
fix: 'edit details' form to render a correct inputs and values
Nortsova Dec 6, 2024
8d23e32
feat: implement arbitrary transaction saga using permissions
Nortsova Dec 3, 2024
8210a15
feat: handle arbitrary transactions on block-ingestor side
Nortsova Dec 5, 2024
fcd091e
fix: rename method args title to 'name' field
Nortsova Dec 5, 2024
7a16966
fix: remove any from arbitraryTxSaga
Nortsova Dec 5, 2024
5dc78ef
fix: remove payload from arbitrary transaction success action
Nortsova Dec 5, 2024
aad75bd
fix: updated required fields in graphql schema, add filter function b…
Nortsova Dec 6, 2024
b0df45b
fix: update block-ingestor hash
Nortsova Dec 9, 2024
76570c4
fix: add permissions needed for arbitrary txs action
Nortsova Dec 11, 2024
2939ddd
Schema update: Add arbitraryTxAbis field to action metadata
jakubcolony Dec 17, 2024
6d6a0f5
Fix: remove try/catch from arbitraryTx saga to allow error to propaga…
jakubcolony Dec 17, 2024
4cb2d94
Refactor: createActionMetadataInDB to accept array of fields
jakubcolony Dec 17, 2024
1a6cb82
Feat: Store ABIs used to create arbitrary txs on action metadata
jakubcolony Dec 17, 2024
2e5773d
Feat: Add util to decode arbitrary transaction
jakubcolony Dec 17, 2024
092a189
Temp: Show output of arbitrary transaction decode in action view
jakubcolony Dec 17, 2024
a9eba4c
Schema update: Remove decoded transaction fields from colony action m…
jakubcolony Dec 17, 2024
05ee142
Update ingestor image hash
jakubcolony Dec 17, 2024
589f154
Fix: remove obsolete fields from action fragment
jakubcolony Dec 18, 2024
592933d
Merge pull request #3966 from JoinColony/feat/3875-improve-arbitrary-…
jakubcolony Dec 19, 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
Prev Previous commit
Next Next commit
feat: add feature flag to arbitrary transactions
Nortsova committed Dec 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 138999863aea05e3dbc5c243f8f952c5b7e49979
16 changes: 12 additions & 4 deletions src/components/v5/common/ActionSidebar/hooks/useActionsList.ts
Original file line number Diff line number Diff line change
@@ -2,13 +2,19 @@ import { useMemo } from 'react';

import { Action } from '~constants/actions.ts';
import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts';
import { useFeatureFlagsContext } from '~context/FeatureFlagsContext/FeatureFlagsContext.ts';
import useEnabledExtensions from '~hooks/useEnabledExtensions.ts';
import { type SearchSelectOptionProps } from '~v5/shared/SearchSelect/types.ts';

const useActionsList = () => {
const { colony } = useColonyContext();
const { isStagedExpenditureEnabled } = useEnabledExtensions();

const featureFlags = useFeatureFlagsContext();
const isFeatureFlagArbitraryTxsEnabled =
featureFlags.ARBITRARY_TXS_ACTION?.isLoading ||
featureFlags.ARBITRARY_TXS_ACTION?.isEnabled;

return useMemo((): SearchSelectOptionProps[] => {
const actionsListOptions: SearchSelectOptionProps[] = [
{
@@ -133,7 +139,9 @@ const useActionsList = () => {
// },
],
},
{
];
if (isFeatureFlagArbitraryTxsEnabled) {
actionsListOptions.push({
key: '6',
isAccordion: true,
title: { id: 'actions.transactions' },
@@ -144,8 +152,8 @@ const useActionsList = () => {
isNew: true,
},
],
},
];
});
}
if (!isStagedExpenditureEnabled) {
const stagedPaymentIndex = actionsListOptions[0].options.findIndex(
({ value }) => value === Action.StagedPayment,
@@ -160,7 +168,7 @@ const useActionsList = () => {
actionsListOptions[2].options[2].isDisabled = true;
}
return actionsListOptions;
}, [colony, isStagedExpenditureEnabled]);
}, [colony, isStagedExpenditureEnabled, isFeatureFlagArbitraryTxsEnabled]);
};

export default useActionsList;
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ const FeatureFlagsContextProvider: FC<PropsWithChildren> = ({ children }) => {
FeatureFlag.CRYPTO_TO_FIAT_WITHDRAWALS,
);
const guidedToursFeature = useFeatureFlag(FeatureFlag.GUIDED_TOURS);
const arbitraryTxsAction = useFeatureFlag(FeatureFlag.ARBITRARY_TXS_ACTION);

const featureFlags: Record<
FeatureFlag,
@@ -44,8 +45,14 @@ const FeatureFlagsContextProvider: FC<PropsWithChildren> = ({ children }) => {
[FeatureFlag.CRYPTO_TO_FIAT]: cryptoToFiatFeature,
[FeatureFlag.CRYPTO_TO_FIAT_WITHDRAWALS]: cryptoToFiatWithdrawalsFeature,
[FeatureFlag.GUIDED_TOURS]: guidedToursFeature,
[FeatureFlag.ARBITRARY_TXS_ACTION]: arbitraryTxsAction,
}),
[cryptoToFiatFeature, cryptoToFiatWithdrawalsFeature, guidedToursFeature],
[
cryptoToFiatFeature,
cryptoToFiatWithdrawalsFeature,
guidedToursFeature,
arbitraryTxsAction,
],
);

return (
1 change: 1 addition & 0 deletions src/context/FeatureFlagsContext/types.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ export enum FeatureFlag {
CRYPTO_TO_FIAT = 'CRYPTO_TO_FIAT',
CRYPTO_TO_FIAT_WITHDRAWALS = 'CRYPTO_TO_FIAT_WITHDRAWALS',
GUIDED_TOURS = 'GUIDED_TOURS',
ARBITRARY_TXS_ACTION = 'ARBITRARY_TXS_ACTION',
}

export interface FeatureFlagValue {