Skip to content

Commit

Permalink
Merge pull request #971 from Chia-Network/paninaro.dl_gui_additions
Browse files Browse the repository at this point in the history
Cherry-picked datalayer GUI additions
  • Loading branch information
paninaro authored Aug 26, 2022
2 parents 55e776c + 8c76c8a commit e44fa0e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/api-react/src/hooks/useServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export default function useMonitorServices(
getServiceOptions(ServiceName.INTRODUCER, services, options),
);

const datalayerState = useService(
ServiceName.DATALAYER,
getServiceOptions(ServiceName.DATALAYER, services, options),
);

const states = [
walletState,
fullNodeState,
Expand All @@ -91,6 +96,7 @@ export default function useMonitorServices(
plotterState,
timelordState,
introducerState,
datalayerState,
];

const isLoading = !!states.find((state) => state.isLoading);
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/constants/ServiceConnectionName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export default {
5: ServiceHumanName[ServiceName.INTRODUCER],
6: ServiceHumanName[ServiceName.WALLET],
7: ServiceHumanName[ServiceName.PLOTTER],
8: ServiceHumanName[ServiceName.DATALAYER],
};
1 change: 1 addition & 0 deletions packages/api/src/constants/ServiceHumanName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export default {
[ServiceName.TIMELORD]: 'Timelord',
[ServiceName.INTRODUCER]: 'Introducer',
[ServiceName.EVENTS]: 'Events',
[ServiceName.DATALAYER]: 'Datalayer',
};
1 change: 1 addition & 0 deletions packages/api/src/constants/ServiceName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum ServiceName {
TIMELORD = 'chia_timelord',
INTRODUCER = 'chia_introducer',
EVENTS = 'wallet_ui',
DATALAYER = "chia_data_layer",
};

export default ServiceName;
2 changes: 2 additions & 0 deletions packages/api/src/constants/WalletType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ enum WalletType {
DECENTRALIZED_ID = 8,
POOLING_WALLET = 9,
NFT = 10,
DATA_LAYER = 11,
DATA_LAYER_OFFER = 12,
}

export default WalletType;
1 change: 1 addition & 0 deletions packages/gui/src/components/app/AppState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const ALL_SERVICES = [
ServiceName.FARMER,
ServiceName.HARVESTER,
ServiceName.SIMULATOR,
ServiceName.DATALAYER,
];

type Props = {
Expand Down
1 change: 1 addition & 0 deletions packages/gui/src/constants/ModeServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
ServiceName.FULL_NODE,
ServiceName.FARMER,
ServiceName.HARVESTER,
ServiceName.DATALAYER,
],
};

Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/src/components/WalletsDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function WalletsDropdown(props: Props) {
}

return wallets
.filter(wallet => ![WalletType.POOLING_WALLET].includes(wallet.type))
.filter(wallet => ![WalletType.POOLING_WALLET, WalletType.DATA_LAYER].includes(wallet.type))
.map((wallet) => {
const primaryTitle = getPrimaryTitle(wallet);
const secondaryTitle = trans(WalletName[wallet.type]);
Expand Down
3 changes: 3 additions & 0 deletions packages/wallets/src/constants/WalletName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const WalletName = {
[WalletType.NFT]: defineMessage({
message: 'NFT Wallet',
}),
[WalletType.DATA_LAYER]: defineMessage({
message: 'Datalayer Wallet',
}),
}

export default WalletName;

0 comments on commit e44fa0e

Please sign in to comment.