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

feat: merge new features #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- run: npm test

- name: Upload coverage artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-${{ runner.os }}
path: coverage/
Expand Down
21 changes: 17 additions & 4 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {

complianceUri:
process.env.NEXT_PUBLIC_COMPLIANCE_URI ||
'https://compliance.lab.gaia-x.eu',
'https://www.delta-dao.com/compliance',

complianceApiVersion:
process.env.NEXT_PUBLIC_COMPLIANCE_API_VERSION || '2210',
Expand Down Expand Up @@ -76,8 +76,7 @@ module.exports = {
process.env.NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER || 'true',

// Default terms to be used for service offerings made on this marketplace
defaultAccessTerms:
'https://raw.githubusercontent.com/deltaDAO/mvg-portal/v4/content/pages/terms.md',
defaultTermsAndConditionsUrl: 'https://portal.pontus-x.eu/privacy/en',

// Purgatory URI, leave as an empty string to disable the API call
purgatoryUrl: process.env.NEXT_PUBLIC_PURGATORY_URI || '',
Expand All @@ -88,6 +87,7 @@ module.exports = {
'https://dockerhub-proxy.delta-dao.com',

automationConfig: {
enableAutomation: process.env.NEXT_PUBLIC_ENABLE_AUTOMATION || 'true',
networkTokenFundDefaultValue: '2',
erc20ApprovalDefaultValue: '50',
roughTxGasEstimate: 0.02
Expand All @@ -96,6 +96,11 @@ module.exports = {
// Display alert banner for the developer preview deployment
showPreviewAlert: process.env.NEXT_PUBLIC_SHOW_PREVIEW_ALERT || 'false',

contractingProvider: {
enable: true,
endpoint: 'https://contracting.demo.delta-dao.com'
},

networkAlertConfig: {
// Refresh interval for network status - 30 sec
refreshInterval: 30000,
Expand All @@ -110,5 +115,13 @@ module.exports = {
faucet: {
enabled: process.env.NEXT_PUBLIC_FAUCET_ENABLED || 'false',
baseUri: 'https://faucet.api.pontus-x.eu'
}
},

showOnboardingModuleByDefault:
process.env.NEXT_PUBLIC_SHOW_ONBOARDING_MODULE_BY_DEFAULT === 'true',

allowedGaiaXRegistryDomains: [
'https://registry.gaia-x.eu/v2206',
'https://registry.lab.gaia-x.eu/v2206'
]
}
3 changes: 2 additions & 1 deletion content/onboarding/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"subtitle": "Quick start guide",
"title": "First Time Visiting?",
"body": "Before interacting with all the portal functionalities, you'll have to ensure you have the correct setup (wallet, testnet, tokens).\n\n We can help you jump-start the process!"
"body": "Before interacting with all the portal functionalities, you'll have to ensure you have the correct setup (wallet, testnet, tokens).\n\n We can help you jump-start the process!",
"hideHint": "### Hide onboarding guide\n You can reactivate the Onboarding Guide at any time in the settings."
}
15 changes: 9 additions & 6 deletions content/pages/startComputeDataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@
"sortOptions": false
}
],
"termsAndConditions": {
"name": "termsAndConditions",
"type": "checkbox",
"options": ["Terms and Conditions"],
"prefixes": ["I agree to the"],
"actions": ["/terms"]
"portalTermsAndConditions": {
"name": "portalTermsAndConditions",
"options": ["Portal Terms and Conditions"],
"prefixes": ["I agree to the"]
},
"assetTermsAndConditions": {
"name": "assetTermsAndConditions",
"prefixes": ["I acknowledge that the asset is made available under"],
"postfixes": ["license and agree to the terms"]
}
}
}
14 changes: 14 additions & 0 deletions content/pages/startDownloadDataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"form": {
"portalTermsAndConditions": {
"name": "portalTermsAndConditions",
"options": ["Portal Terms and Conditions"],
"prefixes": ["I agree to the"]
},
"assetTermsAndConditions": {
"name": "assetTermsAndConditions",
"prefixes": ["I acknowledge that the asset is made available under"],
"postfixes": ["license and agree to the terms"]
}
}
}
17 changes: 13 additions & 4 deletions content/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"name": "Faucet",
"link": "/faucet"
},

{
"name": "Log",
"link": "https://explorer.pontus-x.eu/"
Expand Down Expand Up @@ -71,6 +72,14 @@
"category": "manufacturing",
"isLive": true
},
{
"name": "beebucket",
"link": "https://daseen.pontus-x.eu/",
"description": "The beebucket portal features access to the Extended Dataset Profile Service (EDPS) and Dataset Search Engine (daseen).",
"image": "beebucket.webp",
"category": "AI",
"isLive": true
},
{
"name": "FIWARE",
"link": "https://fiware-marketplace-a4eqd.ondigitalocean.app/",
Expand Down Expand Up @@ -104,10 +113,10 @@
"isLive": true
},
{
"name": "UdL Research Data Space",
"link": "https://dataspace.angliru.udl.cat/",
"description": "An open research platform following the FAIR guiding principles of findability, accessibility, interoperability and reusability, while guaranteeing data sovereignty.",
"image": "udl-logo.webp",
"name": "AgrospAI",
"link": "https://agrospai.udl.cat/",
"description": "Agri-food Data Space Demonstrator for Sovereign Data-Sharing and Artificial Intelligence Services.",
"image": "agrospai-logo.webp",
"category": "agriculture",
"isLive": true
},
Expand Down
26 changes: 24 additions & 2 deletions pontusxAddresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@
"0xD1Cb3E73a7bC632d2279114AA2783dcaD06517ca": "deltaDAO AG",
"0xAEC291E9Eb4293d45a5B8aBE3549c0C7464e5C24": "deltaDAO AG",
"0x4c7BfE3D6278eb996FC13c5f748bC7b1dBe593D8": "deltaDAO AG",
"0x9FC6556535999048A3A814b56c21EFA01aC45591": "deltaDAO AG (dev0000)",
"0x4A806a4851472F7cFd579d3FF5465F03c3c2B5d4": "PTW - TU Darmstadt",
"0x21CF19e1FaF3A62f82B432f82152e8c5C0FdBdaF": "PTW - TU Darmstadt",
"0x9f4ceE0eBD03a1e9E4DcffaF876873d7a3e9595c": "AMIDS",
"0x6E7bec8715955B6Cc90A5A1767cd981b90C5a245": "PTW - TU Darmstadt",
"0x81336c245712DbF0E971de5463173bCaA9826d84": "IONOS Cloud",
"0x56eA3Cc92144Db3bA2bdE25131F40c7B98F7eD32": "Exoscale",
"0x6d006671dA78354C200B03eF5E58F948977362cD": "A1 Digital",
"0x9Dc6aDA184fc98012D74F1C4f3f223183A4745D4": "Wobcom",
"0x0337b320DEfAddd9aDbC518f8A9cee30b606d15b": "Arsys",
"0xD7b90d6476091F6bc4CAaC40180FB300351fAb9F": "Arsys",
Expand All @@ -68,7 +70,11 @@
"0x2E32B0e4e20C7A4162A6455b4A12e01D09472556": "State Library of Berlin",
"0x4d7fE037831F077583a259B6437E542EffD6f2cD": "State Library of Berlin",
"0xdf89102cDd2ccA60E88e480C6D609FB3bfFD4d54": "State Library of Berlin",
"0x62078F05Eb4450272D7E492F3660835826906822": "University of Lleida",
"0x62078F05Eb4450272D7E492F3660835826906822": "Universitat de Lleida (UdL)",
"0xD999bAaE98AC5246568FD726be8832c49626867D": "Universitat de Lleida (UdL)",
"0x94549951623DD6c3265DBbB1b032d6cF48Ba7811": "Universitat de Lleida (UdL)",
"0x38f8c44FFaa8bE015F2DCDcD258ceBBed911840d": "Centre d'Estudis Porcins (CEP)",
"0xDf7a37EA1f42588Ea219Ec19328757F67BaBCeCD": "Centre d'Estudis Porcins (CEP)",
"0xa702032E187E6A53EAddC28a735B414220712689": "Software AG",
"0x0a477f6297413f20C4fBc15F93e34dacE4136123": "Software AG",
"0x586000e6DA330E140b11a4aeEbb81963d67F336b": "TU Wien",
Expand Down Expand Up @@ -116,6 +122,7 @@
"0xa2199E3f60fC244037Efd5A77714CC05F604F855": "Airbus Defence and Space GmbH",
"0x5101ea56E29f5dc03285809b6157f0588ff255D0": "Bernard Technologies GmbH",
"0x8B7f2b75B7F87D3125C8B0eDB85639B441BBcE21": "Deutsches Forschungszentrum für Künstliche Intelligenz GmbH",
"0xB64d95B85FcbDb868AaF0075B023E36f374Bc4F7": "Deutsches Forschungszentrum für Künstliche Intelligenz GmbH",
"0xb11124Dfa40E44b3283068fd07bf6FdE60caf06A": "Hochschule für angewandte Wissenschaften Kempten",
"0x632460b14aDd90aD9430e381B4662779cC1ab7a6": "Fraunhofer-Institut für Graphische Datenverarbeitung IGD",
"0x1f65110b63B6044f1E92543C09231842131798C7": "52°North GmbH",
Expand Down Expand Up @@ -187,6 +194,7 @@
"0xAaeA7A824cffffFFf9Dd6EC51D7D7B0abA3f205F": "neusta aerospace GmbH",
"0xf9eaebd346E9D414f4D4210CB12e43cc226038cF": "DLR GfR mbH",
"0xdbe749D939ea958aC64A5bdf163B05096E260572": "Valispace GmbH",
"0x938224aC9e4832C517818B147BB1f6b10ADdCd26": "Valispace GmbH",
"0xAE823B7a6ad5b79da6d180Dbe91E7C810abAcCA4": "grandcentrix GmbH",
"0x2B9C7E0d7Be68ec6b519Dad050CD0A4bf130B6A4": "DIO",
"0x8e8D96aD41025EAFE3D4C198afca6c1eb5EB7a32": "SSC-Services GmbH",
Expand Down Expand Up @@ -568,6 +576,7 @@
"0xeF98b60f0E31Ee97C7898Cd9CE2E67c1166F3838": "LoadTest22",
"0x13105a3580560DC209859801e7289E60F44F880a": "LoadTest21",
"0xb2D3015C7356Dfde2FFe3AaBf148460A03dc74A3": "Hochschule Osnabrück",
"0x103501f5db82F162ec6807d21A8D847ed4b77cAc": "Hochschule Osnabrück",
"0x4aADFC11088Bd53033297fDb7D97329500F34e9f": "FIWARE Foundation e.V.",
"0x345d301C97eb25468fDd7eDfb1B6e9C7f0B9F784": "Universität Siegen",
"0xEa458168651e7D254408Ea941BAf4210de1564E1": "Hans Berg GmbH & Co. KG",
Expand Down Expand Up @@ -620,6 +629,9 @@
"0x6F28a052eeb897d6412A8198D0DDF1FC15fe3D94": "Future Mobility Network B.V.",
"0x1504d3AE9224091990Cb2F71D0e10B8F7E84E7De": "NVWA",
"0x4680420FD71E0C8ABDae60EFdF685206E9bdbF3E": "LMIS AG",
"0x477274a7e0f05849D583e20165600775AFAE8a1d": "LMIS AG",
"0x0228BdC3d0a8dBBD9baF39803999f54E4a669aC1": "LMIS AG",
"0x89b11a81520E090A03e66f92c1e1798d31611D3C": "LMIS AG",
"0x57fa18A57f4B8198a4781D4Cc850631F7be8333F": "DEKRA Digital GmbH",
"0x9B421d0f5d378b66324251d6CDc1945a6560110b": "SIMAVI",
"0x13a9FfFC7fb684CCc623C305B46b7eD6b3a73C66": "ENGINSOFT",
Expand All @@ -643,5 +655,15 @@
"0x7bEe4CD4DD492390eB76B5Af125763BF40484d28": "TSG Technologie und Service GmbH",
"0x12aFee9a899aF6037552bE750958F6bD3Db12A03": "Gebr. Heller Maschinenfabrik GmbH",
"0xF8F830B34C61493E7A688515660d5c38e9700C19": "SIDENOR STEEL INDUSTRY S.A.",
"0xCBeD907179189073c5861a8059Fa98F10dE2ACE9": "Pontus-X DAO"
"0xCBeD907179189073c5861a8059Fa98F10dE2ACE9": "Pontus-X DAO",
"0x35C626b7BD8F844C59D3E4753a7268614EC785b7": "AW 4.0 Hub",
"0x4476123c4B4706cf88CbfA055b72726Baa1e8041": "DLR",
"0x165318B79640b7860cc4eb021496E7c166F6f113": "Flight Analyzer",
"0xa7606279cf6674Da0800afbEBe85b940B2906CF8": "Lambda Model",
"0xa290eb2B44e8A4f7CC50fa4724eF59D322A6890e": "Pressure Model",
"0x2617EEE3A757986C3d8319699c8427d771f3f417": "Track Machines Connected GmbH",
"0xB7A7814300d601fb0B2702ea5666d441bcE678e9": "H&F Solutions GmbH",
"0x105Bf736Ae0Fc0Aefe3339498da149bb207890b9": "Capgemini Deutschland GmbH",
"0x2912106B140669e5038A0cf768a4BDB202D67604": "Leitat",
"0x68D550A3ab5C3B8f354D0E6af9Eb9E7100818f2A": "ITK Engineering GmbH"
}
8 changes: 6 additions & 2 deletions src/@context/Asset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
serviceCredentialIdMatch?: boolean
serviceCredentialVersion: string
verifiedServiceProviderName: string
isIdMatchVerifiable?: string
fetchAsset: (token?: CancelToken) => Promise<void>
}

Expand Down Expand Up @@ -82,6 +83,7 @@
useState<string>()
const [verifiedServiceProviderName, setVerifiedServiceProviderName] =
useState<string>()
const [isIdMatchVerifiable, setIsIdMatchVerifiable] = useState<string>()

const newCancelToken = useCancelToken()
const isMounted = useIsMounted()
Expand Down Expand Up @@ -155,7 +157,7 @@

setLoading(false)
},
[did, accountId]

Check warning on line 160 in src/@context/Asset.tsx

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

React Hook useCallback has a missing dependency: 'isDDOWhitelisted'. Either include it or remove the dependency array
)

// -----------------------------------
Expand Down Expand Up @@ -202,13 +204,14 @@
? await getServiceCredential(serviceCredential?.url)
: serviceCredential?.raw

const { verified, complianceApiVersion, idMatch } =
const { verified, complianceApiVersion, idMatch, isIdMatchVerifiable } =
await verifyRawServiceCredential(serviceCredentialContent, asset.id)

setIsServiceCredentialVerified(verified && !!serviceCredentialContent)
setServiceCredentialIdMatch(
verified && !!serviceCredentialContent && idMatch
)
setIsIdMatchVerifiable(isIdMatchVerifiable)
setServiceCredentialVersion(complianceApiVersion)
const serviceProviderName = getPublisherFromServiceCredential(
serviceCredentialContent
Expand Down Expand Up @@ -321,7 +324,8 @@
isServiceCredentialVerified,
serviceCredentialIdMatch,
serviceCredentialVersion,
verifiedServiceProviderName
verifiedServiceProviderName,
isIdMatchVerifiable
} as AssetProviderValue
}
>
Expand Down
56 changes: 31 additions & 25 deletions src/@context/Automation/AutomationProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const AutomationContext = createContext({} as AutomationProviderValue)
// Provider
function AutomationProvider({ children }) {
const { getApprovedTokenBalances } = useBalance()
const { approvedBaseTokens } = useMarketMetadata()
const { approvedBaseTokens, appConfig } = useMarketMetadata()
const { automationWalletJSON, setAutomationWalletJSON } = useUserPreferences()

const [autoWallet, setAutoWallet] = useState<Wallet>()
Expand Down Expand Up @@ -207,30 +207,36 @@ function AutomationProvider({ children }) {
)

return (
<AutomationContext.Provider
value={{
autoWallet,
autoWalletAddress,
balance,
isAutomationEnabled,
isLoading,
decryptPercentage,
hasValidEncryptedWallet,
setIsAutomationEnabled,
updateBalance,
deleteCurrentAutomationWallet,
importAutomationWallet,
decryptAutomationWallet
}}
>
{children}
<DeleteAutomationModal
hasDeleteRequest={hasDeleteRequest}
setHasDeleteRequest={setHasDeleteRequest}
disabled={isLoading}
onDeleteConfirm={() => removeAutomationWalletAndCleanup()}
/>
</AutomationContext.Provider>
<>
{appConfig.automationConfig.enableAutomation === 'true' ? (
<AutomationContext.Provider
value={{
autoWallet,
autoWalletAddress,
balance,
isAutomationEnabled,
isLoading,
decryptPercentage,
hasValidEncryptedWallet,
setIsAutomationEnabled,
updateBalance,
deleteCurrentAutomationWallet,
importAutomationWallet,
decryptAutomationWallet
}}
>
{children}
<DeleteAutomationModal
hasDeleteRequest={hasDeleteRequest}
setHasDeleteRequest={setHasDeleteRequest}
disabled={isLoading}
onDeleteConfirm={() => removeAutomationWalletAndCleanup()}
/>
</AutomationContext.Provider>
) : (
<>{children}</>
)}
</>
)
}

Expand Down
7 changes: 6 additions & 1 deletion src/@context/MarketMetadata/_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ export interface AppConfig {
classNameLight: string
storageKey: string
}
defaultAccessTerms: string
defaultTermsAndConditionsUrl: string
purgatoryUrl: string
dockerHubProxyUrl: string
automationConfig: {
enableAutomation: string
networkTokenFundDefaultValue: string
erc20ApprovalDefaultValue: string
roughTxGasEstimate: number
}
showPreviewAlert: string
contractingProvider: {
enable: boolean
endpoint: string
}
networkAlertConfig: {
// Refresh interval for network status - 30 sec
refreshInterval: number
Expand Down
12 changes: 11 additions & 1 deletion src/@hooks/useAddressConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface UseAddressConfig {
isDDOWhitelisted: (ddo: AssetExtended) => boolean
hasFeaturedAssets: () => boolean
isWhitelistEnabled: () => boolean
getVerifiedAddressName: (address: string) => string | undefined
}

function isWhitelistEnabled() {
Expand Down Expand Up @@ -67,13 +68,22 @@ export function useAddressConfig(): UseAddressConfig {
)
}

const getVerifiedAddressName = (address: string): string | undefined => {
const addressKey = Object.keys(verifiedAddresses).find(
(key) => key.toLowerCase() === address.toLowerCase()
)
const addressName = verifiedAddresses[addressKey]
return addressName
}

return {
whitelists,
featured,
verifiedAddresses,
isAddressWhitelisted,
isDDOWhitelisted,
hasFeaturedAssets,
isWhitelistEnabled
isWhitelistEnabled,
getVerifiedAddressName
}
}
3 changes: 3 additions & 0 deletions src/@images/x-cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading