Skip to content

Commit

Permalink
update the SpaceDapp to use the uri field (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
tak-hntlabs authored Jul 18, 2024
1 parent 32d512b commit 53dedf1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/sdk/src/mediaWithEntitlements.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('mediaWithEntitlements', () => {
const transaction = await spaceDapp.createSpace(
{
spaceName: 'space-name',
spaceMetadata: 'bobs-space-metadata',
uri: 'http://bobs-space-metadata.com',
channelName: 'general', // default channel name
membership: membershipInfo,
},
Expand All @@ -108,7 +108,7 @@ describe('mediaWithEntitlements', () => {
const transaction2 = await spaceDapp.createSpace(
{
spaceName: 'space2',
spaceMetadata: 'bobs-space2-metadata',
uri: 'bobs-space2-metadata',
channelName: 'general2', // default channel name
membership: membershipInfo,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/membershipManagement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('membershipManagement', () => {
const transaction = await spaceDapp.createSpace(
{
spaceName: 'bobs-space-metadata',
spaceMetadata: 'bobs-space-metadata',
uri: 'http://bobs-space-metadata.com',
channelName: 'general', // default channel name
membership: membershipInfo,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/sync-agent/spaces/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Spaces extends PersistedObservable<SpacesModel> {
const transaction = await this.spaceDapp.createSpace(
{
spaceName: params.spaceName,
spaceMetadata: params.spaceMetadata ?? params.spaceName,
uri: params.uri ?? '',
channelName: channelName,
membership: membershipInfo,
shortDescription: params.shortDescription,
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export async function createSpaceAndDefaultChannel(
const transaction = await spaceDapp.createSpace(
{
spaceName: `${name}-space`,
spaceMetadata: `${name}-space-metadata`,
uri: `http://${name}-space-metadata.com`,
channelName: 'general',
membership,
},
Expand Down Expand Up @@ -413,7 +413,7 @@ export async function createUserStreamAndSyncClient(
const transaction = await spaceDapp.createSpace(
{
spaceName: `${name}-space`,
spaceMetadata: `${name}-space-metadata`,
uri: `${name}-space-metadata`,
channelName: 'general',
membership: membershipInfo,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/withEntitilements.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('withEntitlements', () => {
const transaction = await spaceDapp.createSpace(
{
spaceName: 'bobs-space-metadata',
spaceMetadata: 'bobs-space-metadata',
uri: 'http://bobs-space-metadata.com',
channelName: 'general', // default channel name
membership: membershipInfo,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/stress/src/utils/stressClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class StressClient {
const transaction = await this.spaceDapp.createSpace(
{
spaceName,
spaceMetadata: spaceName,
uri: '',
channelName: 'general', // default channel name
membership: membershipInfo,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/src/ISpaceDapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type SignerType = ethers.Signer

export interface CreateSpaceParams {
spaceName: string
spaceMetadata: string
uri: string
channelName: string
membership: MembershipStruct
shortDescription?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/src/v3/SpaceDapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class SpaceDapp implements ISpaceDapp {
): Promise<ContractTransaction> {
const spaceInfo = {
name: params.spaceName,
uri: params.spaceMetadata,
uri: params.uri,
membership: params.membership as any,
channel: {
metadata: params.channelName || '',
Expand Down

0 comments on commit 53dedf1

Please sign in to comment.