Skip to content
Draft
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
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"dependencies": {
"@snickerdoodlelabs/common-utils": "workspace:^",
"@snickerdoodlelabs/contracts-sdk": "workspace:^",
"@snickerdoodlelabs/erc7529": "workspace:^",
"@snickerdoodlelabs/indexers": "workspace:^",
"@snickerdoodlelabs/insight-platform-api": "workspace:^",
"@snickerdoodlelabs/node-utils": "workspace:^",
Expand Down
23 changes: 12 additions & 11 deletions packages/core/src/implementations/SnickerdoodleCore.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import {
LogUtils,
TimeUtils,
} from "@snickerdoodlelabs/common-utils";
import {
ERC7529Utils,
IERC7529ConfigProvider,
IERC7529ConfigProviderType,
IERC7529Utils,
IERC7529UtilsType,
} from "@snickerdoodlelabs/erc7529";
import {
IIndexerConfigProvider,
IIndexerConfigProviderType,
Expand Down Expand Up @@ -54,10 +61,8 @@ import {
ICloudStorageManager,
ICloudStorageManagerType,
ICloudStorage,
GoogleCloudStorage,
DropboxCloudStorage,
IDropboxCloudStorageType,
IGDriveCloudStorageType,
IPersistenceContextProvider,
IPersistenceContextProviderType,
NullCloudStorage,
Expand Down Expand Up @@ -120,7 +125,6 @@ import {
BrowsingDataRepository,
CoinGeckoTokenPriceRepository,
ConsentContractRepository,
DNSRepository,
DataWalletPersistence,
DemographicDataRepository,
DiscordRepository,
Expand Down Expand Up @@ -208,8 +212,6 @@ import {
IBrowsingDataRepositoryType,
IConsentContractRepository,
IConsentContractRepositoryType,
IDNSRepository,
IDNSRepositoryType,
IDataWalletPersistence,
IDataWalletPersistenceType,
IDemographicDataRepository,
Expand Down Expand Up @@ -344,9 +346,6 @@ export const snickerdoodleCoreModule = new ContainerModule(
bind<IMarketplaceRepository>(IMarketplaceRepositoryType).to(
MarketplaceRepository,
);
bind<IDNSRepository>(IDNSRepositoryType)
.to(DNSRepository)
.inSingletonScope();
bind<IDomainCredentialRepository>(IDomainCredentialRepositoryType)
.to(DomainCredentialRepository)
.inSingletonScope();
Expand Down Expand Up @@ -421,6 +420,9 @@ export const snickerdoodleCoreModule = new ContainerModule(
bind<IIndexerConfigProvider>(IIndexerConfigProviderType).toConstantValue(
configProvider,
);
bind<IERC7529ConfigProvider>(IERC7529ConfigProviderType).toConstantValue(
configProvider,
);

// Binding cloud storage manager
bind<IPersistenceConfigProvider>(
Expand Down Expand Up @@ -454,6 +456,8 @@ export const snickerdoodleCoreModule = new ContainerModule(
bind<IBigNumberUtils>(IBigNumberUtilsType)
.to(BigNumberUtils)
.inSingletonScope();
bind<ITimeUtils>(ITimeUtilsType).to(TimeUtils).inSingletonScope();
bind<IERC7529Utils>(IERC7529UtilsType).to(ERC7529Utils).inSingletonScope();

// Utilites/factory
bind<IContractFactory>(IContractFactoryType)
Expand Down Expand Up @@ -507,9 +511,6 @@ export const snickerdoodleCoreModule = new ContainerModule(
.to(SDQLQueryWrapperFactory)
.inSingletonScope();

bind<ITimeUtils>(ITimeUtilsType).to(TimeUtils).inSingletonScope();

/* Cloud Storage Options - may need to comment out */
bind<ICloudStorage>(INullCloudStorageType)
.to(NullCloudStorage)
.inSingletonScope();
Expand Down
16 changes: 6 additions & 10 deletions packages/core/src/implementations/SnickerdoodleCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,6 @@ export class SnickerdoodleCore implements ISnickerdoodleCore {

return invitationService.getAgreementFlags(consentContractAddress);
},
getAvailableInvitationsCID: (
sourceDomain: DomainName | undefined = undefined,
) => {
const invitationService = this.iocContainer.get<IInvitationService>(
IInvitationServiceType,
);

return invitationService.getAvailableInvitationsCID();
},
getAcceptedInvitationsCID: (
sourceDomain: DomainName | undefined = undefined,
) => {
Expand Down Expand Up @@ -762,7 +753,12 @@ export class SnickerdoodleCore implements ISnickerdoodleCore {
const consentRepo = this.iocContainer.get<IConsentContractRepository>(
IConsentContractRepositoryType,
);
return consentRepo.getInvitationUrls(consentContractAddress);
return consentRepo.getDomains(consentContractAddress).map((domains) => {
// This method only returns domains, not complete urls
return domains.map((domain) => {
return URLString(domain);
});
});
}

public getConsentCapacity(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
BlockchainProviderError,
BlockNumber,
ConsentContractError,
ConsentContractRepositoryError,
ConsentError,
ConsentFactoryContractError,
IPFSError,
Expand Down
Loading