Skip to content

Commit

Permalink
chore(types): manually fix venue details schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
monitz87 committed Oct 26, 2020
1 parent c5ff6b1 commit 765525e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/Polymesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ export class Polymesh {

try {
const { types, rpc } = polymesh;
console.log('HEY');

const polymeshApi = await ApiPromise.create({
provider: new WsProvider(nodeUrl),
Expand All @@ -156,8 +155,6 @@ export class Polymesh {
rpc,
});

console.log('HEY2');

let middlewareApi: ApolloClient<NormalizedCacheObject> | null = null;

if (middleware) {
Expand Down
2 changes: 1 addition & 1 deletion src/api/entities/Venue/__tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Venue class', () => {
.resolves({
creator: dsMockUtils.createMockIdentityId(owner),
instructions: [],
details: dsMockUtils.createMockBytes(description),
details: dsMockUtils.createMockVenueDetails(description),
// eslint-disable-next-line @typescript-eslint/camelcase
venue_type: dsMockUtils.createMockVenueType(type),
});
Expand Down
4 changes: 2 additions & 2 deletions src/api/entities/Venue/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { addInstruction, AddInstructionParams } from '~/api/procedures';
import { Context, TransactionQueue } from '~/base';
import { InstructionStatus } from '~/types';
import {
bytesToString,
identityIdToString,
meshVenueTypeToVenueType,
numberToU64,
u64ToBigNumber,
venueDetailsToString,
} from '~/utils';

import { VenueDetails } from './types';
Expand Down Expand Up @@ -69,7 +69,7 @@ export class Venue extends Entity<UniqueIdentifiers> {

return {
owner: new Identity({ did: identityIdToString(creator) }, context),
description: bytesToString(details),
description: venueDetailsToString(details),
type: meshVenueTypeToVenueType(type),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/polkadot/polymesh/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ export default {
Venue: {
creator: 'IdentityId',
instructions: 'Vec<u64>',
details: 'Vec<u8>',
details: 'VenueDetails',
venue_type: 'VenueType',
},
Receipt: {
Expand Down
2 changes: 1 addition & 1 deletion src/polkadot/polymesh/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ export interface Url extends Text {}
export interface Venue extends Struct {
readonly creator: IdentityId;
readonly instructions: Vec<u64>;
readonly details: Bytes;
readonly details: VenueDetails;
readonly venue_type: VenueType;
}

Expand Down

0 comments on commit 765525e

Please sign in to comment.